Sing#
1 program
Added 2026-02-24T11:24:58Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled
Evidence
Report issue
View issues
Aliases: Sing Sharp, SingSharp
Provenance: commit 817bd2e79d · authored 2026-02-24T12:25:30+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
2 sources · pl_id:
pl/sing-sharpRelated languages
LLM-contributed programs
PingPong Channel Communication
Provenance: commit 817bd2e79d · authored 2026-02-24T12:25:30+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
///////////////////////////////////////////////////////////////////////////////
//
// Microsoft Research Singularity
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Note: Simple ping-pong test child app #1
//
using Microsoft.SingSharp;
using Microsoft.SingSharp.Runtime;
using Microsoft.Singularity;
using Microsoft.Singularity.Diagnostics.Contracts;
using Microsoft.Singularity.Channels;
using Microsoft.Singularity.Directory;
using Microsoft.Singularity.PingPong.Contracts;
using System;
using System.Diagnostics;
using Microsoft.Singularity.Io;
using Microsoft.Singularity.Configuration;
using Microsoft.SingSharp.Reflection;
using Microsoft.Singularity.Applications;
[assembly: Transform(typeof(WebAppResourceTransform))]
namespace Microsoft.Singularity.PingPong
{
[Category("PingPong")]
internal sealed class Parameters
{
[Endpoint]
public readonly TRef<PingContract.Exp:Start> pingRef;
reflective private Parameters();
}
public class ChildPing
{
internal static int AppMain(Parameters! config)
{
PingContract.Exp conn = ((!)config.pingRef).Acquire();
if (conn == null) {
throw new Exception("ChildPing: Unable to acquire handle to the Ping Contract");
}
// Start up and connect to the ChildPong image!
PongContract.Imp! childImp;
PongContract.Exp! childExp;
PongContract.NewChannel(out childImp, out childExp);
string[] args = new string[1];
args[0] = "ChildPong";
Process child = new Process(args, (Endpoint * in ExHeap)childExp);
child.Start();
childImp.RecvPongReady();
conn.SendPingReady();
try {
while (true) {
switch receive {
case conn.StartPingPong(int numReps):
for (int i = 0; i < numReps; ++i) {
int data;
childImp.SendPing(42);
childImp.RecvPong(out data);
}
conn.SendDone();
break;
case conn.ChannelClosed():
return -1;
}
}
}
finally {
delete conn;
delete childImp;
}
return 0;
}
}
}
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)