April 30, 2024, 11:02:54 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Suggestion: MATRIX commands in eBasic

Started by paravantis, December 16, 2006, 01:42:21 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

paravantis

Paul,

Powerbasic (a lesser, of course, version of Basic -as they all are- compared to eBasic) includes some nifty matrix commands such as

MAT a()=b()

which sets the a() array equal to the b() array in one shot (no FOR/NEXT loops).

The full spectrum of matrix commands available is (copied from the HLP file)

Syntax   MAT a1() = CON           'Set all elements of a1() to one

MAT a1() = CON(expr)     'Set all elements of a1() to value of expr
MAT a1() = IDN           'Establish a1() as an identity matrix
MAT a1() = ZER           'Set all elements of a1() to zero
MAT a1() = a2() + a3()   'Addition
MAT a1() = a2()          'Assignment
MAT a1() = INV(a2())     'Inversion
MAT a1() = (expr) * a2() 'Scalar Multiplication

MAT a1() = a2() - a3()   'Subtraction
MAT a1() = a2() * a3()   'Multiplication
MAT a1() = TRN(a2())     'Transposition


Any chances of implementing such simple matrix math in a future version of eBasic?

Other users may want to voice their opinion on how valuable they would consider such an addition.

Best regards
John

Barney

MAT commands definitely get my vote. I've been using them since the 70's when I started using HP Basic and they make writing math and statistical programs a breeze.

Barney

paravantis

Barney,

You piqued my curiosity with your other interesting reference to HP Basic.

Can you elaborate a bit on your experiences with HP Basic? Did it ever run on Windows?

John

GWS

Mmm .. nice .. :)

You can write routines yourself to do those ops, but it would be neater (and faster) if they were built in. :)

Could say the same about complex number operations I suppose .. :P

Oh, and while we're thinking wild thoughts .. how about a Rnn() function to generate random numbers to a Normal distribution, for simulation applications.ÂÃ,  :)

Then we'd have a pretty good set of scientific tools.

Graham

Tomorrow may be too late ..

paravantis

Graham,

Quotehow about a Rnn() function to generate random numbers to a Normal distribution

I have had to write such routines myself (in the context of my SIMULATION METHODOLODY class at the University of Piraeus).

You can download a yabasic version from

http://paravantis.com/random_numbers_12Nov06.yab

that implements many more (continuous) distributions. I am not sure if these should be built in eBasic OR whether we should compile a math library that would come as an extra.

At some point in the future I would like to translate them to eBasic so that I may take advantage of GUI features.

The definitive book to consult on random number generation is

Averill M. Law and W. David Kelton: Simulation Modeling and Analysis, 2nd edition, McGraw-Hill, 1991

and it can be readily found at eBay very cheaply.

Best
John

GWS

Wooh .. thanks for that John ..ÂÃ,  :)ÂÃ,  I wouldn't know how to use some of those functions, but I'm sure they're useful ..

GrahamÂÃ,  :)
Tomorrow may be too late ..

John S

I was planning on writing a set of matrix functions and compiling them into a library using Aurora, but I got side tracked with school (seeking a masters in Civil Engineering).  Next semester, I'm only taking one class, so I plan on doing some programming.  My last final is Dec. 20th in Soil Dynamics, so I hope to start after that.
John Siino, Advanced Engineering Services and Software

erosolmi

December 17, 2006, 12:49:28 AM #7 Last Edit: December 17, 2006, 12:58:01 AM by erosolmi
Quote from: paravantis on December 16, 2006, 01:42:21 PM
(a lesser, of course, version of Basic -as they all are- compared to eBasic)

???
unusefull sentence that didn't add any positive contribution to you request.

"Powerbasic includes some nifty matrix commands such as" would have been perfect.


Ionic Wind Support Team

He is entitled to his opinion.  This is the Ionic Wind support forums and you will find those here prefer Aurora and Emergence over other languages.  Just as those that use Mac's consider Windows to be a lesser version of an operating system  ;D

Ionic Wind Support Team

erosolmi

December 17, 2006, 02:21:12 AM #9 Last Edit: December 17, 2006, 02:30:28 AM by Paul Turley
I would have said the same in PowerBasic forum if the sentence would have been:
"EBasic (a lesser, of course, version of Basic -as they all are- compared to Powerbasic) includes some nifty matrix commands such as"

Every language has its purpose, its strenght and weaknes. Senteces like that are just a way to start flaming.
Also how can a language be more advanced than the other if it lacks some functionalities? Of course it is not, it is just different.
Better been on target: it would be nice to have some direct advanced matrix functionalities in EBasic, isn't it?

And this is just my opinion of course.
Regards

Ionic Wind Support Team

I didn't see anything wrong with his post, and if there was anything wrong with it then our moderators, or myself, would have stepped in to say something.  We do have the final say afterall.


Paul.
Ionic Wind Support Team

Ionic Wind Support Team

Also may I direct you to the posted forum policy here:

http://www.ionicwind.com/forums/index.php/topic,68.0.html

We don't allow advertisements to other products/languages unless you ask permission first, that includes indirect advertisements such as links to competing products.  This is a commercial site and support forum.
Ionic Wind Support Team

splakidas

i vote also positive for MATRIX type commands.  8)

GWS

Erosolmi,

It takes a while for a Forum to bed down, and this one is very new.

If it develops to a similar style as the defunct Pyxia forums - which ran smoothly for many years - it was understood by all that we did not 'criticize' other Basic implementations unduly.

However, 'blowing our own trumpet' was fine. :)ÂÃ,  ÂÃ, So allow us a small bit of showing off our opinion of our own language.
I'm sure no 'flaming' will be found here, because members hold each other in high regard.

I think we all have respect for the many other Basics, which are remarkable achievements in their own right, and rightly have many supporters.ÂÃ,  Many of us own copies of several of them and use them from time to time - so you won't see a great deal of criticism, but sometimes objective comparisons might appear.

So ruffled feathers are not needed - no disrespect was intended I'm sure .. :)

all the best,

Graham
Tomorrow may be too late ..

paravantis

Erosolmi, you have to chill out and avoid starting flaming arguments yourself. I confess that your message made me feel very bad.

My remark "(a lesser, of course, version of Basic -as they all are- compared to eBasic)" was intended as a JOKE and not meant as an insult neither to Powerbasic nor eBasic!

I happen to legally own both eBasic and the PowerBasic Console Compiler and have substantial experience with both of them (although eBasic is a relatively new program, its predecessor iBasic -which I also owned- has been around for a while). In a nutshell, although other Basics may be better in one respect or another, eBasic is an all around winner, probably the best way to program Windows GUIs and amazingly cheap! And the best thing about eBasic is Paul's talents and superhuman efforts to make eBasic a better product and its users happier.

Nevertheless it would be amiss if I ended this message without apologizing to you or anyone else who felt that my facetious comment was in fact derogatory to Powerbasic. Do forgive my somewhat hastily compiled comment (it translated poorly from my Greek culture). It was meant to show how we users of eBasic FEEL about it rather than reflect an objective opinion.

John

barry

I have a feeling that everyone mis-read the "lesser basic" sentence and thought you were disparaging Ebasic.  I'd like to suggest that you all re-read that sentence.

Ebasic was being complimented.

I'm not sure just what has caused the ruffling of tail feathers but it seems that Paravantis has been doing that even though all of his posts have been polite even though his initial post in another thread was critical (politely so).

I personally think you guys should quit this silliness.  In my never-very-humble opinion, you have someone here who's trying pretty hard to be a constructive participant and is doing a pretty good job of it and I think you should be encouraging that.

Barry

paravantis

Barry,

Just a word of appreciation for your message.

Initially I too thought that erosolmi regarded my posting as disparaging eBasic! In fact, I sent a message and then I deleted it immediately!

Then I realized that erosolmi has taken issue with my Powerbasic references and Paul was supportive of the freedom to express views in this forum provided we abide by its rules.

Thanks again for your understanding.

John

Jerry Muelver

Time for a reality check, guys. Hear now the Voice of Ancient Wisdom....  ::)

1. No one would deliberately buy and use a product he knows is inferior.

2. Therefore, everyone here believes the product he has bought and is using is superior to all others.

3. Users of other products similarly believe their choices to be the most rational and above reproach decisions (see #1 above).

4. No one wants his judgment criticized, especially by anyone who is silly enough to have bought a competing product.

5. Appropriate response in social situations is the ultimate measure of civility and maturity.

6. The essence of humor is the unexpected juxtaposition and intersection of contradictory elements.

7. Humor is not universal. Something very funny in one cultural setting could possibly be offensive in another. Remember the Mohammad cartoon riots?

8. Communication is the eliciting of a response. Effective communication is the eliciting of a desired response (see #5, #6, and #7 above).

9. Anyone who disagrees with me is ipso facto unqualified to disagree with me (see #1-8 above).

10. Chill out, relax, and enjoy the company of above -average-intelligent people while you still have the chance (see #9 above).  ;)


GWS

You've been eating those 'funny' pills again Jerry ..ÂÃ,  :) :)

He .. He ..

Graham
Tomorrow may be too late ..

ExMember001

Quote from: Jerry Muelver on December 17, 2006, 11:39:39 AM
Time for a reality check, guys. Hear now the Voice of Ancient Wisdom....  ::)

1. No one would deliberately buy and use a product he knows is inferior.

2. Therefore, everyone here believes the product he has bought and is using is superior to all others.

3. Users of other products similarly believe their choices to be the most rational and above reproach decisions (see #1 above).

4. No one wants his judgment criticized, especially by anyone who is silly enough to have bought a competing product.

5. Appropriate response in social situations is the ultimate measure of civility and maturity.

6. The essence of humor is the unexpected juxtaposition and intersection of contradictory elements.

7. Humor is not universal. Something very funny in one cultural setting could possibly be offensive in another. Remember the Mohammad cartoon riots?

8. Communication is the eliciting of a response. Effective communication is the eliciting of a desired response (see #5, #6, and #7 above).

9. Anyone who disagrees with me is ipso facto unqualified to disagree with me (see #1-8 above).

10. Chill out, relax, and enjoy the company of above -average-intelligent people while you still have the chance (see #9 above).  ;)



funny but really true ;)

Barney

Quote from: paravantis on December 16, 2006, 01:53:16 PM
Barney,

You piqued my curiosity with your other interesting reference to HP Basic.

Can you elaborate a bit on your experiences with HP Basic? Did it ever run on Windows?

John
HP Basic is a pretty old version of BASIC language. I've started using it in 1972/73 on HP2000 mini-computer and then moved onto the version that was running on HP-98xx graphics workstations. The latest versions were also known as HP Mountain Basic or HP Extended Basic but they are all still generically called HP Basic. The language, sadly, died at the same time when the old Hewlett-Packard company philosophy (engineers running the company) has been replaced by the new hp name and the new philosophy where the company is run by everyone else except the engineers. This rant aside, I am happy to report that the language is still alive but is now called HT Basic and is developed and maintained by the TransEra Corp. The language is almost exactly the same and it is still as elegant and powerfull as it was the first day I've tried it. It is not cheap, but then, it is not meant to be used by casual programmers. It runs on Windows and I believe there's a demo available. Check it here.

Barney

paravantis

Barney,

Many thanks for your interesting exposition.

Great minds (like ...ours) think alike! I already have the demo of HT Basic on my laptop; like you I have been thinking "what an interesting language, if only it was cheaper..."!

Friendly regards
John

Rod

December 18, 2006, 10:37:49 AM #22 Last Edit: December 19, 2006, 08:32:27 AM by Rod
John brings up a good point here, which I think is worth some emphasis. Let's ALL allow each other some linquistic leeway, please. John is from Greece, although his English is (in my opinion) most excellent. Others here are from Europe, the U.S., and Australia. That makes for enough differences in dialect and word useage that we should all check back with someone who comes across as offensive. It is most rare, almost unheard-of, in this community for anyone to write something that is initially meant to be offensive.

Getting back to our regularly-scheduled subject ( ;D), I agree that matrix operations would be a good addition to the language, although I wouldn't object to seeing them in an add-on math package, rather than the base language. I'm not sure that I would ever use them, but for those who would use them, it would make Emergence Basic a more-complete programming environment.

I realize, however, that I have no idea how difficult this might be for Paul. As always, his is the final say, and I will not argue with his final judgement on the matter.

paravantis

Rod,

Well said! Kind and wise words for all of us to absorb.

Although I spent the seven BEST years of my life in Chicago (1984 to 1991, doing my MSc and PhD at Northwestern University), I am now stationed back in Greece and your allowing me some leeway with my English would be most generous.

Imagine that Greeks Cypriot (same language, same tradition but perhaps not as flippant as Greeks) occasionally misunderstand and indeed take offense at Greek "humor". To paraphrase what is oftentimes said about poetry, culture is what is lost in translation.

On we go then with eBasic (not forgetting side benefits resulting from its usage, such as ...cultural exchange). Perhaps Paul would care to consider some of the easier to implement matrix commands such as

MAT a()=ZER or 0
MAT a()=3.45
MAT a()=b()


which would set all cells of a() equal to zero, 3.45, b() etc in one shot (obviating the need for FOR/NEXT loops). These might be useful to quite a few people to make their inclusion worth considering; programming them in assembly should be pretty straightforward and their execution almost instantaneous.

Friendly regards to all from sunny Athens,
John

GWS

QuoteFriendly regards to all from sunny Athens

Sigh ..ÂÃ,  ::)

Graham
Tomorrow may be too late ..