Jump to content



Photo

Cplua Project: LNA


  • This topic is locked This topic is locked
187 replies to this topic

#81 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 12 February 2006 - 12:59 PM

Mathematica and Maple are the most known PC CASs; however, there are plenty of them, such as MuPAD (also commercial). Among the commercial applications, Mathematica seems to be more powerful and advanced, according to some tests I have made. However, I haven't used Maple for a long time, so I'm not quite sure.


yeah . PAP has the right.

I made some tests and the conclusion is that mathematica is more powerful .
I had a project this term and I wanted to solve a 3 sets of equations each with 2 variables analyticaly. Maple could not solve any of them but mathematica was able.

the answer of one of the equations was 300 pages of A4 size . ( it took 1 minute and 30 seconds on a pentium 4 with RAM 512 and with the required free disk space )
also I checked the answers and they was true.

#82 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 13 February 2006 - 12:44 PM

Hi!
1. What about Matlab?
2. I can't download Lua 0.8C...
Thanks, Bye!

#83 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 13 February 2006 - 03:22 PM

What about Matlab?

I used matlab the previous year . but because I do not like the process which matlab use , ( I mean defining the variables and so on ) , I have not used it anymore . in my mind it is not so user friendly.( although it is not a good reason not to use a sofeware,however it was not satisfyng me)
for example when you want to solve an equation you should write 2 or 3 statements but in softwares like maple or mathematica there is no such a need.( just Solve[ {eqn1,eqn2,...} , {var1,var2,...}] will be enough.)

but matlab as it name says is a math labratory and it has many simulators for different field of studies.
So you should also hear others opinians about this software.

#84 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 13 February 2006 - 03:54 PM

but matlab as it name says is a math labratory

It is rather matrix laboratory :)

#85 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 13 February 2006 - 08:18 PM

It is rather matrix laboratory :)

really?

MicroPro : I think this page says every thing about MATLAB-- click on the items for detail

#86 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 13 February 2006 - 08:28 PM

really?

MicroPro : I think this page says every thing about MATLAB-- click on the items for detail

Really :)
http://www.google.co.....x laboratory"

#87 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 13 February 2006 - 10:35 PM

how about this:
mathematical computing and programing laboratory (see the Reference at the middle)

Mathematical & Statistical Software Laboratory

Mathematical Laboratory Application in Civil and Environmental Engineering

Why study Matlab?

but you are right :
"MATLAB was originally developed to be a "matrix laboratory", written to provide easy access to matrix software developed by the LINPACK and EISPACK projects. Since then, the software has evolved into an interactive system and programming language for general scientific and technical computation and visualization.
The basic MATLAB data element is a matrix. MATLAB commands are expressed in a form very similar to that used in mathematics and engineering. For instance, b = A x, where A, b, and x are matrices, is written "b = A * x". To solve for x in terms of A and b, "x = A\b". There no need to explicitly program matrix operations like multiplication or inversion. For that reason, solving problems in MATLAB is generally much quicker than programming in a high-level language such as C or Fortran."

:lol2:
or maybe we are both right , and "mat" goes for "Matrix" and "Mathematics"

#88 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 13 February 2006 - 11:37 PM

I think I have something to say. Matlab cannot be compared with Mathematica, because they are totally different applications. Mathematica is a CAS environment and programming language, while Matlab is not a CAS, definitely. Symbolic computations are very limited in Matlab, while Mathematica is designed mainly for this; Mathematica is also able to perform numerical computations, but it is slower than Matlab. "A chacun son domain". Note, however, that both Mathematica and Matlab are interpreted languages. This means that a Fortran executable is two (or more) orders of magnitude faster than Mathematica or Matlab. If you need speed in your numerical computations (and who doesn't need speed?), forget Matlab for good.

Like Orwell said, Matlab stands for "MATrix LABoratory". Despite what the sites you mentioned say, Matlab is exactly this. It is simply designed for matrix operations (btw, it seems that Matlab developers have directly copied Fortran 90 features for this). On the other hand, like unique33 said, Matlab is not user friendly, and I have to say that I personally don't like it at all, because it is an expensive commercial program, and because there are several alternatives, which are Open Source projects, such as:
(1) Scilab (http://scilabsoft.inria.fr/). A large mathematical package, and an excellent replacement for Matlab.
(2) Octave (http://www.octave.org/). Large, and quite promising.
(3) Tela (http://www.ava.fmi.fi/prog/tela.html). Small, not-so-easy to install, the opposite to "user friendly", but tremendously fast (in case you didn't noticed it, I said tremendously fast, and I mean it).

#89 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 27 February 2006 - 01:21 AM

LuaNumAn version 1.50 is ready. I'm not releasing it yet, because I'm planning to heavily upgrade the documentation. I realized that the examples included in the "driver" programs are rather lengthy and complicated. Their purpose is to demonstrate all the capabilities of a numerical method, but they are not very useful for the begineer, due to their complexity. So, I decided to add more simple, easily-understandable examples, in order to help the novice LuaNumAn user. Maybe these simple examples will attract more users, who think that using LuaNumAn is difficult. Note that driver programs will remain untouched, since they are still the best way to understand all the capabilities of each LuaNumAn function. I also decided to upgrade the documentation, by adding more examples, practical guidelines, and screenshots, showing LuaNumAn in action.
However, there is a small problem. Currently, CPLua programs cannot be saved as text files, so I cannot add a CPLua program in the documentation. To overpass this problem, I'm planning to add a screenshot of the example code, as in the following screenshots:
Posted ImagePosted ImagePosted Image
(the screenshots show a simple example program for the KroneRoots function, together with the corresponding results). This solution is not perfect, because making an example program so short to fit in one CP screen is a real nightmare, and I may need to add two screenshots, showing the first and the second part of a program. However, it is the only solution I can think, at least for now. I would like to know what do you think about this. Feel free to post alternate solutions, and what you think about such a documentation upgrade. Afterall, I'm not going to spend the time needed for this upgrade, if nobody is interested to read the documentation.

#90 omegavirus

omegavirus

    Casio Freak

  • Members
  • PipPipPipPip
  • 150 posts
  • Gender:Male
  • Location:Morelia, M?xico

  • Calculators:
    ClassPad 300

Posted 27 February 2006 - 02:43 AM

To tell you the true making LuaNumAn more useful for the begineers like me sounds pretty cool because at this time it is dificult to use Lua and then to use LuaNumAn because there is no documentacion at all only LuaNumAn has it and it is the example to another programs who does not have anything. I will wait for it... :D

#91 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 27 February 2006 - 01:24 PM

To tell you the true making LuaNumAn more useful for the begineers like me sounds pretty cool

I'm thinking to add very simple introductory examples, as a start point for the begineer. The idea is to demonstrate basic usage for each LuaNumAn function, without explaining all its capabilities. Currently, "driver" programs are complicated, because they include two examples, trying to demonstrate all the capabilities of each LuaNumAn function.

there is no documentacion at all only LuaNumAn has it and it is the example to another porgrams who does not have anything.

I'm afraid that I cannot understand what you mean.

I will wait for it... :D

If implemented, expect a lengthy LuaNumAn manual, with more than 60 pages...

#92 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 27 February 2006 - 02:14 PM

I also think that it's a good idea; your "driver" programs could be less sophisticated ;)

Btw, if you just want to paste a Lua program into your documentation, you can simply copy it from the emulator :unsure: We could also paste your examples into the emulator, save it in a MCS file, then send it to the ClassPad with CP Manager :)

#93 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 28 February 2006 - 04:16 PM

I also think that it's a good idea; your "driver" programs could be less sophisticated ;)

"driver" programs were written having in mind a CPLua programmer who wants to see a demonstration of all the capabilities of LuaNumAn functions. As such, they are indeed complicated, and a begineer in CPLua (or in Numerical Analysis) may be easily confused. As you suggested, I have added simpler examples, but they do not demonstrate all the capabilities, so "driver" programs will not be removed.

Btw, if you just want to paste a Lua program into your documentation, you can simply copy it from the emulator :unsure: We could also paste your examples into the emulator, save it in a MCS file, then send it to the ClassPad with CP Manager :)

I know, I know, I should use the emulator a little bit more. I decided to add many things to the documentation, and I will use this capability extensively to paste example programs. Beware, documentation for version 1.50 is already 50 pages, and I didn't finished it yet (I have to add many things). With such an extensive documentation, I will be able to answer " :r-t-f-m: " in questions such as "how can I solve a linear system of equations?".

#94 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 15 March 2006 - 09:59 PM

Version 1.50 is out.

I have completed all necessary checks, so LuaNumAn 1.50 is (finally!) released. I was planning to release version 1.50 earlier, but "mieux vaut tard que jamais".
This version has many new features and improvements. Major changes:

(1) Several functions have been rewritten to a more compact code, and modifications in almost all numerical methods have been made, in accordance with the new features of CPLua version 0.8.
(2) Utility functions and constants have been added.
(3) The plotting library LuaPlot has been upgraded. "PlotFunc" and "PlotData" have been improved, and a new function for "infinite" plots has been added ("PlotInf").
(4) A method for solving tridiagonal systems of linear equations has been added ("Tridiag").
(5) A method for performing cubic spline interpolation has been added ("CSpline"). This method can also be used to compute the first and second derivatives.
(6) A method for numerically computing the Jacobian of a multivariate function has been added ("Jacobian").
(7) A method for solving systems of non-linear equations has been added ("Broyden").
(8) The documentation has been reorganized and considerably improved. Example programs have been added for all functions, together with useful remarks, guidelines, and screenshots of LuaNumAn in action. As a consequence, the documentation has now 67 pages.

Two screenshots:
Posted ImagePosted Image
(left: PlotFunc now handles discontinuities; right: cubic spline interpolation to a set of data for sin(x)).

If you are interested, LuaNumAn version 1.50 can be downloaded here, and the new documentation is here.

#95 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 17 March 2006 - 09:18 PM

Wow :)
I hope I will soon find enough time to try it all ^_^

Quick note: a standard printf function was already available in CPLua since CPLua 0.73 :)

#96 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 17 March 2006 - 09:25 PM

The manual is really great .
It,s obvious that you have worked hard for it. (2D forms, examples, figures ,nice Indexing,....)
I printed it today . thanks to you PAP .
no one can reply your works .
I think it is geting to a real book .
( you can publish a real book on Numerical Analysis together with the LuaNamAn project within the next years) :lol:

#97 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 18 March 2006 - 10:55 PM

The manual is really great .
It,s obvious that you have worked hard for it. (2D forms, examples, figures ,nice Indexing,....)
I printed it today . thanks to you PAP .
no one can reply your works .

Thank you very much for your kind remarks. I'm doing my best, and I'm happy to know that someone finds my work useful. I'm also happy to see that you have already published the solution of a problem that needs the new LuaNumAn function "Broyden" :).
Unfortunately, it seems that very few forumers are interested on this project, even though LuaNumAn lets you do things that are otherwise impossible in ClassPad. Anyway, I was not expecting too much interest. I'm doing this as a hobby (at least it's more useful than playing games).

I think it is geting to a real book . ( you can publish a real book on Numerical Analysis together with the LuaNamAn project within the next years) :lol:

That was not my intention, but who knows... B)

Btw, you have probably noticed that boundary value problems are not supported in version 1.50. A method for this is already implemented (if you remember, I used it to solve a problem you have proposed two months ago). However, my current implementation of the boundary value problem solver supports only two-point boundary value problems. I decided to upgrade it to multi-point boundary value problems. This is a much more difficult problem, but yes, it can be implemented in ClassPad (thanks to CPLua, of course). I hope that a method for multi-point problems will be included in version 1.60.

#98 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 18 March 2006 - 11:27 PM

Quick note: a standard printf function was already available in CPLua since CPLua 0.73 :)

Indeed! Don't tell me that you have documented this function and I missed it :blink:. Anyway, I think that a text documenting CPLua in more detail is really necessary, but I know that this will take time.
I will remove "Printf" from LuaUtils, since it is not required anymore. Thanks for your remark.

Btw, it seems that your "printf" implementation follows the "new" standard (introduced 2 years ago, I think). This means that line feed is not added automatically, so the user needs to add a "\n" at the end of the format string, if line feed is required.

#99 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1565 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 19 March 2006 - 12:51 AM

Unfortunately, it seems that very few forumers are interested on this project, even though LuaNumAn lets you do things that are otherwise impossible in ClassPad. Anyway, I was not expecting too much interest. I'm doing this as a hobby (at least it's more useful than playing games).


You should upload/link it to the FileSharing it would have more exposure ;)

#100 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 19 March 2006 - 11:40 AM

Btw, it seems that your "printf" implementation follows the "new" standard (introduced 2 years ago, I think). This means that line feed is not added automatically, so the user needs to add a "\n" at the end of the format string, if line feed is required.

That's right, print is just for basic output, and now printf can be used too for some more "sophisticated" things :) I thought that it would be better to remove the auto line feed for it.

#101 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 06 June 2006 - 05:45 PM

Just some (good) news: Version 1.60 is "ante portas". There are several things added, and I consider this version as a "milestone", in the sense that all functions I was initially planning to include in a ClassPad Numerical Analysis package are present, and well-functioning. The manual has also been further improved :). Hopefully, I will be ready to upload the new version in a few days.

Btw, the project has been renamed from "LuaNumAn" to "LNA" (Lua Numerical Analysis). LuaNumAn est mort(e), vive LNA!
I don't like abbreviations, but they are unavoidable in ClassPad, due to the fact that filenames must be up to 8 characters long. "LuaNumAn" was an abbreviation anyway, and it was a rather ugly one; I always considered that name as temporary. Furthermore, "LNA" prevents confusion with Lua itself: All directories related to this project are now starting with "LNA", instead of "Lua". The examples directory is named "LNAexamp"; the old name, "LuaExamp" was confusing, since CPLua itself includes a directory named "LuaExamp", containing Lua example programs that have nothing to do with this project.

#102 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 12 June 2006 - 03:20 PM

Version 1.60 is out.

LNA version 1.60 includes many improvements and important new functions.
Major changes:
(1) Timing functions have been added (TimeDiff and TimeElapsed).
(2) An implementation of the Newton-Raphson method for computing the root of a function has been added (NewtonR).
(3) A method for performing linear interpolation and extrapolation has been added (LinInterp).
(4) A method for solving boundary-value problems has been added (Shoot). This is the most important new function in version 1.60. Shoot is very powerful; I worked hard for it, but the result is more than satisfactory. Shoot is not restricted to linear problems nor to simple boundary conditions: nonlinear problems, with or without complicated "Robin" boundary conditions can also be solved. For example, solving the Blasius problem, posed by unique33 several months ago, is a piece of cake for Shoot: it is able to solve this problem with great accuracy in less than one minute. In fact, Shoot can solve much more difficult nonlinear problems. I have used this function to solve many boundary value problems which cannot be solved by built-in Mathematica 5.2 functions :greengrin:. The only disadvantage is that Shoot is a very compicated function. However, I have added several examples in the documentation, showing how to use Shoot properly (btw, the documentation has now 83 pages).
(5) A function for testing LNA or CPLua itself has been added (LNAtest). It solves some numerical problems, and checks the results and the computation time. Might be useful for checking integrity of new CPlua versions.

Some screenshots:
Posted Image Posted Image
Left image: solution to the second-order differential equation y''(x)=(x+1)*y(x)+cos(y'(x)), with respect to the boundary conditions y(-2)+y'(-2)=0 and y'(3)=3 (known boundary conditions are marked by non-filled circles; unknown boundary conditions, computed by Shoot, are marked by filled circles).
Right image: solution to the system of three differential equations, y1'(x)=y1(x)-y2(x)+y3(x), y2'(x)=(x^2*y1(x)+y2(x))/(x+y3(x)^2), and y3'(x)=-y1(x)^2*y3(x)-x*y2(x), with respect to the boundary conditions y3(0)=-2, y1(2.5)=3, and y3(2.5)-4*y2(2.5)=0. A really difficult problem.

If you are interested, here is LNA version 1.60, and here is the documentation.

#103 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 12 June 2006 - 06:41 PM

Good news. :)

I guess you managed to make it work correctly without encountering memory crashes... Again sorry for the inconvenience, I hope I will be able to make a pre-release version in a couple of weeks, which will solve the problem you had. :unsure:

Btw, one suggestion for LNA :)
Could you adapt your functions PlotFunc() and PlotData() to draw graphics on a picture, and not directly on the graph window?
My idea is that those functions should accept a picture as argument (yes, one more parameter :rolleyes: ) where the user want the graph to be displayed; then he could draw this pict anywhere :) This would bring a lot of flexibility. The graphics should be adjusted to the picture's size (pict.size() will help), and if no picture is specified, you can use pict.screen() and pict.buffer() to draw on it as if they were simple pictures too ^_^ This shouldn't be too hard to implement, and there would be a lot of new possibilities, especially with the UI package.

Another thing: table.copy() in CPLua 0.9 will perform a deep copy (instead of a shallow copy) by default; then you won't have to copy each line of a matrix individually. The 2 modes (shallow and deep) will stay accessible with an optional argument.

#104 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 12 June 2006 - 07:26 PM

Good news. :)
I guess you managed to make it work correctly without encountering memory crashes... Again sorry for the inconvenience, I hope I will be able to make a pre-release version in a couple of weeks, which will solve the problem you had. :unsure:

Indeed, there are no memory crashes. I managed to reduce the memory footprint considerably, without scarificing performance or accuracy. It was a hard job, but the result is really satisfactory.
Btw, I am preparing a new part of the documentation, "Case Studies", where complex problems taken from physics will be solved in detail. This needs larger Lua programs, combining several LNA functions. I'll wait for CPLua 0.9, since such programs cannot run correctly with current memory leakages. One example is the script "VanDerPo" you already have, which solves the Van der Pol problem using LNA functions.

Btw, one suggestion for LNA :)
Could you adapt your functions PlotFunc() and PlotData() to draw graphics on a picture, and not directly on the graph window?
My idea is that those functions should accept a picture as argument (yes, one more parameter :rolleyes: ) where the user want the graph to be displayed; then he could draw this pict anywhere :) This would bring a lot of flexibility. The graphics should be adjusted to the picture's size (pict.size() will help), and if no picture is specified, you can use pict.screen() and pict.buffer() to draw on it as if they were simple pictures too ^_^ This shouldn't be too hard to implement, and there would be a lot of new possibilities, especially with the UI package.

Good idea! Thanks for the suggestion. I'll do it, although both functions have a large set of optional arguments already. Btw, I was thinking to change the syntax, by moving all optional arguments into a table with named elements. This way "named arguments" can simulated, although Lua does not directly support them. However, compatibility is a huge problem. I have to change all examples, drivers, and my own programs, based on LNA. Not difficult, but boring, and time-consuming.

Another thing: table.copy() in CPLua 0.9 will perform a deep copy (instead of a shallow copy) by default; then you won't have to copy each line of a matrix individually. The 2 modes (shallow and deep) will stay accessible with an optional argument.

Good news. Please, don't forget to inform us for all changes.

#105 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 12 June 2006 - 08:28 PM

Another idea, but this will only be possible with the UI package:
You could create a custom widget to display your graphics :D

Basically, a widget is an area with a background picture, which can receive input events. You can add it to a window (or another widget) and add some other components to it. You can also give it some custom functions and attributes.
As it can capture the pen inputs and contain controls like buttons, you could easily implement some nice features like zoom, windowing, moving the view area with the pen etc :)
Since it would be a simple widget, any user would be able to add it to a window, and integrate it with its own controls ^_^
Note that you would need the modifications I just suggested before, since you would have to draw on the background picture of this widget ;) This does not require any more modifications on PlotFunc and PlotData.

Actually I created the "widget" component by having this kind of things in mind, I thought it would be nice if user libraries also exported some new widgets with predefined behaviours :nod:

#106 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 13 June 2006 - 12:38 PM

Another idea, but this will only be possible with the UI package:
You could create a custom widget to display your graphics :D

Good idea, too. To be honest, LNAplot is just a sub-project. I'm not planning to develop a full plotting package; all I want to do is to visualize results obtained by LNA numerical functions. However, I think that current LNAplot graphics are better than those obtained by built-in CP plotting functions. Adding zooming or rescaling capabilities won't hurt, and it doesn't seem too difficult to implement. Drawing on a widget's background can also be used to add interesting things, such as two separate graphic windows, half screen size each :). However, It all depends on the speed of the ui package. I'll try it when version 0.9 will be released. Afterall, LNA has already a large set of numerical functions, summertime is near, why not to focus on graphics :rolleyes:?

#107 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 16 June 2006 - 12:20 PM

PAP,

Great work! Even I am not a registered forumer, I like your work very much. You really spend a lot of effort on LNA.

I am going to write a paper on CPLua and ClassPad and will feature your LNA. Thank you for the resources.

samuel

#108 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 16 June 2006 - 06:17 PM

Why is the PDF documentation encoded?
I wanted some pages<A[pages|sides]> into the German one translate, however, is no copy possible.
In fact very pitiful.

#109 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 16 June 2006 - 07:12 PM

PAP,
Great work! Even I am not a registered forumer, I like your work very much. You really spend a lot of effort on LNA.

Thank you very much for your kind remarks :).

I am going to write a paper on CPLua and ClassPad and will feature your LNA. Thank you for the resources.
samuel

Glad to know :blink:. Keep in mind that LNA is released under the GNU General Public Licence. I will be happy to know where are you planning to publish such a paper. Whenever your paper will be ready, please send me a copy. I would like to know how my work is used by others. Needless to say that, if you have any question, or any particular problem which seems unsolvable by LNA, I'm here to help :rolleyes:.

Why is the PDF documentation encoded?
I wanted some pages<A[pages|sides]> into the German one translate, however, is no copy possible.
In fact very pitiful.

Indeed, the documentation is encoded. I think it's better that way. Documentation is for reading, not for copying ;). However, you can print it.

#110 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 16 June 2006 - 07:55 PM

Although LNA version 1.60 is very fresh, I'm currently working on the next version. The first thing that has been implemented already is to convert all optional arguments from "positional" to "named" arguments. This adds a lot of flexibility. For example, assume that you have to plot a function f(x) using the LNAplot function PlotFunc. You want to plot the function with a line 2-pixels thick, and with tic labels placed near the corresponding tic. In version 1.60, you should write something like this
PlotFunc(f, {-1,2}, {-2,4}, true, 2, "auto", true, 1)
The first 3 arguments (f, {-1,2}, and {-2,4}) are mandatory. The rest are optional. Among the optional arguments, you really need the second (2), and the last (1). The rest of the optional arguments are not really needed, but you must provide them, because CPLua's system of optional arguments is positional. For example, the last argument corresponds to label position, and it is set to 1. You must enter the first 4 optional arguments, even if you don't need them. In the next LNA version, the above command will be written as
PlotFunc(f, {-1,2}, {-2,4}, {lwidth=2, lblpos=1})
Here, only the optional arguments you want to modify are present: lwidth (line width) and lblpos (label position). I think that this is much more easier than current syntax. Note that optional arguments are now named and should be enclosed in brackets.
The new syntax permits to add even more optional arguments without making things more complex. Such a thing is more or less mandatory, since PlotFunc, for example, has already 8 optional arguments, and I'm planning to add more in the near future (the new optional arguments will add more capabilities). Doing so, and keeping the current syntax is not a good idea.
However, the new syntax has a drawback: you will need to modify all your programs, so that optional arguments will be enclosed in brackets, and they should be named. Note that this affects all LNA functions with optional arguments (not only plotting functions).

If you think that you need the new syntax now, let me know. I can release version 1.61 for this.

#111 Guest_samuel_*

Guest_samuel_*
  • Guests

Posted 16 June 2006 - 09:19 PM

Thank you very much for your kind remarks :).

Glad to know :blink:. Keep in mind that LNA is released under the GNU General Public Licence. I will be happy to know where are you planning to publish such a paper. Whenever your paper will be ready, please send me a copy. I would like to know how my work is used by others. Needless to say that, if you have any question, or any particular problem which seems unsolvable by LNA, I'm here to help :rolleyes:.


I am planning to do a paper on CPLua and how it extend CP as a result of the power of the languange. And as an example, (there are currently none, :P ), I will use LNA. Its the ATCM at Hong Kong but the abstract has not been approved yet.

Thanks for your offer to help. :)

samuel
KL, M'sia

#112 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 17 June 2006 - 12:36 AM

I am planning to do a paper on CPLua and how it extend CP as a result of the power of the languange.

Erm... Good idea, but I guess I should be informed first don't you think? ;)
And I totally disagree when you say that there currently aren't any examples.

#113 omegavirus

omegavirus

    Casio Freak

  • Members
  • PipPipPipPip
  • 150 posts
  • Gender:Male
  • Location:Morelia, M?xico

  • Calculators:
    ClassPad 300

Posted 17 June 2006 - 04:15 AM

I am planning to do a paper on CPLua and how it extend CP as a result of the power of the language. And as an example, (there are currently none, :P ), I will use LNA. It?s the ATCM at Hong Kong but the abstract has not been approved yet.

Thanks for your offer to help. :)

samuel
KL, M'sia


That sounds pretty cool and really there is no one application more powerful than LNA made by PAP 'cause there are many games but they have not documentation but there are two programs made in CPLua for Engineering like CLASSPAD AIDED THERMODYNAMIC TABLES CATT made by unique333 or Selection of Materials and Processes made by omegavirus (whit documentation)...

http://www.casiocalc...opic=2416&st=40

Erm... Good idea, but I guess I should be informed first don't you think? wink2.gif
And I totally disagree when you say that there currently aren't any examples.


You are totally right... :plol:

#114 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 17 June 2006 - 05:06 AM

That sounds pretty cool and really there is no one application more powerful than LNA made by PAP
'cause there are many game but they have not documentation but there are two programs made in
CPLua for Engineering like CLASSPAD AIDED THERMODYNAMIC TABLES CATT made by unique333
or Selection of Materials and Processes made by omegavirus (whit documentation)...

http://www.casiocalc...opic=2416&st=40
You are totally right... :plol:



OK Orwell. It is my responsibility to make it on record that most of my sources are from here in the paper, apart from those in Lua website, when I do write the paper. But what shoud I write at Bibliography...CPLua is a creation of ORWELL of casiocalc?? :P

When I said there is no example I mean:
- I have none because I am a poor programmer albeit with Pascal and Fortran 77 experience so i will not be doing any good program any soon with CP Lua.
- There is no solid utility using CPLua available here that I can find other than LNA. Furthermore, LNA is really extensive...I am not sure whether Casio programmer (Softcalc is different) has study CPLua and LNA before. As a trained mathematician, I know a good utility when I see one. And if they help you employ the Casio CAS in CPLua, that will be amazing.

I think CPLua UI is so easy to operate..a kind of minimalist feel to it. Adding libraries certainly helps make it better but this version 0.8 really useful for new user of ClassPad. And so fast on this tiny machine!

omegavirus,
Thanks for the link to other resources.

Maybe I should register as member.

samuel

#115 Guest_samuel_*

Guest_samuel_*
  • Guests

Posted 17 June 2006 - 05:20 AM

:blink: Wow, unique33's CATT is pretty good too.

One suggestion to unique33 is that to distribute CATT under GNU license, and just use their distribution statement for the software. That way, it is understood the warranty and risk issue is to be borne by users themselve.

samuel

#116 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 17 June 2006 - 08:05 AM

CPLua is a creation of ORWELL of casiocalc?? :P

I am indeed currently responsible for its whole development and implementation. But there are already many people interested in it, and several of them help me in testing CPLua, by developping some Lua projects with it (like LNA, which is the most important).
You must know that CPLua is still in its development phase, and I don't want too many people to be involved in it for now (that's why there aren't many other utilities written for CPLua). When CPLua 1.0 will be ready for release I will make it know as much as I can, but now, this is still too soon.

If you write some paper about my work, I can only see it as a good idea. But I think you should be aware about the exact status of this project, and I'd like to read this text before you publish it. ;)
We would rather continue this discussion in CPLua's main topic btw, since it doesn't only concern LNA but rather CPLua itself.

#117 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 17 June 2006 - 10:33 AM

That sounds pretty cool and really there is no one application more powerful than LNA made by PAP
'cause there are many game but they have not documentation but there are two programs made in
CPLua for Engineering like CLASSPAD AIDED THERMODYNAMIC TABLES CATT made by unique333
or Selection of Materials and Processes made by omegavirus (whit documentation)...

- There is no solid utility using CPLua available here that I can find other than LNA. Furthermore, LNA is really extensive...I am not sure whether Casio programmer (Softcalc is different) has study CPLua and LNA before. As a trained mathematician, I know a good utility when I see one.

Wow, thank you guys.
I would like to say that omegavirus is right, only a few applications developed using CPLua are extensive examples of what you can do with CPLua. I don't want to offend game programmers, I respect their job, but I think they are programming on the wrong machine.

But what shoud I write at Bibliography...CPLua is a creation of ORWELL of casiocalc?? :P

I think the answer is obvious. casiocalc.org is the friendly place we use, extremely useful for the developement of CPLua, LNA, and all other projects. However, developers are responsible for their programs. Hospitality offered by casiocalc.org is more than valuable, but they never asked anything from us (and they do well).

- I have none because I am a poor programmer albeit with Pascal and Fortran 77 experience so i will not be doing any good program any soon with CP Lua.

Well, if you know Pascal and Fortran 77 you are not a poor programmer. You could easily learn CPLua and write something useful on it.
Pascal is a very good programming language; it was ideal for learning programming, because Fortran 77 was very "math-oriented", and C/C++ is definitely not a language for begineers. However, Fortran 90/95 can also be used for educational purposes, so Pascal is not used extensively nowadays; Fortran 77 has been totally superseded by Fortran 90.

Maybe I should register as member.
samuel

Indeed ;).

I'd like to read this text before you publish it. ;)

Me too :rolleyes:.

#118 Guest_samuel_*

Guest_samuel_*
  • Guests

Posted 17 June 2006 - 02:12 PM

I will write the paper as it is ...that is to take CPLua as an experimental project. However, I think by presenting this at ATCM, Casio people will get to see third party project on their priced invention.

I not sure even whether the program committee will OK the full paper later for th eproceedign considerign that most resources are from non-standard channel such as a paper or some academic publication. But if they do, it is great, :)

I will do my best to do CP Lua right but my 2-semester programming knowledge is just that. :)

Anyway to PAP, I will need to write a few programs too for the paper as I need to present example using LNA. Hope I learn CPLua in days for that.

Till then I will first register before any further reply.

samuel

#119 Behnoud

Behnoud

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 338 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    CP 300+ OS2.2/
    FX 3600 pv/
    FX 115 s/
    FX 602P

Posted 18 June 2006 - 05:21 PM

What is wrong with my LNA?
Evrey time I try to run one of the LNAdrive file, it shows this error:
Runtime Error:
attempt to index a string
value
press [<-} or EXE ...

Please help me as soon as posible!
I am looking forward to hearing you.

#120 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 18 June 2006 - 07:04 PM

:huh:
Several things to know:
- Which version of CPLua and LNA are you using?
- Which instruction causes the error? (press [<-] to see the erroneous instruction)


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users