On 10/30/2015 09:19 PM, Alasdair McAndrew wrote:
> ... - scattered and often not helpful enough.
Yes, you've put the finger into the wound. Unfortunately, this is a very
weak point of FriCAS. But healing it will cost a lot of time and effort.
I currently work with Kurt on making the Jupyter notebook more stable.
After that I intend to publish some notebooks that cover what you ask
for, i.e. covering a topic with examples and explanations. I hope that
will crow then and others will also contribute.
> For example, I was trying to find out yesterday how to solve a
> second order linear IVP. I can set up the ODE, but I don't know how to
> give the values both of y(0) and y'(0) to solve. The only example I could
> find was of a first order system.
Do you mean something like this?
(1) -> y := operator 'y
(1) y
Type:
BasicOperator
(2) -> deq := D(y(x), x, 2) + y(x)
,,
(2) y (x) + y(x)
Type:
Expression(Integer)
(3) -> solve(deq, y, x)
(3) [particular= 0,basis= [cos(x),sin(x)]]
Type: Union(Record(particular: Expression(Integer),basis:
List(Expression(Integer))),...)
-- initial values y(0)=1, y'(0)=2
(4) -> solve(deq, y, x=0, [1,2])
(4) 2sin(x) + cos(x)
Type:
Union(Expression(Integer),...)
In fact, for that, hyperdoc has some examples. Look under
Topics -> Solving Equations -> Solution of Differential Equations ->
8.10.1 Closed-Form Solutions of Linear Differential Equations
Yes. The bad thing with HyperDoc is, that one cannot easily search
through it.
> If you enter )d op solve you find there are 33 exposed operations, including
>
> [6] (D2,D1,Symbol,D1,List(D1)) -> Union(D1,"failed")
> from ElementaryFunctionLODESolver(D5,D1,D2)
> if D1 has Join(ACFS(D5),TRANFUN,PRIMCAT) and D5 has Join(
> COMPAR,EUCDOM,RETRACT(INT),LINEXP(INT),CHARZ) and D2 has
> LODOCAT(D1)
>
> which, let's face it, is pretty meaningless unless to an expert user or a
> developer.
I would count myself as a developer, but honestly you need deep
understanding of the type system to make any sense out of this. And a
signature alone without documentation carries not enough information for
the end user.
> I think that help should exist in two forms: console based, and web based.
> And every function or command should have a complete description, and
> copious examples.
Exactly. I think we could very much learn from the Sage project. But
unfortunately, although the ++ docstrings are there, SPAD (in contrast
to python) does not clearly define how docstrings should be written and
structured. (Well, if I'm not completely wrong then they should probably
be formatted in HyperTeX, but who would bother to learn that language?
We should rather aim for RestructuredText or MarkDown. (I'm just praying...)
> Since )help is already used maybe we need another system
> command, say )about, so that for example ")about solve" gives you a list so
> that then ")about solve ode" gives you the help you need. Mind you, I have
> no idea how this would be implemented. Would it be possible to pull all
> the useful information out of spad files into a new "about" directory?
Of course, everything is possible, but I will not touch that )help
command. That's written in BOOT and just gathers its information from
some help files -- in the commercial Axiom those helpfiles were
constructed from the .htex files. I think while I was working on the
book, I even reenabled a part of that conversion. But currently I
wouldn't trust too much what )help provides. Unfortunately, at the
moment the best source of information is the .spad files themselves. :-(
It's manpower what FriCAS is lacking. Ideas and contributions are always
welcome.
Ralf