Skip to content

Instantly share code, notes, and snippets.

@oskimura
oskimura / pre-commit.sh
Last active July 5, 2019 09:30
コミット漏れチェック
git stash -k
sleep 3
git diff --cached --name-only | xargs node node_modules/eslint/bin/eslint.js
status=$?
echo $status
if [ $status -ne 0 ]; then
echo "failed eslint";
git stash pop --index
exit 1;

Erlang VMで動く処理系の作り方


対象

  • BNFが読める
  • Yacc/Lex系ツールを使ったことがある。
  • Erlangがすこし書ける
#include <vector>
#include <iostream>
using namespace std;
#define MAX_V 50
#define INF (1<<20)
#include <vector>
#include <iostream>
#include <cmath>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <numeric>
int main()
#include <iostream>
#include <cmath>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <numeric>
int main()
#include <iostream>
#include <cmath>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <numeric>
int main()
#include <iostream>
#include <cmath>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <numeric>
int main()
#include <iostream>
#include <cmath>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <numeric>
int main()
#include "iostream"
#include <cmath>
int main()
{
int x, y;
while (std::cin >> x >> y) {
if (x < y) {
std::cout << x << " " << y << std::endl;
}