Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^6: What will scientific computing in Perl 6 look like?

by TimToady (Parson)
on Jul 15, 2008 at 16:31 UTC ( [id://697756]=note: print w/replies, xml ) Need Help??


in reply to Re^5: What will scientific computing in Perl 6 look like?
in thread What will scientific computing in Perl 6 look like?

I believe the book's qualms about calling that a solution involve the possibility of a combinatorial explosion if the language forces you do define all possible pairings, and the opacity and artificial stupidity of the solution if the computer is attempting to use artificial intelligence to second-guess the programmer's ideas of what should be intuited when types are not arrangeable in a simple "tower".

Of course, this does not stop us from trying to solve the problem anyway... :)

  • Comment on Re^6: What will scientific computing in Perl 6 look like?

Replies are listed 'Best First'.
Re^7: What will scientific computing in Perl 6 look like?
by tilly (Archbishop) on Jul 15, 2008 at 23:45 UTC
    Exactly.

    If you limit yourself to a few numeric types, the problem won't seem to be that big a deal. If you know the long list of numeric types that mathematicians have (including many number of parametrized families of numeric types), it starts to become harder. Particularly when the answer has to be a different type than either operand (eg a Gaussian integer plus a rational number is generally a Gaussian rational).

      I think that's a problem with mathematics, not with programming languages. When you define a new type of number, and you want to be able to use it in arithmetic operations with other numbers, you have to define what the outcome will be.

      Mathematicians are a bit sloppy about this sometimes because they except you to know what the right thing is, but if they aren't sloppy have to go through the same motions as somebody who writes a class for a new numeric type in Perl 6.

      So of course you are right in the sense that Perl 6 doesn't solve a problem that's not yet solved in mathematics, but I think it might be a bit too optimistic to really expect that ;-)

      Of all the Perl programs written, how many will use Gaussian numbers?

      Or look at it another way. How many Perl programs will make use of all that "long list of numeric types that mathematicians have"?

      The vast majority of Perl programs will use nothing more than the basics, and the few that do will each probably only use one or two of those exotics. So long as whatever packages are used to provide the required conversions between the exotic types they implement and one of the built in basic types, where applicable, everyone is happy.

      Conclusion: The theoretical problem of a combinatorial explosion of type conversions never arises.

        There is a chicken and an egg problem here. It is difficult to write a good package in Perl to manipulate various numerical types. Nobody has written such a package in Perl. You don't see people trying to use such a package. These all feed back on each other.

        If we had a good package for manipulating different numerical types in Perl, who can say who would come out of the woodwork to use it? If it was easy to write it, do you think that someone would have put it on CPAN? Have you seen how many Math:: modules there are? Many for things that you'd never expect to see people use in Perl?

Re^7: What will scientific computing in Perl 6 look like?
by zentara (Archbishop) on Jul 15, 2008 at 16:45 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://697756]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-16 04:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found