Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/AI_Brain / daemon/seed_language.cs |
| Date | Not specified in source |
| Repository | Janady13/AI_Brain |
| Revision | 6d0767aad08781eb5c4e1eb14a42ec92c437be78 |
| Branch | copilot/convert-python-files-to-csharp |
| Path or archive member | daemon/seed_language.cs |
| Original SHA-256 | 2e836c4efb44da3f6653cca70d794025e238ad2d97839a5da2fa55011fd44488 |
| Git blob SHA | 268f4dbc9c683ca9ecf490d32c4e35a76aa91d3d |
| Reading-copy SHA-256 | 2e836c4efb44da3f6653cca70d794025e238ad2d97839a5da2fa55011fd44488 |
Recovered source transcript
Download complete source text ↓87 lines · 3.1 KB
// Generate 500 distinct language construct descriptions
using System;
using System.Collections.Generic;
namespace AIBrain.Daemon
{
public static class SeedLanguage
{
public static IEnumerable<string> GenLanguage(int n)
{
var constructs = new[]
{
"algebraic data types", "pattern matching", "type inference", "higher-kinded types",
"typeclasses", "traits", "interfaces", "generics", "lifetimes", "borrow checker",
"monads", "applicatives", "functors", "effects system", "capability-based security",
"linear types", "dependent types", "gradual typing", "refinement types", "row polymorphism",
"async/await", "coroutines", "green threads", "actors", "channels",
"CSP-style concurrency", "STM transactions", "lock-free structures", "immutability by default",
"pattern guards", "do notation", "pipelines", "macros (hygienic)", "macro_rules",
"procedural macros", "compile-time evaluation", "const generics", "metaprogramming",
"zero-cost abstractions", "move semantics", "ownership model", "sum types", "product types"
};
var domains = new[]
{
"systems programming", "web services", "data processing", "numerical computing",
"distributed systems", "embedded", "graphics", "machine learning", "blockchain",
"scripting", "desktop apps", "mobile"
};
var extras = new[]
{
"with borrow-checking", "with region-based memory", "with green-thread scheduler",
"with capability tokens", "with staged compilation", "with partial evaluation",
"with ownership transfer", "with structural typing", "with nominal typing",
"with effect handlers", "with delimited continuations"
};
var seen = new HashSet<string>();
int i = 0;
foreach (var c in constructs)
{
foreach (var d in domains)
{
var phrase = $"Language construct: {c} for {d}";
if (seen.Contains(phrase))
continue;
seen.Add(phrase);
yield return phrase;
i++;
if (i >= n)
yield break;
}
}
if (i < n)
{
foreach (var c in constructs)
{
foreach (var e in extras)
{
var phrase = $"Language construct: {c} {e}";
if (seen.Contains(phrase))
continue;
seen.Add(phrase);
yield return phrase;
i++;
if (i >= n)
yield break;
}
}
}
}
public static void Main(string[] args)
{
SeedCommon.RunSeed("language", GenLanguage);
}
}
}