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 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.
View yhara_webassembly.md

footer: RubyKaigi 2017 (19, Sep) slidenumbers: true autoscale: true

Ruby, Opal and WebAssembly

RubyKaigi2017

inline

yhara (Yutaka Hara)


@yhara
yhara / keymap.c
Last active Sep 14, 2017
ergodox ez keymap 2017/09/14 (lets-split like)
View keymap.c
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // media keys
#define LOWER 3
#define RAISE 4
You can’t perform that action at this time.