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 / hats_includes_hats.txt
Last active August 7, 2019 07:25
What does hats include?
$ grep -A 2 "\#include" `find . -name "*.hats"`
./npm-utils/contrib/libats-/hwxi/jsonats/mylibies_link.hats:local #include"./DATS/jsonats.dats" in end
./npm-utils/contrib/libats-/hwxi/jsonats/mylibies_link.hats-//
./npm-utils/contrib/libats-/hwxi/jsonats/mylibies_link.hats-(* ****** ****** *)
--
./npm-utils/contrib/libats-/hwxi/fworkshop/mydepies.hats:#include
./npm-utils/contrib/libats-/hwxi/fworkshop/mydepies.hats-"$PATSHOMELOCS\
./npm-utils/contrib/libats-/hwxi/fworkshop/mydepies.hats-/atscntrb-hx-threadkit/mylibies.hats"
--
./npm-utils/contrib/libats-/hwxi/polyglot/mylibies_link.hats:#include "./DATS/filetype.dats"
@master-q
master-q / 00run.sh
Created May 27, 2019 10:12
How to inject ATS's DWARF debug info
$ gcc -g -I /home/kiwamu/src/ATS-Postiats/ccomp/runtime/ -I /home/kiwamu/src/ATS-Postiats/ main_dats.c
$ gdb a.out
(gdb) b main.dats:atspre_g0int_add_int
Breakpoint 1 at 0x120a: file /home/kiwamu/src/ATS-Postiats/prelude/CATS/integer.cats, line 157.
(gdb) run
Starting program: /home/kiwamu/src/idiomaticca/regress/noinc/arithmetic_op/a.out
Breakpoint 1, atspre_g0int_add_int (x1=1, x2=2) at /home/kiwamu/src/ATS-Postiats/prelude/CATS/integer.cats:157
157 (atstype_int x1, atstype_int x2) { return (x1 + x2) ; }
(gdb) bt
@master-q
master-q / memo.rd
Created May 27, 2019 09:10
#Vala はどうやって #DWARF を吐くのか
= ValaはどうやってDWARFを吐くのか
[2019-05-27 16:20]
<<<Vala
<<<DWARF
== 参考
"Projects/Genie/Developing - GNOME Wiki!" https://wiki.gnome.org/Projects/Genie/Developing
"Valaのデバッグ[メモ] | TIPS" http://1204lts.blogspot.com/2014/01/vala.html
@master-q
master-q / 00cost.md
Last active May 1, 2019 20:22
MSP430を使ってPCBなし直接配線でバッテリを搭載したアプリケーションを作れないか

で、100個作ると。おいくら万円なの?

Lチカ on ミニブレッドボード

5.9 + 2 + 50 + 120 + 113.8 = 291.7円

Lチカ on 片面ユニバーサル基板

5.9 + 2 + 50 + 40 + 113.8 = 211.7円

@master-q
master-q / cat.c
Last active February 1, 2019 08:34
corrodeにBSDなcatをかけてみた
/* $OpenBSD: cat.c,v 1.26 2016/10/19 18:20:25 schwarze Exp $ */
/* $NetBSD: cat.c,v 1.11 1995/09/07 06:12:54 jtc Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Kevin Fall.
*
@master-q
master-q / cat.c
Last active February 1, 2019 08:32
C2RustにBSDなcatをかけてみた
/* $OpenBSD: cat.c,v 1.26 2016/10/19 18:20:25 schwarze Exp $ */
/* $NetBSD: cat.c,v 1.11 1995/09/07 06:12:54 jtc Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Kevin Fall.
*
@master-q
master-q / vcc-survey.rd
Created November 27, 2018 00:47
VCCサーベイ
= VCCサーベイ
[2018-04-15 15:00]
<<<VCC
<<<サーベイ
https://archive.codeplex.com/?p=vcc
論文を以下に置いた:
@master-q
master-q / memo.rd
Created November 12, 2018 04:05
VeriFastでFreeRTOSに注釈を付ける
= VeriFastでFreeRTOSに注釈を付ける
[2018-06-01 09:59]
<<<VeriFast
<<<FreeRTOS
<<<C99
eldeshさんのアドバイスに従ってもっとも小さい実例からはじめよう。
https://github.com/metasepi/amazon-freertos
@master-q
master-q / prolog-intro-report.md
Created October 17, 2018 06:30
Prolog入門の感想

Introduction to Prolog (in Japanese) を一通り読んだ感想:

  • 便利だなぁ "変数を含んだ質問では,複数の答えが存在する場合がある. たとえば, saburo の子供は naoyuki と shinji の 2 人がいるから ?- father(saburo, C). の答えは 2 種類存在するはずである. Prolog ではこのような場合,プログラム中での記述の順序にしたがって 答えが表示される."
  • えーと。これは定義の順に辿って最初に見つかった1つの例が選択されるってことなんです? "質問 ?- father(G, F), father(F, hyogo). の場合も左から順に処理される. まず father(G, F) の最初の答え G=naoyuki, F=hyogo が求められる."
  • これでも、、、バックトラックを手作業で制御するとなると、、、記述量が増えませんか?
  • あーspyは便利ですね。
  • でも、、、それってシンボリック実行の方がより強力だと感じます
  • うーん、これCollatzを実装したとしても任意の自然数で停止する証左にならないのでは。。。
  • これ結局実行しているから、バックトラックで枝切りした範囲でしか健全性が主張できないのでは
@master-q
master-q / Try_to_verify_FreeRTOS_using_VeriFast.rd
Created October 12, 2018 01:51
Try to verify FreeRTOS using VeriFast
= VeriFastでFreeRTOSに注釈を付ける
[2018-06-01 09:59]
<<<VeriFast
<<<FreeRTOS
<<<C99
eldeshさんのアドバイスに従ってもっとも小さい実例からはじめよう。
== lib/FreeRTOS/tasks.c