Skip to content

Instantly share code, notes, and snippets.

:octocat:
hello

Yutaka HARA yhara

:octocat:
hello
Block or report user

Report or block yhara

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View a.ll
; ModuleID = 'main'
source_filename = "main"
%"Meta:A" = type <{}>
%A = type <{}>
%Object = type <{}>
%Math = type <{}>
@"::A" = internal global %"Meta:A"* null
@"::H" = internal global i32 0
View chibi-r.scm
;
; Chibiのsyntax-rules実装を動かしてみる
;
; original: ~/research/chibi-scheme/lib/init-7.scm
(import (scheme base) (scheme write) (chibi)) ; (chibi syntax-case))
(define (syntax-rules-transformer expr rename compare)
(let ((ellipsis-specified? (identifier? (cadr expr)))
(count 0)
(_er-macro-transformer (rename 'er-macro-transformer))
View err.txt
/Users/yhara/proj/qmk_firmware/lets_yhara % ./write.sh [263/405]
QMK Firmware 0.6.385
WARNING:
Some git sub-modules are out of date or modified, please consider running:
make git-submodule
You can ignore this warning if you are not compiling any ChibiOS keyboards,
or if you have modified the ChibiOS libraries yourself.
Making lets_split/rev2 with keymap yhara and target avrdude
avr-gcc (GCC) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
View chibi-r.scm
; original: ~/research/chibi-scheme/lib/init-7.scm
(import (scheme base) (scheme write) (chibi)) ; (chibi syntax-case))
(define (syntax-rules-transformer expr rename compare)
(let ((ellipsis-specified? (identifier? (cadr expr)))
(count 0)
(_er-macro-transformer (rename 'er-macro-transformer))
(_lambda (rename 'lambda)) (_let (rename 'let))
(_begin (rename 'begin)) (_if (rename 'if))
(_and (rename 'and)) (_or (rename 'or))
View a.rb
require 'tempfile'
# File.openを使う処理
def write_hello(path)
File.open(path, "a") do |file|
file.write "hello"
end
end
# テスト
View finalizer.rb
HOOK = proc{}
class A
def foo
ObjectSpace.define_finalizer self, HOOK
end
end
A.new.foo
10.times{GC.start}
p ObjectSpace.each_object(A).to_a #=> [#<A:0x00007fbae28ef1f8>]
View Gemfile
source 'https://rubygems.org'
gem 'activerecord', '5.2.0'
View b.rs
struct Parser<'a> {
pub str: String,
pub current_token: Option<&'a str>,
}
impl<'a> Parser<'a> {
pub fn lex(&'a mut self) {
let tmp: &'a str = &self.str[0..1];
self.current_token = Some(tmp);
}
View b.rs
struct Parser<'a> {
pub str: String,
pub current_token: Option<&'a str>,
}
impl<'a> Parser<'a> {
pub fn lex(&mut self) {
self.current_token = Some(&self.str[0..1]);
}
}
View dxopal.min.js
This file has been truncated, but you can view the full file.
You can’t perform that action at this time.