-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
43 lines (42 loc) · 1.08 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Linq;
using MoreLinq;
using Newtonsoft.Json.Linq;
using MathNet.Symbolics;
using Expr = MathNet.Symbolics.Expression;
using DynamicExpresso;
using NDesk.Options;
using System.Collections.Immutable;
using Microsoft.Z3;
namespace TIO
{
class MainClass
{
public static void Main(string[] args)
{
//MoreLinq
Console.WriteLine(MoreEnumerable.Random().First());
//Newtonsoft
Console.WriteLine(JObject.Parse(@"{""foo"":42}"));
//Mathnet
var x = Expr.Symbol("x");
Console.WriteLine(Infix.Format(x+x));
//DynamicExpresso
Console.WriteLine(new Interpreter().Eval("2+2"));
//NDesk.Options
Console.WriteLine(new OptionSet{
{"v", v=>{}}
}.Parse(new[] {"-v", "foo"})[0]);
//System.Memory
Console.WriteLine(new Span<int>(new[]{42})[0]);
//System.Collections.Immutable
Console.WriteLine(new[]{12}.ToImmutableArray()[0]);
//Microsoft.Z3
try {
Console.WriteLine($"Z3: {Microsoft.Z3.Version.ToString()}");
} catch(DllNotFoundException) {
Console.WriteLine($"Warning, native Z3 library not detected");
}
}
}
}