This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ちょっとだけ脳内ダンプしたコードがあった | |
こんな感じにTLSEngineの内部には6個のバッファーがあって、状態遷移は基本的にどっかのバッファーの先頭から取ってきて、 | |
加工した結果をどっかのバッファーの末尾に置くって感じで書く予定だった。 | |
CCSがソケット入力バッファーの先頭にあるときに、ハンドシェークの状態が特定の状態にないといけないのは自明のことで、 | |
本当の興味は他のバッファーの状態がどうなってないといけないのか?ということだったんだー |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun show-current-char () | |
(let ((ch (following-char))) | |
(format " [U+%04X %s] " ch (get-char-code-property ch 'name)))) | |
(easy-mmode-define-minor-mode show-char-mode | |
"Toggle Show char mode." | |
t | |
(:eval (show-current-char))) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ブレッドボードで作ったAMラジオが全然動かないので、Arduino Leonardでお手軽に作ったAMラジオの信号発生器 | |
搬送波は1MHzで矩形波なので高調波が乗りまくってると思われる。 | |
音声信号は500-1000Hzぐらいの音階で矩形波。 | |
AM変調は搬送波をon/offするだけ。 | |
5番ピンに適当な長さの電線を繋いでバーアンテナに近づけると動く。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "share/atspre_define.hats" | |
#include "share/atspre_staload.hats" | |
fn foo1(n : bool, dst : &int) : bool = | |
if n then ( | |
dst := 42; | |
true | |
) else ( | |
dst := 0; | |
false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "share/atspre_define.hats" | |
#include "share/atspre_staload.hats" | |
staload S = "libc/sys/SATS/socket.sats" | |
extern | |
fun socket(af: $S.sa_family_t, st: $S.socktype_t, proto: int) : [fd:int] | |
( | |
option_v ($S.socket_v (fd, $S.init), fd >= 0) | int(fd) | |
) = "mac#socket" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <set> | |
#include <string> | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int T; | |
cin >> T; | |
char buf[2048]; | |
cin.getline(buf, 2048); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
G = 'GABRIEL' | |
R = 'RICHARD' | |
def solve(x, r, c) | |
#p [x, r, c] | |
if r > c | |
r, c = c, r | |
end | |
# r <= c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2288 n | |
1741 x | |
1506 apply | |
1273 m | |
1272 auto | |
1116 rewrite | |
1016 destruct | |
961 in | |
947 a | |
881 intros |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import ZArith. | |
Require Import Zminmax. | |
Require Import List. | |
Open Scope Z_scope. | |
Inductive Robo : Set := Blue | Orange. | |
Inductive Order : Set := order : Robo -> Z -> Order. | |
Inductive Move : Set := Left | Right | Push | Stay. | |
Inductive Moves : Set := moves : Move -> Move -> Moves. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import ZArith. | |
Require Import List. | |
Open Scope Z_scope. | |
Inductive Robo : Set := Blue | Orange. | |
Inductive Order : Set := order : Robo -> Z -> Order. | |
Inductive Move : Set := Left | Right | Stay. | |
Inductive Moves : Set := | |
| moves : Move -> Move -> Moves |
OlderNewer