Skip to content

Instantly share code, notes, and snippets.

@embix
embix / KSP_kRPC_spike
Created January 5, 2018 01:10
try suborbital flight in KSP controlled via kRPC, tested in LINQPad with GDLV3 (Stock)
// fetch Google.Protobuf and KRPC.Client from nuget gallery
// namespace imports:
//KRPC.Client
//KRPC.Client.Services.SpaceCenter
//System
// removed due to ambiguity with linq expressions: KRPC.Client.Services.KRPC
// based on https://krpc.github.io/krpc/tutorials/suborbital-flight.html, LGPL
class SubOrbitalFlight
{
@embix
embix / KSP_kRPC_GDLV3_KEO.cs
Last active January 5, 2018 02:44
Kerbal Space Program: get GDLV3 into low Kerbin orbit, release payload and deorbit booster (works but needs tuning: final orbit of payload was 72720m/118675m), tested in LINQPad
// fetch Google.Protobuf and KRPC.Client from nuget gallery
// namespace imports:
//KRPC.Client
//KRPC.Client.Services.SpaceCenter
//System
// removed due to ambiguity with linq expressions: KRPC.Client.Services.KRPC
class GDLV3_To_KEO
{
public static readonly System.Net.IPAddress kspKrpcServer = System.Net.IPAddress.Parse("ipv4/ipv6 of KSP with kRPC");
let isEmpty (sc:IEnumerable<Char>) =
//Seq.isEmpty (sc)
sc.Contains('4')
let input =
Enumerable.Range(1,6)
|> Seq.map (fun (i) -> (i.ToString(),i))
|> Seq.map (fun (s,i) -> (s |> Seq.map id,i))
let output =
Command line (with current working directory = .):
/usr/bin/perl ./Configure linux-x86_64 --prefix=/usr --openssldir=/etc/ssl --libdir=lib shared zlib-dynamic
Perl information:
/usr/bin/perl
5.30.0 for x86_64-linux-thread-multi
@embix
embix / playground.rs
Last active November 23, 2019 15:13 — forked from rust-play/playground.rs
Rust Playground: Tutorial Copy/Borrowing/Ownership/Lifetimes/Move-Semantik/Affine Typsysteme
// Super schnelles Anfänger Tutorial Copy/Borrowing/Ownership/Lifetimes/Move-Semantik/Affine Typsysteme
fn main() {
//schritt1(); // Ownership
//schritt2(); // Move-Semantik, Affines Typsystem und Copy
//schritt3(); // Borrowing
//schritt4(); // Lifetimes
}