Skip to content

Instantly share code, notes, and snippets.

View hachi8833's full-sized avatar
😀

Shozo Hatta hachi8833

😀
View GitHub Profile
@jxmorris12
jxmorris12 / Makefile
Created September 5, 2019 14:51
compiles xv6 with Mac OS X qemu and cross-compiler i386-elf-gcc-gdb
OBJS = \
bio.o\
console.o\
exec.o\
file.o\
fs.o\
ide.o\
ioapic.o\
kalloc.o\
kbd.o\
@azu
azu / READ.md
Last active May 8, 2021 14:23
JavaScriptの本を書くときに参考にしてるもの

jsprimerというJavaScriptの書籍を書いている。 これを書いてるときに参考にしているものを書いていく。

ECMAScriptのLiving Standardな仕様書ページ。 スナップショットなECMAScriptの仕様書ページもあるけど、基本的にはLiving Standardの方しか見てない。

最新のステータス: 追記: 2019/7/10

転職しました。長らくのご愛顧誠にありがとうございました。


転職先をちょくちょく探しています。

興味ある方は twitter @mizchi へのリプライorDM、または mizchi2w@gmail.com まで。

@yamarten
yamarten / hott_intro.asc
Last active April 15, 2024 00:00
HoTT本入門

ホモトピー型理論(HoTT)に入門するために

前置き

HoTTに興味があるCS系の学生が、HoTT本の冒頭を読んだ体験を元に、知っておくと学び易くなりそうな話をまとめてみた。

対象は自分と同じ、型理論は少し知ってる[1]けどホモトピーとかわからんという人。「型理論は知らんけどホモトピー論と圏論の用語はわかる」という人はそのまま読めばいいと思うし、両方ともわからない人は学ぶモチベーションがよくわからない(し、とりあえずどちらかを学んだ方がいいと思う)のでとりあえず無視する。

HoTTについてはさわり程度の知識しかないまま書かれているため、話半分に読んでもらった方がいいと思う。


1. 「依存型に触ったことある」もしくは「TaPLを部分的にでも読んだ」あたりが基準になるだろうか。
@kule
kule / mini_rspec.rb
Created September 11, 2018 09:37
Simplified example of how rspec works
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'colorize'
end
class MatcherInterface
def initialize(some_object)
@some_object = some_object
require "active_support"
require "active_support/core_ext/string/output_safety"
require "objspace"
def assert_same_object(x, y)
raise unless x.object_id == y.object_id
end
def assert_not_same_object(x, y)
raise unless x.object_id != y.object_id
@schweigert
schweigert / Embedding GoLang into a Ruby application.md
Last active May 3, 2024 19:23
Embedding GoLang into a Ruby application - Blogpost to Magrathealabs

Go Title

I am passionate about Ruby, but its execution time compared to other languages is extremely high, especially when we want to use more complex algorithms. In general, data structures in interpreted languages become incredibly slow compared to compiled languages. Some algorithms such as ´n-body´ and ´fannkuch-redux´ can be up to 30 times slower in Ruby than Go. This is one of the reasons I was interested in embedding Go code in a Ruby environment.

For those who do not know how shared libraries operate, they work in a similar way as DLLs in Windows. However, they have a native code with a direct interface to the C compiler.

Note Windows uses the DLL system, and in this case, this does not necessarily have to be in native code.

One example is DLLs written in C#, which runs on a virtual machine. Because I do not use windows, I ended up not testing if it is poss

@tompng
tompng / hiroshima.rb
Last active September 24, 2017 06:34
ruby hiroshima asciiart
a=->x{x.unpack('m')[0]};C=a.call %(#############################################################################################################################
RD1bMTE3MzE1MDAyNDQ4NSwyODY1MzY0NTQyNzU3LDM5NjQ5MTAyNDg3NDMsMjgzOTU5NjMxMTg0NSwyODM5NTk1NzYyOTgxXQpFPVsyNTUsNjYsMjU1LDY2LDY2LDY2LDY2XQpGPVs2Myw5OSwxNDksMjY1LDc2
MSwxMTkzLDMyNjksMjk0OSwyNDk5LDI2MTEsMzA4Nyw0MDk1XQpHPSVcICAuLi4sLCxYYGAuLi4sLCxYYGB+LS0tOztYJ35+LTo6OztYXn5+Ojo7KChYIn5+ISF8KV1YIiIhISEhIXtYIioqKjw8PE1cLnNwbGl0
KCdYJykKZGVmIGFhYiBhYWMseCx5CiAgeD49MCAmJiB5Pj0wICYmICgoYWFjW3ldfHwwKT4+eCkmMT09MQplbmQKSD1bQ10ucGFjaygnbScpLmRlbGV0ZSgiXG4iKQpAX3Q9QHQ9MApsb29wIGRvCiAgdyxoPTE2
MCw4MAogIEBfdCs9MC4wMQogIEB0PUBfdCUxCiAgYWFkPSgxLi5oKS5tYXB 7KDEu LncpL m1hc HsxfX 0KICB hYWU 9LT4oYWFjLGN4LGN5LGFhZixhYWc9YWFmLGFhaDogMC4xLGFhaTogZmFsc2
UpewogICAgY3csY2g9YWFjLm1heC5iaXRfbGVuZ3RoLGFhYy5zaXplCiA g I C A oW2N4LWFhZi8yLDBdLm1heC5yb3VuZC4uW2N4K2FhZi8yLHctMV0ubWlu
LnJvdW5kKS5lYWNoIGRvIHx4fAogICAgICAoW2N5LWFhZy8yLDBdLm1

Building a GraphQL API in Rails - Part 1

This is a series blog post cover above three topics of GraphQL:

  1. About GraphQL
  2. Building a basic API with Rails
  3. Some best practices

GraphQL is not a new thing, it already exist for a while, the reason I decide to investigate it is because Github released their GraphQL API alpha currently. We know Github has been a very good company for a long time, their RESTful API also becomes some kind of standard for developers, so it's pretty interesting to see what’s new they've been released.