Skip to content

Instantly share code, notes, and snippets.

View KisaragiEffective's full-sized avatar
🔇
sick

Kisaragi KisaragiEffective

🔇
sick
  • Some(_)
  • Hokkaido, Japan
View GitHub Profile
/**
* This script generates all 1.13 vanilla recipes except banner, potion and firework recipes.
* This file is under GPL v3 License.
* THE FILE AUTHOR: [email protected]
*/
import java.io.File
data class Smelt(val result: String, val exp: Double)
fun void(@Suppress("UNUSED_PARAMETER") value: Any?) {
/**
* This script generates all 1.13 vanilla recipes except banner and firework recipes.
* This file is under GPL v3 License.
* THE FILE AUTHOR: [email protected]
*/
import java.io.File
data class Smelt(val result: String, val exp: Double)
fun void(@Suppress("UNUSED_PARAMETER") value: Any?) {
package com.github.kisaragieffective.kisaragistd.collection.array
fun <E> Array<E>.dimensions() = 1
fun <E> Array<E>.dimension() = 1
fun <E> Array<E>.dim() = 1
fun BooleanArray.dimensions() = 1
fun BooleanArray.dimension() = 1
fun BooleanArray.dim() = 1

PlayGrounds

Programming Language

  • paiza.io (Bash / C / C# / C++ / Clojure / COBOL / CoffeeScript / D / Elixir / Erlang / F# / Go / Haskell / Java / JavaScript / Kotlin / MySQL / Objective-C / Perl / PHP / Python2 / Python3 / R / Ruby / Rust / Scala / Scheme / Swift / Visual Basic)
  • godbolt.org (Ada / Analysis / Assembly / C / C++ / Clean / Cppx / CUDA / D / Fortran / Go / Haskell / ispc / LLVM IR / Ocaml / Pascal / Python / Rust / Swift / Zig)

the C language

  • TODO

Assembly

  • TODO
<program> ::= <lines>
<lines> ::= (<line> <line_delimitor>)+
<line> ::= <input> | <output> | <ret> | <compound_ret>
<input> ::= ">" <var>
<output> ::= "<" <expr>
<expr> ::= <literal> | <var> | "(" <expr> ")" | <expr> <binary_op> <expr> | <unary_op> <expr> | <function_invoke>
<function_invoke> ::= <function_identifier> "(" <arguments>? ")"
<arguments> ::= <expr> ("," <expr>)*
<function_identifier> ::= <alpha> (<alpha> | [0-9] | "_")*
<binary_op> ::= "+" | "-" | "*" | "/" | "%" | <comparetion_op>
@KisaragiEffective
KisaragiEffective / MetaPro.kt
Created October 24, 2019 17:11
コンパイル時定数にならないのが惜しいところかな
package com.github.kisaragieffective.kisaragistd.metaprogramming
import java.lang.reflect.Modifier
inline fun <reified T, reified Q> isSameErasure(): Boolean {
return T::class.java == Q::class.java
}
inline fun <reified T> isVoid(): Boolean {
return T::class.java == Void.TYPE
CREATE TABLE locations (
id int primary key,
x int NOT NULL,
y int NOT NULL,
z int NOT NULL
);
CREATE TABLE worlds (
id int primary key,
@KisaragiEffective
KisaragiEffective / BuggyIRTranslator.kt
Last active October 29, 2019 11:35
頼むからILぐらいちゃんと吐いてくれ
package com.github.kisaragieffective.bfvm
import com.github.kisaragieffective.bfvm.instruction.*
import java.net.HttpURLConnection
import java.net.URL
var errors = 0
fun main() {
// `-+><,.[]`以外の8文字は無視しても差し支えない
@KisaragiEffective
KisaragiEffective / MandelIL.rb
Last active November 1, 2019 15:42
不完全なIL
# Brainfuck IL
# Title=Mandelbrot
PLUS 12
PLUS 1
JE 16
MINUS 1
PTR 1
PLUS 1
PLUS 1
PTR 2
# https://atcoder.jp/contests/abs/tasks/abc081_a
READCHAR
SUB '0'
JE 4
PTR 1
INC
PTR -1
READCHAR
SUB '0'
JE 4