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(easy_otp). | |
-export([ start/1 | |
, close/1 | |
]). | |
% define own behaviour | |
-export([behaviour_info/1]). | |
-record(server, { socket | |
, mod |
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 PROCEDURE(func_name, type_in) void func_name type_in | |
#define FUNCTION(func_name, type_in, type_out) type_out func_name type_in | |
#define IS { | |
#define END } | |
#define BEGIN | |
#define RECORD_TYPE(name,code) typedef struct { \ | |
code \ | |
} name; \ |
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 `gcc sdl2_text_input_utf8.c -lSDL2 -lSDL2_ttf -o test_program`. | |
// | |
// You must use CJK font for SDL2_ttf and put the same directory with test_program. | |
// This example use "NotoSansMonoCJKtc-Regular.otf". | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <SDL2/SDL.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
#lang racket | |
(provide | |
(all-defined-out)) | |
; new table | |
(define empty-table | |
(lambda (name) | |
'())) |
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
#!/usr/bin/env python3 | |
# pip install miniKanren | |
from unification import reify | |
from kanren import fact, facts, run, Var, conde, Relation, eq | |
from kanren.core import fail, succeed, lall, lany | |
base_item = Relation() | |
formula = Relation() |