Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Matrix

Reply
Thread Tools

Matrix

 
 
MonkeeSage
Guest
Posts: n/a
 
      09-14-2006
Rick DeNatale wrote:
> I started a detailed reply here but it morphed into a blog article:
> http://talklikeaduck.denhaven2.com/a...es-and-objects
>
> I hope it helps someone.


Thanks Rick, that did help. The point about side-effects dovetails with
Dave's point about predictability.

Regards,
Jordan

 
Reply With Quote
 
 
 
 
Martin DeMello
Guest
Posts: n/a
 
      09-15-2006
On 9/13/06, MonkeeSage <(E-Mail Removed)> wrote:

> I do like Dave's idea about having a named method to do the in place
> modification, though; that would make sure You Really Mean It and
> eliminate the typo where you meant == but actually wrote =.


Paul Graham had an excellent rationale for allowing this sort of thing
in one of his essays on language design :

Hackability
----------------

There is one thing more important than brevity to a hacker: being able
to do what you want. In the history of programming languages a
surprising amount of effort has gone into preventing programmers from
doing things considered to be improper. This is a dangerously
presumptuous plan. How can the language designer know what the
programmer is going to need to do? I think language designers would do
better to consider their target user to be a genius who will need to
do things they never anticipated, rather than a bumbler who needs to
be protected from himself. The bumbler will shoot himself in the foot
anyway. You may save him from referring to variables in another
package, but you can't save him from writing a badly designed program
to solve the wrong problem, and taking forever to do it.

Good programmers often want to do dangerous and unsavory things. By
unsavory I mean things that go behind whatever semantic facade the
language is trying to present: getting hold of the internal
representation of some high-level abstraction, for example. Hackers
like to hack, and hacking means getting inside things and second
guessing the original designer.

Let yourself be second guessed. When you make any tool, people use it
in ways you didn't intend, and this is especially true of a highly
articulated tool like a programming language. Many a hacker will want
to tweak your semantic model in a way that you never imagined. I say,
let them; give the programmer access to as much internal stuff as you
can without endangering runtime systems like the garbage collector.

In Common Lisp I have often wanted to iterate through the fields of a
struct-- to comb out references to a deleted object, for example, or
find fields that are uninitialized. I know the structs are just
vectors underneath. And yet I can't write a general purpose function
that I can call on any struct. I can only access the fields by name,
because that's what a struct is supposed to mean.

A hacker may only want to subvert the intended model of things once or
twice in a big program. But what a difference it makes to be able to.

-- http://www.paulgraham.com/popular.html

 
Reply With Quote
 
 
 
 
Jason Nordwick
Guest
Posts: n/a
 
      09-15-2006


Paul Lutus wrote:
>
> In essence, this article advocates anarchy. The counter-evidence is to ask
> which languages persist, and which fade away. Free-form languages,
> languages that let you do whatever you please, tend to have short lives or
> are quickly rendered incomprehensible because of the very freedoms that
> originally made them appealing (Perl).


This seems to describe Ruby, and many here are very proud of how Ruby lets you redo any primative. I'm confused. Are you saying that Ruby doesn't allow something?

> The longest-lived, most useful
> languages have the strictest syntax and the fewest built-in dodges.
> Example? mathematical notation.
>
> Mathematical notation is extremely strict and slow to change.


Every book has their own mathematical notation. Beyond basic addition a (even then not always well defined when people leave out the vector notation and essentially vectorize the plus operator implicitly). Many math books are notorious for their poor notation and in lacking rigor.


> Apart from
> some recent window dressing, the last significant change was the adoption
> of Liebniz' Calculus notation over that used by Newton in the late 17th
> century. Consequently, mathematical notation has the widest audience of any
> formal symbolic language. And programs that purport to be able to fluently
> read and write mathematical notation are in great demand and fetch high
> prices (Mathematica, Maple, Matlab, IDL).
>


APL is its successor J is essentially defined by Iverson as executable notation, yet APL has almost died off (not a positive in my view), and J -- despite fixing APLs worst misfeatures -- has never really gathered that big of a following. Lisp continues to outlive APL, even if on life support, yet it is hard to classify as strict or loose. In syntax it may be very strict, but in semantics it is very loose.

Language longevity seems to be based on the more nebulous but very real world impact the language makes on its ability to add libraries and functionality without making the language too complex. Perl failed, but C with its simple libraries seems to continue.

-j


 
Reply With Quote
 
M. Edward (Ed) Borasky
Guest
Posts: n/a
 
      09-15-2006
Paul Lutus wrote:
> Mathematical notation is extremely strict and slow to change. Apart from
> some recent window dressing, the last significant change was the adoption
> of Liebniz' Calculus notation over that used by Newton in the late 17th
> century.


Ah, but a variant of Newton's notation is still in wide use for ordinary
differential equations:

y'(x) = y(x); y(0) = 1


> Consequently, mathematical notation has the widest audience of any
> formal symbolic language. And programs that purport to be able to fluently
> read and write mathematical notation are in great demand and fetch high
> prices (Mathematica, Maple, Matlab, IDL).


I wouldn't call Matlab a "symbolic" language, unless it's changed a lot
over the years. And concerning the high prices, there are two or three
open-source Matlab-like environments, Octave being the most well known.
For purely numerical computing with an emphasis on statistics, there is,
of course, R as well.

In the symbolic realm, there is Axiom and Maxima, both open source, in
the general-purpose category. In addition, there are a number of
open-source high-speed special-purpose tools like GiNaC, Pari, GAP, and
Singular.

And let's not forget TeX and mathematical typesetting and the notions of
"literate programming" and "reproducible research". I know there are
some high-priced commercial tools to do this, but most everybody I know
uses things like LyX, TeXmacs, noweb and such rather than "the
high-priced spread". (or Word.)

Finally, I think there's a formal symbolic language with a wider
audience than mathematics. Can you guess what it is? I'll give you a
hint -- Google for "lilypond".

 
Reply With Quote
 
M. Edward (Ed) Borasky
Guest
Posts: n/a
 
      09-15-2006
Jason Nordwick wrote:
> Language longevity seems to be based on the more nebulous but very real
> world impact the language makes on its ability to add libraries and
> functionality without making the language too complex. Perl failed, but
> C with its simple libraries seems to continue.

In what sense(s) has Perl "failed?" I still use it almost daily, and
will continue to do so until I'm paid to use something else.

 
Reply With Quote
 
Jason Nordwick
Guest
Posts: n/a
 
      09-15-2006
I haven't seen a new Perl project started in a long time. All Perl work I see being done is legacy code. If Perl 6 is as complex as it appears it is going to be, I think the language will be on life support.

-j


M. Edward (Ed) Borasky wrote:
> Jason Nordwick wrote:
>> Language longevity seems to be based on the more nebulous but very real
>> world impact the language makes on its ability to add libraries and
>> functionality without making the language too complex. Perl failed, but
>> C with its simple libraries seems to continue.

> In what sense(s) has Perl "failed?" I still use it almost daily, and
> will continue to do so until I'm paid to use something else.
>



 
Reply With Quote
 
MonkeeSage
Guest
Posts: n/a
 
      09-15-2006
It's interesting that the most syntactically simple and absolute
languages, e.g., dialects of Lisp and ML, are usually the most
reflective and expressive.

let anarchy = higher-level-order in
programming languages;;



 
Reply With Quote
 
znmeb@cesmail.net
Guest
Posts: n/a
 
      09-16-2006
Quoting Paul Lutus <(E-Mail Removed)>:

> I hope for an eventual decent open-source symbolic math processor. There was
> one (the name of which escapes me at the moment), but it is presently
> abandonware.


The only one that is more or less abandoned that I recall is MuPAD, and that was
abandoned by the community because the developer refused to open the package up.
The base version is/was free as in beer but the full version was free in neither
sense.

Axiom is decidedly active; check out

http://wiki.axiom-developer.org/FrontPage

and

http://portal.axiom-developer.org/

> I am personally spoiled by Mathematica, and, not being a particularly
> skilled mathematician, perhaps to a fault.


Depending on the type of physicist you are, there are quite a few open-source
specialty packages. And while not strictly open source, if you're a teacher or
a student, you can usually get software on an "academic license". It's free to
other academics but they expect industrial users to pay for it. In my area,
computer performance modeling, there is a lot of "academic-licensed" software
but only a few good ones are truly open source. Which is why I went down the
Ruby path in the first place for Rameau.

http://rubyforge.org/cgi-bin/viewvc....u/?root=cougar

> I wouldn't have guessed musical notation without help, but I agree, it meets
> the definition, and, until the invention of the car radio, it was more
> widely used than mathematical notation.


Actually, just about every middle class home in America had a piano before radio
and the phonograph. I think there are still a lot more people who can read music
than there are who can read a PDE textbook.

 
Reply With Quote
 
Dido Sevilla
Guest
Posts: n/a
 
      09-17-2006
On 9/16/06, http://www.velocityreviews.com/forums/(E-Mail Removed) <(E-Mail Removed)> wrote:
> Quoting Paul Lutus <(E-Mail Removed)>:
>
> > I hope for an eventual decent open-source symbolic math processor. There was
> > one (the name of which escapes me at the moment), but it is presently
> > abandonware.

>


I believe you missed one: Maxima.

http://maxima.sourceforge.net/

It is ultimately descended from MACSYMA, which is the most venerable
of all computer algebra systems, and from what I can see it's
definitely not abandoned (considering that the last official release
was in 2005). I've used it and it's probably the closest Free
alternative to Mathematica or Maple.

 
Reply With Quote
 
znmeb@cesmail.net
Guest
Posts: n/a
 
      09-17-2006
Quoting Dido Sevilla <(E-Mail Removed)>:

> On 9/16/06, (E-Mail Removed) <(E-Mail Removed)> wrote:
> > Quoting Paul Lutus <(E-Mail Removed)>:
> >
> > > I hope for an eventual decent open-source symbolic math processor. There

> was
> > > one (the name of which escapes me at the moment), but it is presently
> > > abandonware.

> >

>
> I believe you missed one: Maxima.
>
> http://maxima.sourceforge.net/
>
> It is ultimately descended from MACSYMA, which is the most venerable
> of all computer algebra systems, and from what I can see it's
> definitely not abandoned (considering that the last official release
> was in 2005). I've used it and it's probably the closest Free
> alternative to Mathematica or Maple.

I actually noted Maxima in my first post. I think Maxima is a good bit simpler
than Axiom, if that matters ... a shorter learning curve for Maxima. But I
think Axiom is ultimately more powerful. Both are indeed active.
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Matrix operations on character matrix element? Robert Kern Python 0 04-02-2009 12:27 AM
Re: Matrix operations on character matrix element? Terry Reedy Python 0 04-02-2009 12:12 AM
Matrix*Vector and Vector*Matrix Holgerson C++ 3 10-26-2007 07:38 AM
Matrix composed by two matrix lvcargnini VHDL 3 07-05-2006 07:21 AM
Re: Matrix DTS and Matrix 2 DTS? PeterTHX DVD Video 0 08-03-2003 05:46 AM



Advertisments