Git Product home page Git Product logo

language-befunge's Introduction

NAME

Language::Befunge - a generic funge interpreter

VERSION

version 5.000

SYNOPSIS

use Language::Befunge;
my $interp = Language::Befunge->new( { file => 'program.bf' } );
$interp->run_code( "param", 7, "foo" );

Or, one can write directly:
my $interp = Language::Befunge->new;
$interp->store_code( <<'END_OF_CODE' );
< @,,,,"foo"a
END_OF_CODE
$interp->run_code;

DESCRIPTION

Enter the realm of topological languages!

This module implements the Funge-98 specifications on a 2D field (also called Befunge). It can also work as a n-funge implementation (3D and more).

This Befunge-98 interpreters assumes the stack and Funge-Space cells of this implementation are 32 bits signed integers (I hope your os understand those integers). This means that the torus (or Cartesian Lahey-Space topology to be more precise) looks like the following:

            32-bit Befunge-98
            =================
                    ^
                    |-2,147,483,648
                    |
                    |         x
        <-----------+----------->
-2,147,483,648      |      2,147,483,647
                    |
                   y|2,147,483,647
                    v

This module also implements the Concurrent Funge semantics.

PUBLIC METHODS

new( [params] )

Call directly the Language::Befunge::Interpreter constructor. Refer to Language::Befunge::Interpreter for more information.

BUGS

Although this module comes with a full set of tests, there may be subtle bugs remaining - or maybe I misinterpreted the Funge-98 specs. Please report any bugs or feature requests to "bug-language-befunge at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Language-Befunge>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

Here is a list of known "bugs", coming from the specs:

  • o

    About the 18th cell pushed by the y instruction: Funge specs just tell to push onto the stack the size of the stacks, but nothing is said about how user will retrieve the number of stacks.

  • o

    About the load semantics. Once a library is loaded, the interpreter is to put onto the TOSS the fingerprint of the just-loaded library. But nothing is said if the fingerprint is bigger than the maximum cell width (here, 4 bytes). This means that libraries can't have a name bigger than 0x80000000, ie, more than four letters with the first one smaller than P (chr(80)).

    Since perl is not so rigid, one can build libraries with more than four letters, but perl will issue a warning about non-portability of numbers greater than 0xffffffff.

ACKNOWLEDGEMENTS

I would like to thank Chris Pressey, creator of Befunge, who gave a whole new dimension to both coding and obfuscating.

Thanks also to Matti Niemenmaa for his mycology test suite, available at http://users.tkk.fi/~mniemenm/befunge/mycology.html

SEE ALSO

You can find more information on Befunge at http://www.catseye.mb.ca/esoteric/befunge/.

Our git repository is located at https://github.com/jquelin/language-befunge.

You can also look for information on this module at:

AUTHOR

Jerome Quelin

COPYRIGHT AND LICENSE

This software is copyright (c) 2003 by Jerome Quelin.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.