Intro
Pure has been our in-house C# scripting solution for a few years now.
After experimenting with the well-known CS-Script and some other solutions I can no longer recall, I began experimenting with Roslyn in .NET around 2022/2023, and it's been working well ever since.
Usage
Below is a basic Pure script and its execution:
using static System.Console;
var sum = File.ReadLines("Data.csv")
.Skip(1)
.Select(l => l.Split(','))
.Sum(parts => double.Parse(parts[1]));
WriteLine(sum);

Recap
Version 0.0.3

The first version of Pure was just a simple wrapper around Roslyn. Later, we expanded it to support syntax like Import(MathNet.Numerics). It wasn't until we added native libraries like CSV, ODBC, and CentralSnippets that things started to get interesting.
Motivation
Below is an old table I compiled when first drafting the design document for Pure (1), with some updates to mention newer solutions:

What's Special
Pure 2 is a lightweight C# scripting platform with modern C# 12 syntax and easy NuGet import support. Pure is based on Roslyn. In addition to the base .NET runtime, Pure offers additional libraries for handling common tasks, along with a handy scripting interface (REPL and Notebook) and a place where people can share their snippets.
Pure 2 is conceptually similar to Pure but architecturally very different - it directly builds upon Parcel NExT's Ama runtime (the same runtime used by Divooka). Pure is designed for very short snippets and getting everyday tasks done faster.
Pure 2 uses C# 12 and is similar to top-level statements in C#, with the following features:
- You can define types and functions anywhere in the middle of the script.
- Pure has its own package import behavior (default namespace usage and package lookup rules).
- Default global scope math functions, and default
using for System.IO and System.Linq.
- Top-level function and variable definitions, alongside classes and other common C# constructs.
- Simplifies common tasks even further.
- Macros to support text-based parsing, file inclusion, and module imports.
Features
- Single-word standard package names. One-command NuGet package import and on-the-fly package invocation (through
Import).
- Full compatibility with Divooka packages and Divooka graphs.
- Pure uses
PUREPATH to search for scripts when using Include and when executing script files directly from the command line as the first argument.
- Pure is very lightweight and will always be a thin layer on top of Roslyn/.NET runtime.
- CLI REPL; GUI Notebook.
Basic Syntax
Certain macros/syntax are provided to implement language-level scripting constructs:

Summary
Be aware that adopting a scripting system - any scripting system - comes with significant risks. It's wise to plan carefully and pick the best tools for the task at hand.
References