Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Kuniwak Kuniwak

I may be slow to respond.
Block or report user

Report or block Kuniwak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View perl-begin-quiz.markdown


#!/usr/bin/env perl
use strict;
use warnings;

print 1;

Kuniwak / file0.txt
Created Aug 12, 2014
peco と alias -g で git に便利革命おきた ref:
View file0.txt
$ git commit
View vint-ast.markdown
stmt left list op rest right type
let num = 0 identifier = number let
let dict[key] = 0 dot = number let
let list[0] = 99 subscript = number let
let list[1:2] = [99, 99] slice = list let
let str .= 'str_to_add' identifier .= number let
let $ENV = 'str_content' env = string let
let @@ = 'str_content' reg = string let
let [elem0, elem1] = [0, 1] [identifier, identifier] = list let
  1. identifier が定義・参照・静的解析不能を判別
    • IdentifierClassifier
    • IdentifierCollector
  2. Scope chain を作成
    • ScopeStore
  3. declaring identifier を scope に登録、scope を referencing identifier に登録
    • ScopeLinker
  4. referencing identifier から declaring identifier に到達可能かどうかを調べる
    • ParentAttacher
    • ReferenceReachabilityTester
Kuniwak / file0.txt
Last active Aug 29, 2015
vimrc アンチパターンを自動でチェックする ref:
View file0.txt
pip install vim-vint
View .cvimrc
map <C-u> scrollPageUp
map <C-d> scrollPageDown
map <C-h> deleteChar
cunmap <C-h>
let scrollstep = 200
Kuniwak / 4bit_adder.ts
Created Jul 13, 2015
Compile-Time 4-bit adder on TypeScript
View 4bit_adder.ts
// Compile-Time 4-bit Adder for TypeScript
// Author:
// INTPUT ////////////////////////////////
// O: Low
// I: High
let inputA1: I;
let inputA2: I;
let inputA3: O;
count(List, X, Count) :- count_sub(List, X, 0, Count).
count_sub([], _, N, N).
count_sub([Head | Xs], X, N, Count) :-
(Head == X -> N1 is N + 1; N1 is N),
count_sub(Xs, X, N1, Count).
% トランプの数は1〜13まで。
card(X) :- between(1, 13, X).
% さやかのヒントにあてはまる。
Kuniwak / santa_codegolf.js
Created Dec 27, 2012
CodeGolf の215文字(7位)の回答です。 @itコラボ企画「もしもエンジニアがサンタだったら」 クロノス・クラウン合同会社 柳井 政和さんからのJavaScriptの問題
View santa_codegolf.js
for(C=[c=j=4];c--;C[c]=A.join(""))for(A=[a=b=w=0],x=y=X=40;b<160;A[y?a++:(I=(c+b)*b*49999-5537&65535)%78+I%38*81+[1,81,82,83,163][j]]="|-*-|\n_%"[y?x+X?x*x--<w*w|6:(x=X,w+=--y%8?1:-3,y?5:8):j--||(b++,j=4)]);return C
Kuniwak /
Created Jun 11, 2013
上下移動ができないッ! 引用: [Java] 長すぎるor短すぎる関数名 -
public static User findByFirstNameFamilyNameFirstKanaAndFamilyKanaOnlyUseJustAfterObjectInserted(Connection conn,String firstNameLikeExpressionTakeCareAboutEscapeToAvoidSQLInjection,String familyNameLikeExpressionTakeCareAboutEscapeToAvoidSQLInjection,String firstKanaLikeExpressionTakeCareAboutEscapeToAvoidSQLInjection,String familyKanaLikeExpressionTakeCareAboutEscapeToAvoidSQLInjection){
public static User find(Connection conn,String arg1,String arg2,String arg3,String arg4){
You can’t perform that action at this time.