Skip to content

Instantly share code, notes, and snippets.

Avatar

Miguel de Icaza migueldeicaza

View GitHub Profile
View gist:630331ecb44dcec3aa815a7dca6eaeee
diff --git a/mcs/mcs/cs-parser.jay b/mcs/mcs/cs-parser.jay
index bb2bd6e..a41ae23 100644
--- a/mcs/mcs/cs-parser.jay
+++ b/mcs/mcs/cs-parser.jay
@@ -3222,6 +3222,20 @@ type_expression
$$ = new ComposedCast ((ATypeNameExpression) $1, (ComposedTypeSpecifier) $2);
}
| builtin_type_expression
+ | tuple_type
+ ;
View gist:fef5f0ced7bb866c9232
using Mono.CSharp;
class X {
static void Main ()
{
var a = new
Evaluator (new CompilerContext (new CompilerSettings (), new ConsoleReportPrinter ()));
a.Run ("System.Console.WriteLine (true);");
}
}
@migueldeicaza
migueldeicaza / gist:cd99938c2a4372e7e5d5
Created Sep 8, 2015
Probing for events having a single callback on .NET and Mono
View gist:cd99938c2a4372e7e5d5
const BindingFlags SEARCH_FLAGS = BindingFlags.NonPublic | BindingFlags.Instance;
var hasSingleTargetMethod = typeof(MulticastDelegate).GetMethod("InvocationListLogicallyNull", SEARCH_FLAGS) ??
typeof(MulticastDelegate).GetMethod("get_HasSingleTarget", SEARCH_FLAGS);
if (hasSingleTargetMethod != null)
HasSingleTarget = (HasSingleTargetFn)Delegate.CreateDelegate(typeof(HasSingleTargetFn), hasSingleTargetMethod, true);
else // gracefull degradation
HasSingleTarget = md => md.GetInvocationList().Length == 1;
// ...
View gist:ae2a3ebf289169d413dc
diff --git a/Clang/Ast/CXXRecordDecl.cs b/Clang/Ast/CXXRecordDecl.cs
index 6acc7b3..16f5453 100644
--- a/Clang/Ast/CXXRecordDecl.cs
+++ b/Clang/Ast/CXXRecordDecl.cs
@@ -19,6 +19,13 @@ namespace Clang.Ast
public extern bool IsDerivedFrom (CXXRecordDecl baseDecl);
[MethodImpl (MethodImplOptions.InternalCall)]
+ extern int GetAbstract ();
+
View gist:ab2e99f5c5e195843071
diff --git a/external/rx b/external/rx
--- a/external/rx
+++ b/external/rx
@@ -1 +1 @@
-Subproject commit 00c1aadf149334c694d2a5096983a84cf46221b8
+Subproject commit 00c1aadf149334c694d2a5096983a84cf46221b8-dirty
diff --git a/mcs/mcs/Makefile b/mcs/mcs/Makefile
index d2aa50e..8999939 100644
--- a/mcs/mcs/Makefile
+++ b/mcs/mcs/Makefile
View gist:9897732
### Keybase proof
I hereby claim:
* I am migueldeicaza on github.
* I am migueldeicaza (https://keybase.io/migueldeicaza) on keybase.
* I have a public key whose fingerprint is 161C 35A0 6E68 E3E4 C084 64F9 A0AB BD0B 56B7 D30A
To claim this, I am signing this object:
View gist:9755409
You appear to be advocating a new:
[ ] cloud-hosted [ ] locally installable [ ] web-based [ ] browser-based [ ] language-agnostic
[ ] language-specific IDE. Your IDE will not succeed. Here is why it will not succeed.
You appear to believe that:
[ ] Syntax highlighting is what makes programming difficult
[ ] Garbage collection is free
[ ] Computers have infinite memory
[ ] Nobody really needs:
@migueldeicaza
migueldeicaza / gist:7594491
Last active Dec 29, 2015
For David Fowler
View gist:7594491
These instructions will get you Mono compiled from source.
Requirements:
Xcode installed
Command Line Tools installed (part of Xcode)
Then, create a text file with the contents of everything after "=====", save it as "build.sh" in your home directory
Open a terminal window, and type this in your shell:
View gist:7223500
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{B5035C41-148D-4376-87D0-48DB7E61A991}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
View gist:7223447
Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.18051]
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe /v:diag .\AndroidApplication3.sln
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 10/29/2013 6:01:37 PM.
Environment at start of build:
ALLUSERSPROFILE = C:\ProgramData
ANDROID_NDK_PATH = C:\Program Files\Android\ndk\android-ndk-r8d