Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Language::FP 0.03

    Download button

    No screenshots available
    Downloads: 845  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Sean O'Rourke | More programs
    Perl Artistic License / FREE
    November 10th, 2007, 22:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Language::FP description

    An implementation of John Backus' FP language.

    Language::FP is an implementation of John Backus' FP language, a purely functional language remarkable for its lack of named variables -- only functions have names.

    SYNOPSIS

    use Language::FP qw/perl2fp/;

    # Sum of the first 12 integers:
    my $sum = fp_eval '/+ . iota:12'
    print perl2fp($result);
    # prints '< 78 >'

    # Matrix-vector product:
    fp_eval 'def Ax = @(+ . @* . trans) . distr';
    my @mv = ([[1, 2], [3, 4]], [5, 6]);
    print perl2fp(fp_eval('Ax:' . perl2fp(@mv)));
    # prints '< 17 39 >'

    # Cross-language calls:
    print join ', ', Ax(@mv);
    # prints '17, 39'

    sub cubes { map { $_ ** 3 } @_ }
    print perl2fp(fp_eval 'cubes:< 1 2 3 >');
    # prints '< 1 8 27 >'

    fp_eval in => *INPUT, out => *OUTPUT;


    Note that this is not a deliberately obfuscated language -- it was designed for actual users (probably mathematicians). Since Perl's $calars, @rrays and %ashes advertise themselves so boldly, I thought programming in a language whose author thought that named variables led only to confusion and error would be eye-opening. I now know why every language since has had named variables.

    While at some point I should probably include a brief FP tutorial, for the moment please see http://www.cse.sc.edu/~bays/FPlink for more information on the language's history and basic functions. There are a number of subtle syntactic variants of FP described and implemented on the web. This unfortunate state of affairs is due at least in part to the original language's use of non-ASCII characters. This package uses a hybrid chosen to be somewhat: (1) legible, (2) faithful to the original, and (3) predictable to those familiar with Perl.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    FP language | FP implementation | Perl module | FP | language | implementation

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM