-
-
08 Nov 2008 14:21:48 UTC
- Distribution: Math-Farnsworth
- Module version: 0.5.1
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (0 / 62 / 0)
- Kwalitee
- License: unknown
- Activity
24 month- Tools
- Download (97.67KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Dependencies
- Date::Manip
- List::MoreUtils
- Math::Pari
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Math::Farnsworth - A Turing Complete Language for Mathematics
SYNOPSIS
use Math::Farnsworth; my $hubert = Math::Farnsworth->new(); my $result = $hubert->runString("10 km -> miles"); my $result = $hubert->runFile("file.frns"); print $result;
DESCRIPTION
THIS IS A BETA RELEASE! There are typos in the error messages and in the POD. There are also probably plenty of bugs. It is being released early because there have been a number of people who have shown interest in having it released. Not every feature is documented yet and a future release will have that cleaned up along with some of the hairier parts of the internal API. Math::Farnsworth is a programming language originally inspired by Frink (see http://futureboy.homeip.net/frinkdocs/ ). However due to certain difficulties during the creation of it, the syntax has changed slightly and the capabilities are also different. Some things Math::Farnsworth can do a little better than Frink, other areas Math::Farnsworth lacks.
PREREQUISITS
Modules and Libraries you need before this will work
The PARI library
-
The following are optional
For the Google Translation library
METHODS
ALL of the methods here call
die
whenever something doesn't go right. This means that unless you want bad input to them to cause your program to fail you should wrap any calls to them witheval {}
. When they calldie
they will give you back a message explaining what went wrong, this is useful for telling a user what they have done.runString
This method takes a string (or multiple strings) and executes them as Math::Farnsworth expressions. For more information on making Math::Farnsworth expressions, see Math::Farnsworth::Docs::Syntax.
runFile
This takes a file name and executes the entire file as a single Math::Farnsworth expression.
prettyOut
This takes a Math::Farnsworth::Value and turns it into a string for perl to be able to display. This method WILL disappear in a future version.
EXPORT
None by default.
KNOWN BUGS
At the moment all known bugs are related to badly formatted output, this will be rectified in a future release.
MISSING FEATURES
The following features are currently missing and WILL be implemented in a future version of Math::Farnsworth
Better control over the output
Adjustable precision of numbers
Better defaults for certain types of output
Passing arguments by reference
Syntax tree introspection inside the language itself
Better Documentation
SEE ALSO
Math::Farnsworth::Docs::Syntax Math::Farnsworth::Docs::Functions
There is also an RT tracker for the module (this may change) setup at http://farnsworth.sexypenguins.com/, you can also reach the tracker by sending an email to <farnsworth.rt@gmail.com>
AUTHOR
Ryan Voots <simcop@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2008 by Ryan Voots
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available.
Module Install Instructions
To install Math::Farnsworth, copy and paste the appropriate command in to your terminal.
cpanm Math::Farnsworth
perl -MCPAN -e shell install Math::Farnsworth
For more information on module installation, please visit the detailed CPAN module installation guide.