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 (string, TextReader, PipeReader, TextWriter, PipeWriter, sync/async returns, byte-sequence returns, inline source), see:
For runnable examples covering all return types and inline source, see:
dotnet add package Esolang.Funge.Generator
dotnet add package Esolang.Funge.Parser
dotnet add package Esolang.Funge.Processor
dotnet tool install -g dotnet-funge --prerelease| 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 |
| 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. |
| 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 |
| dotnet-funge | net8.0, net9.0, net10.0 |