Write Funge-98 once, call it as a C# method.
using Esolang.Funge;
Console.WriteLine(FungeSample.HelloWorld());
partial class FungeSample
{
// File-based
[GenerateFungeMethod("Programs/hello.b98")]
public static partial string HelloWorld();
// Or inline — no .b98 file needed
[GenerateFungeMethod(InlineSource = "64+\"!dlroW ,olleH\">:#,_@")]
public static partial string HelloWorldInline();
}
// output:
// Hello, World!
// Hello, World!For detailed Generator signatures and patterns, see:
| Attribute Argument | partial Method Parameters (Input) |
partial Method Return Types (Output) |
|---|---|---|
string (Path/Inline) |
TextReader?, PipeReader?, byte[]? |
void, string, string?, int, Task, ValueTask, IEnumerable<byte>, IAsyncEnumerable<byte> |
For runnable examples, see:
| Area | Status |
|---|---|
| Core Funge-98 instructions | ✅ |
3D navigation (h l m) |
✅ |
| Coordinates and storage space | ✅ 3D (X,Y,Z) |
Fingerprint load/unload (( )) |
✅ Full dispatch (requires fingerprint registration) |
Fingerprint instructions (A–Z) |
✅ Dispatched when fingerprint loaded; reflects otherwise |
File I/O (i o) |
✅ |
System exec (=) |
✅ |
System info (y) |
✅ |
Details:
- Parser behavior and space model: Parser README
- Runtime execution and instruction compliance: Processor README
- Generated runtime subset and limitations: Generator README
- CLI behavior and scope: Interpreter README
Built-in fingerprints shipped with this repository:
| Fingerprint | Handprint | Package | Status |
|---|---|---|---|
NULL |
0x4E554C4C |
Esolang.Funge.Abstractions | ✅ All 26 instructions reflect |
FILE |
0x46494C45 |
Esolang.Funge.Fingerprints.File | ✅ C D G M O P R S W |
To register fingerprints with the Generator, use [FingerprintsProvider] — see Generator README.
dotnet add package Esolang.Funge.Generator
dotnet add package Esolang.Funge.Parser
dotnet add package Esolang.Funge.Processor
dotnet tool install -g dotnet-funge| Want to do | Package |
|---|---|
| Generate C# methods from Funge-98 at compile time | Esolang.Funge.Generator |
Parse source into a FungeSpace |
Esolang.Funge.Parser |
| Execute Funge-98 in-process | Esolang.Funge.Processor |
| Implement or use built-in fingerprints | Esolang.Funge.Abstractions |
| Use FILE fingerprint (file I/O) | Esolang.Funge.Fingerprints.File |
| Run Funge-98 from CLI | dotnet-funge |
| Project | NuGet | Summary |
|---|---|---|
| dotnet-funge | Funge-98 command-line interpreter. | |
| Esolang.Funge.Generator | Funge-98 source generator. | |
| Esolang.Funge.Parser | Funge-98 source parser. | |
| Esolang.Funge.Processor | Funge-98 execution engine. | |
| Esolang.Funge.Abstractions | Fingerprint abstractions and built-in fingerprints. | |
| Esolang.Funge.Fingerprints.File | FILE fingerprint (file I/O). |
| Project | Target frameworks |
|---|---|
| Esolang.Funge.Generator | netstandard2.0 |
| Esolang.Funge.Parser | net8.0, net9.0, net10.0, netstandard2.0 |
| Esolang.Funge.Processor | net8.0, net9.0, net10.0 |
| Esolang.Funge.Abstractions | netstandard2.0, netstandard2.1, net10.0 |
| Esolang.Funge.Fingerprints.File | netstandard2.0, netstandard2.1, net10.0 |
| dotnet-funge | net8.0, net9.0, net10.0 |
This project is licensed under the MIT License - see the LICENSE file for details.