Skip to content

Instantly share code, notes, and snippets.

@lambdataro
lambdataro / Main.elm
Created December 14, 2020 15:53
四角をドラングアンドドロップするプログラム
module Main exposing (main)
import Browser exposing (Document)
import Browser.Events
import Json.Decode as Dec exposing (Decoder)
import Svg exposing (Svg)
import Svg.Attributes as Attr
import Svg.Events
@lambdataro
lambdataro / calc.lua
Created July 5, 2015 00:49
Luaで作った四則演算プログラム
--------------------------------------------------------------
-- calc.lua - 四則演算プログラム (Version 1.0)
-- 2015/07/05 @lambdataro
--------------------------------------------------------------
--------------------------------
-- 字句解析バッファ
--------------------------------
-- 字句解析バッファの作成
@lambdataro
lambdataro / arbitrary_precision.lua
Created June 17, 2015 05:18
TIS-100 original specification
function get_name()
return "ARBITRARY PRECISION"
end
function get_description()
return { "SEQUENCES ARE TERMINATED WITH MINUS ONE",
"EACH SEQUENCE INDICATES AN ARBITRARY PRECISION INTEGER",
"READ INTEGERS FORM IN.A AND IN.B",
"WRITE SUM OF THESE TO OUT.S" }
end
@lambdataro
lambdataro / xor_gate.lua
Created June 16, 2015 17:19
TIS-100 original specification.
-- The function get_name() should return a single string that is the name of the puzzle.
--
function get_name()
return "XOR GATE"
end
-- The function get_description() should return an array of strings, where each string is
-- a line of description for the puzzle. The text you return from get_description() will
-- be automatically formatted and wrapped to fit inside the puzzle information box.
--
@lambdataro
lambdataro / Parser.mok
Created March 14, 2015 19:33
Mokkosuで普通に実装したパーサ
using System.IO;
type Token = TknInt(Int)
| TknPls
| TknMns
| TknAst
| TknSls
| TknLp
| TknRp
| TknEof
#include <string.h>
#include <immintrin.h>
#define BN2 480
#define BN1 48
double *alloc_matrix(int height, int width);
void free_matrix(double *matrix);
inline void small_dgemm(double alpha, double *a, int lda, double *b, int ldb,
#include <string.h>
#include <immintrin.h>
#define BN2 480
#define BN1 48
double *alloc_matrix(int height, int width);
void free_matrix(double *matrix);
inline void small_dgemm(double alpha, double *a, int lda, double *b, int ldb,
#include <string.h>
#include <immintrin.h>
#define BN2 480
#define BN1 48
double *alloc_matrix(int height, int width);
void free_matrix(double *matrix);
inline void small_dgemm(double alpha, double *a, int lda, double *b, int ldb,
#include <string.h>
#include <immintrin.h>
#define BN2 480
#define BN1 48
double *alloc_matrix(int height, int width);
void free_matrix(double *matrix);
void small_dgemm(double alpha, double *a, int lda, double *b, int ldb,
#include <string.h>
#include <immintrin.h>
#define BN2 480
#define BN1 48
void small_dgemm(double alpha, double *a, int lda, double *b, int ldb,
double *c, int ldc)
{
int mm, nn, kk;