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
use libffi | |
import libffi | |
import structs/Array | |
main: func { | |
closure := FFIClosure new() | |
cif := FFICIF new() | |
types: Array<FFIType*> = Array<FFIType*> new(2) | |
types[0] = FFIType SINT& | |
types[1] = FFIType POINTER& |
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
Strict | |
Type AbstractEnumerator Abstract | |
Method NextObject:Object() Abstract | |
Method HasNext:Int() Abstract | |
End Type | |
Type List | |
Method ObjectEnumerator:AbstractEnumerator() | |
Type Enumerator Extends AbstractEnumerator |
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
SuperStrict | |
Type Animation | |
?Threaded | |
Global AnimationsLock:TMutex = TMutex.Create() | |
? | |
Global Animations:TList = New TList | |
Global AnimationTimer:TTimer = TTimer.Create(60, Null) | |
Field o:Object ' Object being animated, used to keep pointer to object in scope during animation |
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
Mat4: class { | |
m:Double[16] | |
} | |
operator [] (mat:Mat4, row:Int) -> Double* { | |
return mat m[row*4]& | |
} | |
someMat := Mat4 new() |
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
Nut: class { | |
cracker: Int | |
init: func(cracker: Int) { | |
this cracker = cracker | |
} | |
bust: func { | |
cracked *= 5 |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stddef.h> | |
#include <stdbool.h> | |
#include <ctype.h> | |
#include <string.h> | |
#include "lexer.h" | |
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
/* | |
Copyright (c) 2010 Noel R. Cower | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
/* | |
Copyright (c) 2010 Noel R. Cower | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
SuperStrict | |
'buildopt:threads | |
'buildopt:gui | |
Import "Source/Nihilit/Animation.bmx" | |
Type NButton | |
Field c_r%, c_g%, c_b% | |
Field x!, y!, width!, height! |
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
// | |
// NLayoutRule.h | |
// NToolkit | |
// | |
// Created by Noel Cower on 4/10/10. | |
// Copyright (c) 2010 Noel R. Cower | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |