Skip to content

Instantly share code, notes, and snippets.

View master-q's full-sized avatar
🌴
On vacation

Kiwamu Okabe master-q

🌴
On vacation
View GitHub Profile
@master-q
master-q / hardware.md
Created November 30, 2014 09:12
電子手帳を改造してPDAを作る
@master-q
master-q / hardware.md
Last active August 29, 2015 14:10
ギターエフェクタを自作するには
@master-q
master-q / club.md
Last active August 29, 2015 14:11
自作ロケットを飛ばす
@master-q
master-q / ubuntu14_on_virtualbox.md
Last active August 29, 2015 14:11
Can Mac OS X use USB host for OpenOCD?

Setup

Do not use USB 2.0.

$ sudo apt-get install libhidapi-dev
$ sudo apt-get build-dep openocd
$ git clone git://git.code.sf.net/p/openocd/code openocd-code
$ cd openocd
$ ./bootstrap
@master-q
master-q / statfs.c
Created March 3, 2015 08:36
#Linux の一部を #ATS2 で書き直してみた
extern struct super_block *user_get_super(dev_t);
extern void drop_super(struct super_block *sb);
extern int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf);
int vfs_ustat(dev_t dev, struct kstatfs *sbuf)
{
struct super_block *s = user_get_super(dev);
int err;
if (!s)
return -EINVAL;
@master-q
master-q / integer.sats
Created March 6, 2015 02:01
integer.satsに見る #ATS2 のゼロ除算実装
(***********************************************************************)
(* *)
(* Applied Type System *)
(* *)
(***********************************************************************)
(*
** ATS/Postiats - Unleashing the Potential of Types!
** Copyright (C) 2010-2013 Hongwei Xi, ATS Trustful Software, Inc.
** All rights reserved
@master-q
master-q / mindmap.md
Created March 7, 2015 06:51
mindmap
Title For paper For metasepi For advertising
Linux Bohai v v v
DWARF v v v
Queue Theory v v v
Error message v v
Scratch v v
Model checking v v
ATS internal v
SAT v
@master-q
master-q / mysql.log
Last active August 29, 2015 14:27
MySQL error
2015-08-12 19:32:12 12461 [ERROR] Error reading packet from server: Could not find first log file name in binary log index file ( server_errno=1236)
2015-08-12 19:32:12 12461 [ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file', Error_code: 1236
@master-q
master-q / template_scope.dats
Last active August 29, 2015 14:28
Template scope
#include "share/atspre_define.hats"
#include "share/atspre_staload.hats"
extern fun{} base (): int
fun{} plus (a: int): int = a + base ()
implement main0 () = {
implement{} base () = 2
val () = println! (plus 1) // => 3
@master-q
master-q / Build.log
Created September 5, 2015 19:33
Takeout will change linear value
$ make atview
"/home/kiwamu/src/ATS-Postiats"/bin/patscc -I"/home/kiwamu/src/ATS-Postiats" -I"/home/kiwamu/src/ATS-Postiats"/ccomp/runtime -I"/home/kiwamu/src/ATS-Postiats-contrib"/contrib -IATS "/home/kiwamu/src/ATS-Postiats-contrib"/contrib -o atview atview.dats || touch atview
**SHOWTYPE[UP]**(/home/kiwamu/src/ATS-Postiats/doc/BOOK/INT2PROGINATS/CODE/CHAP_VVTINTRO/atview.dats: 3199(line=129, offs=21) -- 3203(line=129, offs=25)): S2Etyrec(flt0; npf=1; 0=S2Eapp(S2Ecst(@); S2Etyrec(flt0; npf=-1; 0=S2Efun(FUN; lin=0; eff=S2EFFset(1); npf=-1; S2Erefarg(1; S2Evar(env$7237$7238(12766))), S2Evar(a(7908)); S2Ewth(S2Evar(b(7909)); trans(1; S2Evar(env$7237$7238(12766))), none())), 1=S2Evar(env$7237$7238(12766))), S2Evar(l(7910))), 1=S2Eapp(S2Ecst(ptr); S2Evar(l(7910)))): S2RTbas(S2RTBASimp(2; viewtype))
**SHOWTYPE[UP]**(/home/kiwamu/src/ATS-Postiats/doc/BOOK/INT2PROGINATS/CODE/CHAP_VVTINTRO/atview.dats: 3244(line=131, offs=21) -- 3248(line=131, offs=25)): S2Etyrec(flt0; npf=1; 0=S2Ecst(unit_p), 1=S2Eapp(S2Ecst(ptr);