This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.1.0", | |
"command": "cargo", | |
"isShellCommand": true, | |
"tasks": [ | |
{ | |
"taskName": "build", | |
"isBuildCommand": true, | |
"showOutput": "always", | |
"problemMatcher": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::ffi::OsString; | |
use std::os::windows::ffi::OsStrExt; | |
#[link(name = "user32")] | |
extern "stdcall" { | |
fn MessageBoxW(hwnd: *mut (), message: *const u16, title: *const u16, kind: u32); | |
} | |
struct LPCWSTR { | |
str: Vec<u16> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro_rules! query { | |
($($tokens:tt)*) => { | |
query_from!($($tokens)*) | |
}; | |
} | |
macro_rules! query_from { | |
(from $context:pat => $source:expr, $($remainder:tt)+) => { | |
query_from!($source, $context => $($remainder)+) | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro_rules! update { | |
($source:ident with { $($field:ident: $newValue:expr),* }) => { | |
{ | |
let mut result = $source.clone(); | |
$( | |
result.$field = $newValue; | |
)* | |
result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Detect whether or not to include debug symbols in the shader build. --> | |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |
<ShaderDebugSymbols>false</ShaderDebugSymbols> | |
</PropertyGroup> | |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |
<ShaderDebugSymbols>true</ShaderDebugSymbols> | |
</PropertyGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.FSharp.Core; | |
using System; | |
using System.IO; | |
using System.Runtime.CompilerServices; | |
[CompilationMapping(SourceConstructFlags.Module)] | |
public static class Program | |
{ | |
[SpecialName] | |
public static FSharpChoice<Unit, Unit> \u007CEven\u007COdd\u007C(int n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(macro_rules)] | |
macro_rules! active_match { | |
//Single zero parameter case | |
($m:expr, $i:ident() => $b:block) => { | |
match $i($m) { | |
Some(()) => $b, | |
_ => panic!("Encountered an unmatched active case.") | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(macro_rules)] | |
macro_rules! active_match { | |
//Zero parameter case followed by one or more cases | |
($m:expr, $i:ident() => $b:block $(, $i_rest:ident($($ps_rest:pat),*) => $b_rest:block)+) => { | |
match $i($m) { | |
Some(()) => $b, | |
None => active_match! { $m, $($i_rest($($ps_rest),*) => $b_rest),+ } | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports AW | |
Module GreeterBot | |
Dim Instance As IInstance | |
Sub Main() | |
Instance = New Instance() | |
AddHandler Instance.EventAvatarAdd, AddressOf OnAvatarEnter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Option | |
{ | |
public abstract class Option | |
{ | |
public static Option Wrap<T>(T value) | |
where T : class | |
{ | |
if(ReferenceEquals(value, null)) |
NewerOlder