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
import std.socket; | |
import std.stdio; | |
import std.conv; | |
static import file = std.file; | |
import gzip; | |
const string content = "{}"; | |
void main() { | |
TcpSocket server = new TcpSocket(); |
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
import std.stdio; | |
import std.conv; | |
import std.array; | |
import std.traits; | |
class Foo { | |
Bar nested; | |
this(Bar nested) { | |
this.nested = nested; |
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
module json; | |
import std.conv; | |
import std.array; | |
import std.traits; | |
string json(T) (T obj) { | |
static if (is(typeof(obj) == string)) { | |
return "\"" ~ obj.replace("\\", "\\\\").replace("\"", "\\\"") ~ "\""; | |
} else static if (isBasicType!(typeof(obj))) { |
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
extern exit, printf | |
section .data | |
msg db "Hello World!", 10, 0 | |
section .text | |
global main | |
main: | |
push msg | |
call printf |
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
#define GLFW_INCLUDE_VULKAN | |
#include <GLFW/glfw3.h> | |
#define GLM_FORCE_RADIANS | |
#define GLM_FORCE_DEPTH_ZERO_TO_ONE | |
#include <glm/glm.hpp> | |
#include <glm/gtc/matrix_transform.hpp> | |
#define STB_IMAGE_IMPLEMENTATION | |
#include <stb_image.h> |
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
#include "Assembler.hpp" | |
Assembler::Assembler() | |
{ | |
} | |
int Assembler::Run() | |
{ | |
if ( code.size() == 0 ) return -1; |
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
gpu: gpu.cpp | |
g++ -std=c++11 -O2 -flto -march=native -o gpu gpu.cpp -L. -lbuse -lOpenCL |
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
// Headers | |
#include <Windows.h> | |
#include <D3D10.h> | |
// Parameters | |
const int WIDTH = 800; | |
const int HEIGHT = 600; | |
// Shader | |
#define SHADER(x) #x |
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
#include <iostream> | |
#include <vector> | |
#define GLFW_INCLUDE_VULKAN | |
#define VK_USE_PLATFORM_WIN32_KHR | |
#include <GLFW/glfw3.h> | |
#define GLFW_EXPOSE_NATIVE_WIN32 | |
#include <GLFW/glfw3native.h> |
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
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <string> | |
#include <algorithm> | |
#include <chrono> | |
#include <functional> | |
#define GLFW_INCLUDE_VULKAN | |
#include <GLFW/glfw3.h> |
OlderNewer