Skip to content

Instantly share code, notes, and snippets.

@euske
euske / c_pointer_exercises.c
Created June 19, 2020 03:27
C Pointer Exercises for Beginners
/*
C Pointer Exercises for Beginners
by Yusuke Shinyama
*/
#include <stdio.h>
int main(int argc, char **argv)
{
struct foo {
@euske
euske / how-to-write-static-source-code-analyzer.md
Created August 20, 2020 02:14
How to Write Static Source Code Analyzer (WIP)

How to Write Static Source Code Analyzer

(WIP)

0. Introduction

We're trying to provide a general framework for constructing a static source code analyzer.

Pros of Source Code Analysis

@euske
euske / goals.md
Last active September 4, 2020 11:14
Notes: My Research Goals

My Research Goals (Loooong time)

Yusuke Shinyama

Code is Law (Lawrence Lessig). Code is not just machinery that governs our modern life, but it also represents our value system. Making the code accountable its behavior is crucial to a functioning democracy.

  • Help ordinary people understand complex software systems.
  • To reduce software-related accidents.
<html><body>
<style>
body { padding-top: 1em; }
table { border-collapse: collapse; margin: 1em; }
td { padding: 6pt; border-width: 4px; }
b { font-size: 150%; }
</style>
<table border>
<tr>
<td style="width:140pt;" align=left>
@euske
euske / cdhist.sh
Created April 22, 2021 07:51
Adds 'web-browser like history' to your bash shell.
### cdhist.sh
###
### Copyright (c) 2001 Yusuke Shinyama <yusuke at cs . nyu . edu>
###
### Permission to use, copy, modify, distribute this software and
### its documentation for any purpose is hereby granted, provided
### that existing copyright notices are retained in all copies and
### that this notice is included verbatim in any distributions.
### This software is provided ``AS IS'' without any express or implied
### warranty.
@euske
euske / links.md
Last active June 11, 2021 01:56
Intersting Links
@euske
euske / doit.sh
Created July 7, 2021 02:54
Boilerplate bash script
#!/bin/sh
exec >& doit.log
echo "*** BEGIN `date +'%Y-%m-%d %H:%M:%S'` ***"
renice +10 $$
# ...DO SOME LENGHTY STUFF...
# cd data || exit 1
# for i in *.txt; do
# echo "*** $i ***"
@euske
euske / real-good-samaritan.md
Last active September 13, 2021 02:39
(本当にいた) 善きサマリア人 (A Real Good Samaritan)

(本当にいた) 善きサマリア人

Original: http://www.bbc.com/news/magazine-12043294 (A Real Good Samaritan)

バーナード・ヘア (作家)

その日の午後、警察から学生寮のほうに呼び出しがきたが、俺はどうせまた立ち退きの要求だと思ったので答えずにいた。 俺はもう何ヶ月も家賃を払ってなかった。

でもそのあと思った。俺の母親はあまり身体の具合がよくない。もしかしたら母に何かあったんじゃないか?

究極のガベージコレクション

https://groups.google.com/forum/message/raw?msg=comp.lang.ada/E9bNCvDQ12k/1tezW24ZxdAJ

この人が、あるミサイル制御装置の組み込みプログラムをコンサルティングしていたときのこと。 明らかにメモリリークしそうな箇所が多数あるのを見て、統括責任者に問い合わせたところ 「そりゃもちろんリークするさ」との返事。この制御プログラムはある一定時間までしか 走らないことが保証されているので、彼らはそこから逆算してリークしても大丈夫なだけのメモリを確保しておき、 あとはプログラマが手を下す必要のない「究極のガベージコレクション」にまかせた、という話。

@euske
euske / there-are-no-small-changes.md
Created June 3, 2020 04:16
「ささいな仕様変更なんてものはない」 "There are no small changes" by Des Traynor

ささいな仕様変更なんてものはない (There are no small changes)

Des Traynor

https://blog.intercom.com/there-are-no-small-changes/

「...この製品レビューを書き込む欄の文字列を140字に制限したいんだ。 なぜならある時点で通信手段としてSMSを使わせるかもしれないから。 こんな仕様変更は簡単だよね?」