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
// Parameter registers | |
#define a1 rdi | |
#define a1d edi | |
#define a1b dil | |
#define a2 rsi | |
#define a2d esi | |
#define a2b sil | |
#define a3 rdx | |
#define a3d edx | |
#define a4 rcx |
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
app = NSApplication sharedApplication | |
GlutInitDisplayMode(GLUT_RGBA or: GLUT_DOUBLE) | |
GlutInitWindowSize(800, 600) | |
GlutInitWindowPosition(200, 200) | |
GlutCreateWindow("Test") | |
GlutDisplayFunc({ | |
"foo" print | |
\ Insert OpenGL commands here |
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
function! ActivateApp(appName) | |
call system("osascript -e 'tell application \"".a:appName."\" to activate'") | |
endfunction | |
function! ClickMenuItemInApp(appName, menuName, menuItemName) | |
call system("osascript -e 'tell application \"".a:appName."\" to activate'" | |
\ ." -e 'tell application \"System Events\"'" | |
\ ." -e 'tell process \"".a:appName."\" to click menu item \"".a:menuItemName."\" of menu \"".a:menuName."\" of menu bar 1'" | |
\ ." -e 'end tell'") | |
endfunction |
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 <Foundation/Foundation.h> | |
#import <objc/runtime.h> | |
#import <objc/message.h> | |
#if !__has_feature(objc_arc) | |
#error "TQWeak must be compiled with -fobjc-arc!" | |
#endif | |
// A workaround until I figure out how to implement Cycle detection |
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 "TQArithmeticProcessor.h" | |
#import "../TQNodeOperator.h" | |
#import "../TQNodeNumber.h" | |
@implementation TQArithmeticProcessor | |
+ (void)load | |
{ | |
if(self != [TQArithmeticProcessor class]) | |
return; | |
[TQProcessor registerProcessor:self]; |
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
nsapp = NSApplication sharedApplication | |
\ Create the menubar | |
menuBar = NSMenu new | |
appMenuItem = NSMenuItem new | |
menuBar addItem: appMenuItem | |
nsapp setMainMenu: menuBar | |
\ Add the Application menu & the quit item | |
quitMenuItem = NSMenuItem alloc initWithTitle: "Quit #{NSProcessInfo processInfo processName}" |
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 <clang-c/Index.h> | |
#import <Foundation/Foundation.h> | |
void indexDeclaration(CXClientData client_data, | |
const CXIdxDeclInfo *declaration); | |
static IndexerCallbacks indexerCallbacks = { | |
.abortQuery = NULL, | |
.diagnostic = NULL, | |
.enteredMainFile = NULL, |
This file has been truncated, but you can view the full file.
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
function _OSSwapInt16 -- S4S0 | |
function _OSSwapInt32 -- I4I0 | |
function _OSSwapInt64 -- Q8Q0 | |
function __darwin_fd_isset -- i12i0r^{fd_set=[32i]}4 | |
function __assert_rtn -- v28r*0r*8i16r*20 | |
function ___runetype -- Q4i0 | |
function ___tolower -- i4i0 | |
function ___toupper -- i4i0 | |
function isascii -- i4i0 |
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
GlutInit(0, nil) | |
GlutInitDisplayMode(GLUT_DOUBLE) | |
GlutInitWindowSize(640, 480) | |
GlutInitWindowPosition(200, 200) | |
GlutCreateWindow("Tranquil is cool as beans!") | |
GlClearColor(0, 0, 0, 0) | |
GlScalef(0.4, 0.4, 0.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
\ Tranquil compiler | |
import "CoreFoundation" | |
inPath = "Tests/smartfib.tq" | |
outPath = "a.out" | |
runtimeLibPath = "Build/libtranquil.dylib" | |
ldFlags = ["-lobjc", runtimeLibPath] | |
(0 to: (... count)) each: { i | | |
if ...[i] == "-o" |