Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
hello

Yutaka HARA yhara

:octocat:
hello
View GitHub Profile
View ray.sk.ll
/Users/yhara/Dropbox/proj/shiika/examples % lldb -c /cores/core.67850
(lldb) target create --core "/cores/core.67850"
warning: (x86_64) /cores/core.67850 load command 433 LC_SEGMENT_64 has a fileoff + filesize (0x2f51e000) that extends beyond the end of the file (0x2f51d000), the segment will be truncated to match
warning: (x86_64) /cores/core.67850 load command 434 LC_SEGMENT_64 has a fileoff (0x2f51e000) that extends beyond the end of the file (0x2f51d000), ignoring this section
Core file '/cores/core.67850' (x86_64) was loaded.
(lldb) bt
* thread #1, stop reason = signal SIGSTOP
* frame #0: 0x000000010cf21e0d libgc.1.dylib`GC_clear_stack_inner + 46
frame #1: 0x000000010cf21e27 libgc.1.dylib`GC_clear_stack_inner + 72
frame #2: 0x000000010cf21e27 libgc.1.dylib`GC_clear_stack_inner + 72
View ray.sk
# orig: http://qiita.com/doxas/items/477fda867da467116f8d
IMAGE_WIDTH = 512
IMAGE_HEIGHT = 512
IMAGE_DEPTH = 256
EPS = 0.0001
MAX_REF = 4
class Vec
def initialize(x: Float, y: Float, z: Float)
View fix_ptr_arg.rb
def conv(txt)
txt.gsub(/&Vec<(.+?)>/) do
"&[#{$1}]"
end
end
ARGV.each do |path|
txt = conv File.read(path)
File.write(path, txt)
end
View mandel.sk.opt.ll
; ModuleID = 'examples/mandel.sk.bc'
source_filename = "main"
%Void = type <{}>
%Math = type <{}>
%Object = type <{}>
@"::ITER" = internal unnamed_addr global i1 false
@"::Void" = internal unnamed_addr global %Void* null
@"::LIMIT_SQUARED" = internal unnamed_addr global double 0.000000e+00
View mandel.sk.ll
; ModuleID = 'main'
source_filename = "main"
%Void = type <{}>
%Math = type <{}>
%Object = type <{}>
@"::ITER" = internal global i32 0
@"::Void" = internal global %Void* null
@"::LIMIT_SQUARED" = internal global double 0.000000e+00
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
# テスト
You can’t perform that action at this time.