Skip to content

jmaxxz/brainmess

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brainmess

This project contains multiple implementations of interpreters and compilers for the language I call Brainmess. (Note, this links to the wikipedia article that describes the language and gives it's real name. The real name may by NSFW.)

I've normally taken the approach that the tape should be "infinite" in both directions and therefore I tend to use a linked list.

I've used this programming exercise during Refactoring study groups, with an emphasis on clean code and testability rather than on efficiency. Therefore, the implementations tend to be more "verbose" than the implementations discussed at the Wikipedia site.

This abstraction presents itself as interfaces an extension methods in C#. In Haskell, I created my own class to break the module circular dependencies. In C I used header files to define modules with different implementations for production and test.

DirectoryDescription
javaA Java implementation. A few unit tests. The Java LinkedList works a little stranger than I expected. I wrote a strange ListTraveler class to adapt the iterator to my needs. Opens up in Eclipse.
csharpA C# implementation. A lot of unit tests. At one point it was 100% code coverage. Some refactorings have left the coverage somewhat less. Opens up in Visual Studio 2010. The code projects will open in MonoDevelop as well. The test projects won't as they are MSTest. I'm considering switching to another code coverage tool so I don't need to use MSTest.
haskellA Haskell implementation. Some unit tests. Compiles with ghc. Just type ghc brainmess.hs to compile.
csrcA C implementation. No unit tests (I plan to try CUnit.) Should compile by just typing make.
scriptsSome sample brainmess programs.
brainmess-dotnet A .net brainmess compiler. No unit tests.

Other implementations that I plan to tackle: C++, Objective C, Javascript.

About

An interpreter for the language called brainf**k

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 44.1%
  • JavaScript 30.5%
  • Java 12.8%
  • Haskell 7.7%
  • C 4.9%