This file contains hidden or 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
var objShell = WScript.CreateObject('WScript.Shell'); | |
objShell.Run('http://turbo.coffee'); |
This file contains hidden or 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
import haxe.macro.Expr; | |
class Test { | |
static function main() { | |
var x = 2; | |
var y = 53; | |
var z = 43; | |
x = null; | |
trace(coalesce(x, y, z)); | |
y = null; |
This file contains hidden or 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
// Haxe’s macro support makes for a golden opportunity for building | |
// program metadata during compiletime. I think it would be very cool | |
// to be able to preprocess itnerpolated strings so that text can be | |
// extracted and analyzed separately (NLS?) or, e.g., to do JavaScript-style | |
// tagged string stuff/C#-style FormattableString stuff like automatically | |
// escaping expressions when building HTML, etc. | |
// | |
// However, it looks to me like right now macros are given CStrings | |
// which don’t even let you know if the string will be interpolated | |
// or not. |
This file contains hidden or 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
// Haxe’s macro support makes for a golden opportunity for building | |
// program metadata during compiletime. I think it would be very cool | |
// to be able to preprocess interpolated strings so that text can be | |
// extracted and analyzed separately (NLS?) or, e.g., to do JavaScript-style | |
// tagged string stuff/C#-style FormattableString stuff like automatically | |
// escaping expressions when building HTML, etc. | |
// | |
// However, it looks to me like right now macros are given CStrings | |
// which don’t even let you know if the string will be interpolated or | |
// not. And MacroStringTools.formatString() seems insufficient… |
This file contains hidden or 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; | |
using System.Reflection; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
foreach (var value in typeof(MyClass).GetCustomAttribute<MyAttribute>().Values) | |
{ | |
Console.WriteLine(value); |
This file contains hidden or 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; | |
using System.Xml.Linq; | |
class XElementDemo | |
{ | |
static void Main(string[] args) | |
{ | |
var tree = new XElement( | |
"x", | |
new XAttribute("y", $"uh, {1+4}"), |
This file contains hidden or 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
import haxe.ds.StringMap; | |
import haxe.macro.Expr; | |
import haxe.macro.Printer; | |
class XmlLiteral { | |
public static function main() { | |
// See https://gist.github.com/binki/9d09ea0ae8ea43788505af08844dae79 | |
// It would be cool if the following: |
This file contains hidden or 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
<?php | |
class NotStream { | |
public function write($s) { | |
echo $s; | |
return $this; | |
} | |
} | |
class std { |
This file contains hidden or 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
import haxe.macro.Expr; | |
import haxe.macro.MacroStringTools; | |
import haxe.macro.Printer; | |
class MoreLiteral { | |
static function main() { | |
var x = 2; | |
trace(Util.xpand(34)); | |
} |
This file contains hidden or 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
#!/usr/bin/env python | |
def something(): | |
pass | |
def hi(): | |
something() | |
something() | |
bye = 5 | |
sigh = 10 |