Skip to content

Instantly share code, notes, and snippets.

View udzura's full-sized avatar

Kondo Uchio udzura

View GitHub Profile
From d2740fe5956726c787ce29ecf85a51a0b44a9bbd Mon Sep 17 00:00:00 2001
From: Uchio Kondo <[email protected]>
Date: Mon, 17 Mar 2025 11:51:25 +0900
Subject: [PATCH] Revert "Clear all refined CCs on reopening refinement mod"
This reverts commit 18ee7c9a108bf3424814565377c8796e5e455cf7.
---
test/ruby/test_refinement.rb | 17 -----------------
vm_method.c | 1 -
2 files changed, 18 deletions(-)
@udzura
udzura / methods.c
Created February 11, 2025 09:58
mruby/c 1.2 で実装されているCレベルメソッド(定義箇所の抜粋)
mrbc_define_method(vm, mrbc_class_array, "new", c_array_new);
mrbc_define_method(vm, mrbc_class_array, "+", c_array_add);
mrbc_define_method(vm, mrbc_class_array, "[]", c_array_get);
mrbc_define_method(vm, mrbc_class_array, "at", c_array_get);
mrbc_define_method(vm, mrbc_class_array, "[]=", c_array_set);
mrbc_define_method(vm, mrbc_class_array, "<<", c_array_push);
mrbc_define_method(vm, mrbc_class_array, "clear", c_array_clear);
mrbc_define_method(vm, mrbc_class_array, "delete_at", c_array_delete_at);
mrbc_define_method(vm, mrbc_class_array, "empty?", c_array_empty);
mrbc_define_method(vm, mrbc_class_array, "size", c_array_size);
def clientInitialize: () -> void
def setup: (Integer) -> SharedMemory
def receiveGameParams: (Integer) -> bool
def tick: (Integer) -> void
@udzura
udzura / Cargo.toml
Created December 18, 2024 10:01
grayscale.wasm
[package]
name = "advent-ruby-grayscale"
version = "0.1.0"
edition = "2021"
[dependencies]
base64 = "0.22.1"
image = { version = "0.25.2", default-features = false, features = ["png"] }
[lib]
use core::str;
use core::slice::from_raw_parts;
use base64::{engine::general_purpose, Engine};
use image::{codecs::png, load_from_memory_with_format, ImageBuffer};
#[no_mangle]
pub unsafe fn grayscale(
width: u32, height: u32, src: *const u8, slen: i32,
) -> *const u8 {
MATCH_EQ = /(-?)([0-9]*)x(\+|-)([0-9]*)y=(-?)([0-9]+)/
def parse_equation(eq)
unless eq.match(MATCH_EQ)
raise "unsupported"
end
x = 0
y = 0
xsig = $1
@udzura
udzura / wordle.log
Created January 21, 2022 07:57
@udzura のwordleの記録です
コメントをしていきます
@udzura
udzura / SECKUN 2021 pub.md
Last active April 20, 2024 00:58
SECKUN 2021/ProSec-IT 2021 コンテナ演習資料(公開版)

SECKUN 2021/ProSec-IT 2021 コンテナ演習資料(公開版)

この資料について

九州大学のSECKUN 2021/ProSec-IT(enPiT-Pro) 2021の共通カリキュラムにおいて、近藤 @udzura が担当したコンテナ概要の授業にて使用した教材です。

今回、公益性を鑑み、授業固有の連絡事項などを削除した状態で公開します。

@udzura
udzura / pty.rb
Created May 6, 2021 09:53
dup2 を自分で使う場合
require 'fiddle/import'
module Dupper
extend Fiddle::Importer
dlload 'libc.so.6'
extern 'int dup2(int oldfd, int newfd);'
end
require 'pty'
master, tty = PTY.open

@udzura のやってきたこと

興味関心分野

リアクティブなWebホスティングシステムに向いたコンテナランタイムの開発

<script async class="speakerdeck-embed" data-id="a52bd0069cd447a78681bc951d76aca6" data-ratio="1.77777777777778" src="//speakerdeck.com/assets/embed.js"></script>