Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am okuoku on github.
  • I am okuoku (https://keybase.io/okuoku) on keybase.
  • I have a public key ASDhghlWoiFEmE3m2cDkKWCfgVmsVKfyNoqEZzMkzRFn_Ao

To claim this, I am signing this object:

@okuoku
okuoku / defconfig
Last active June 24, 2019 10:00
LKL test
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_NO_HZ_IDLE=y
# CONFIG_SYSFS_SYSCALL is not set
CONFIG_KALLSYMS_USE_DATA_SECTION=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_BASE_FULL is not set
# CONFIG_FUTEX is not set
# CONFIG_SIGNALFD is not set
# CONFIG_TIMERFD is not set
# CONFIG_AIO is not set
@okuoku
okuoku / check.scm
Created June 11, 2017 08:23
Unsuccessfull make-coreops-fake on Gauche
(define (make-coreops-fake)
(define-syntax define-query0
(syntax-rules ()
((_ q (sym0 sym1) ...)
(define (q symbol)
(case symbol
((sym0) sym1)
...
(else
@okuoku
okuoku / sorted.scm
Created June 3, 2017 21:21
Sorted (yuni scheme) procedures
;; "4.2.6. Dynamic bindings"
;; parameterize is a syntax
make-parameter
;; "6.1. Equivalence predicates"
eqv? eq? equal?
;; "6.2.6. Numerical operations"
;; Skip: rational? rationalize infinite? numerator denominator
;; make-rectangular make-polar real-part imag-part magnitude angle
@okuoku
okuoku / check3.scm
Created February 11, 2016 18:07
Kawa --no-inline requirement
(define-library (minitype)
(export
miniobj-minitype-ref
miniobj-minitype-set!
make-minitype-obj)
(import (scheme base) (scheme write))
(begin
(define (make-minitype-obj)
(vector "UNINITIALIZED_x" "UNINITIALIZED_y"))
# Reader error: NRx7xxxx
NRE70001:
J: 表記エラーが多すぎるため読み取りを中止しました。
NRE70002:
J: inline hex escapeがセミコロンによって終端されていません。
NRE70003:
J: inline hex escapeによって指定された値は有効な文字ではありません。
@okuoku
okuoku / gist:3f2e469497bbf12575e8
Created July 19, 2015 17:21
Compiler of SECDR scheme (GPL)
;;
;; compiler.scm
;;
;;;; SECDR Compiler
;;
;; Date written 11-Feb-1990 by Atsushi Moriwaki
;; Date revised 20-Feb-1990 by Atsushi Moriwaki
;; Date revised 06-Mar-1990 by Atsushi Moriwaki
;; Date revised 31-Jul-1992 by Shoichi Hayashi
@okuoku
okuoku / gist:f9b465452b0aa9c49b8f
Created June 6, 2015 19:52
Generated SDL2 binding for yuni
#include "SDL.h"
#include <yuniffi/stub/_top.h>
#define EXPORT_SDL_MAIN_NEEDED(k)\
YUNIFFI_EXPORTCLASS_CONST_SINT(k, "SDL_MAIN_NEEDED", SDL_MAIN_NEEDED)
#define EXPORT_SDL_ICONV_ERROR(k)\
YUNIFFI_EXPORTCLASS_CONST_UINT(k, "SDL_ICONV_ERROR", SDL_ICONV_ERROR)
#define EXPORT_SDL_ICONV_E2BIG(k)\
@okuoku
okuoku / gist:e51fd2bfc88d67172dff
Created June 3, 2015 17:19
call-stubs.inc.c from latest NMosh
typedef int (*func_ip_i_t)(int, void*);
void
callstub_ip_i(func_ip_i_t func, uint64_t* args, void* ret){
*(intptr_t*)ret = func(*(int *)(char *)&args[0], *(void* *)(char *)&args[1]);
}
typedef int (*func__i_t)();
void
callstub__i(func__i_t func, uint64_t* args, void* ret){
*(intptr_t*)ret = func();