Skip to content

Instantly share code, notes, and snippets.

View bizenn's full-sized avatar
🏠
Working from home

Tatsuya BIZENN bizenn

🏠
Working from home
  • Tokyo
View GitHub Profile
@bizenn
bizenn / init.el
Created August 21, 2020 04:05
go-import-add の候補にシステムのパッケージが含まれなくなってしまったので、無理矢理回避
;; go-system-packagesの初期化はもう少しマシな実装がありそうな気がする
(defvar go-system-packages nil)
(use-package go-mode
:ensure t
:ensure go-eldoc
:ensure flycheck-gometalinter
:ensure godoctor
:init
(add-hook 'go-mode-hook 'go-eldoc-setup)
@bizenn
bizenn / embulk_timestamp_format.md
Last active October 6, 2016 16:24
embulk-filter-timestamp_formatでは、EPOCHより前の日付は正しく扱えない、という話

data/data.txt

1,Alice,Cooper,1947-02-04 11:30:15,0
2,Bob,Brown,1947-12-27 22:01:24.123,0
3,Chris,Squire,1948-03-04 01:02:03.456,0

data.yml

--- apache-maven-3.2.1.ORIG/bin/mvn 2014-02-15 02:40:05.000000000 +0900
+++ apache-maven-3.2.1/bin/mvn 2014-06-13 16:37:15.000000000 +0900
@@ -133,16 +133,21 @@
fi
if [ -z "$JAVA_HOME" ]; then
- javaExecutable="`which javac`"
- if [ -n "$javaExecutable" -a ! "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
- # readlink(1) is not available as standard on Solaris 10.
- readLink=`which readlink`
@bizenn
bizenn / gist:6986763
Created October 15, 2013 05:07
Gauche HEAD build error.
gcc -DHAVE_CONFIG_H -I. -I. -I./../gc/include -I../gc/include -I./../gc/libatomic_ops/src -I../gc/libatomic_ops/src -I/usr/pkg/include -I/usr/local/include -I/usr/pkg/include -I/usr/local/include -no-cpp-precomp -g -O2 -no-cpp-precomp -fPIC -fno-common -fomit-frame-pointer -c vm.c
In file included from vm.c:35:
In file included from ./gauche.h:1183:
./gauche/writer.h:39:35: warning: redefinition of typedef 'ScmWriteContext' is a
C11 feature [-Wtypedef-redefinition]
typedef struct ScmWriteContextRec ScmWriteContext; /* opaque */
^
./gauche.h:508:35: note: previous definition is here
typedef struct ScmWriteContextRec ScmWriteContext;
^
@bizenn
bizenn / corelib-texi.diff
Created October 1, 2013 03:13
Add some Japanese text to Gauche's info.
diff --git a/doc/corelib.texi b/doc/corelib.texi
index ae84764..da3885c 100644
--- a/doc/corelib.texi
+++ b/doc/corelib.texi
@@ -10327,26 +10327,49 @@ Common Lisp.
@subsection Folding generated values
@c NODE 生成された値の畳み込み
+@c EN
Sometimes a procedure is used as a @emph{generator} of a series
@bizenn
bizenn / srfi-19+.scm
Last active June 29, 2018 09:10
Formatter/parser maker compatible with SRFI-19 date->string/string->date
;;; -*- mode: scheme; coding: utf-8 -*-
(define-module srfi-19+
(extend srfi-19)
(use srfi-1)
(use srfi-13)
(use gauche.sequence)
(use gauche.threads)
(export make-date-formatter
make-date-initializer
@bizenn
bizenn / ltsv-pure.scm
Last active December 12, 2015 07:38
Parser for Labeled TSV in Pure Scheme(R5RS).
(define (ltsv-reader in)
(define (rlist->string cl)
(list->string (reverse cl)))
(define (accum-elem cl elem)
(reverse (cons (rlist->string cl) elem)))
(define (make-record rec elem cl)
(reverse (cons (accum-elem cl elem) rec)))
(define (terminate rec elem cl c)
(if (and (null? rec) (null? elem) (null? cl))
c ;; eof
@bizenn
bizenn / ltsv.scm
Last active December 12, 2015 07:28
Labeled TSV reader/writer casual implementation.
;;; -*- mode: scheme; coding: utf-8 -*-
(define-module text.ltsv
(use srfi-13)
(use text.csv)
(export-all))
(select-module text.ltsv)
(define ltsv-reader
@bizenn
bizenn / string-split-with-limit.diff
Created January 23, 2013 00:05
Patch to add limit optional parameter to string-split on Gauche. Sorry but not including document updates.
diff --git a/lib/gauche/stringutil.scm b/lib/gauche/stringutil.scm
index d252322..388eb88 100644
--- a/lib/gauche/stringutil.scm
+++ b/lib/gauche/stringutil.scm
@@ -44,12 +44,20 @@
;; Generic string-split
;; splitter can be a character, a char-set, a string, or a regexp.
-(define (string-split string splitter)
- (cond ((char? splitter) (%string-split-by-char string splitter))
@bizenn
bizenn / modutil.texi.diff
Created October 12, 2012 08:34
control.job の info 和訳追加
diff --git a/doc/modutil.texi b/doc/modutil.texi
index 8b27c05..2383234 100644
--- a/doc/modutil.texi
+++ b/doc/modutil.texi
@@ -1030,66 +1030,141 @@ gosh> #i1/3
@c ----------------------------------------------------------------------
@node A common job descriptor for control modules, Thread pools, Rational-less arithmetic, Library modules - Utilities
@section @code{control.job} - A common job descriptor for control modules
+@c NODE 制御モジュールのための汎用ジョブ記述子, @code{control.job} - 制御モジュールのための汎用ジョブ記述子