Skip to content

Instantly share code, notes, and snippets.

Yuya Kono takoeight0821

Block or report user

Report or block takoeight0821

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rpn.lisp
(defparameter *stack* nil)
(defun push-stack (val)
(push val *stack*))
(defun pop-stack ()
(pop *stack*))
(defparameter *defined* nil)
(defun definedp (name)
@takoeight0821
takoeight0821 / lhtrpg.lisp
Last active Jun 25, 2016
lhtrpgをCommon Lispでいじる
View lhtrpg.lisp
(mapc #'ql:quickload
(list :drakma :jonathan))
(setq drakma:*drakma-default-external-format* :utf-8)
(pushnew '("application" . "json") drakma:*text-content-types* :test #'equal)
(defun dl-lhz (label)
(jonathan:parse (drakma:http-request (format nil "http://lhrpg.com/lhz/api/~a.json" label)) :as :hash-table))
(defparameter *skills* (dl-lhz "skills"))
(defparameter *items* (dl-lhz "items"))
@takoeight0821
takoeight0821 / Main.cpp
Last active Dec 24, 2015
Siv3Dでダイバージェンスメーターのスケッチ
View Main.cpp
#include <Siv3D.hpp>
double world_line = 0.0;
double readingSteiner() {
// 1%の確立で世界線が大きく変動する。
if (RandomBool(0.01))
{
if (RandomBool(0.5)) // 減るか増えるかは半分半分
{
++world_line;
@takoeight0821
takoeight0821 / lisp.ros
Created Dec 5, 2015
ちょっとCommon Lispをいじりたい時に
View lisp.ros
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
#|
$ ros build lisp.ros
$ ./lisp hoge
|#
@takoeight0821
takoeight0821 / lifegame.ros
Last active Nov 15, 2015
./lifegame.ros *width* *height* *wait-time*
View lifegame.ros
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
(defparameter *width* 0)
(defparameter *height* 0)
(defun neighbors (pos)
(let ((x (car pos))
@takoeight0821
takoeight0821 / make.log
Created Aug 8, 2015
ros install sbcl/1.2.14のmake.log一部抜粋
View make.log
; SYS:CONTRIB;SB-POSIX;POSIX-TESTS-TMP.FASL.NEWEST written
; compilation finished in 0:00:00.019
Doing 70 pending tests of 70 tests total.
SB-POSIX-TESTS::CHDIR.1 SB-POSIX-TESTS::CHDIR.2 SB-POSIX-TESTS::CHDIR.3
SB-POSIX-TESTS::CHDIR.4 SB-POSIX-TESTS::CHDIR.5 SB-POSIX-TESTS::CHDIR.6
SB-POSIX-TESTS::CHDIR.7 SB-POSIX-TESTS::CHDIR.8 SB-POSIX-TESTS::CHDIR.ERROR.1
SB-POSIX-TESTS::CHDIR.ERROR.2 SB-POSIX-TESTS::MKDIR.1 SB-POSIX-TESTS::MKDIR.2
SB-POSIX-TESTS::MKDIR.ERROR.1 SB-POSIX-TESTS::MKDIR.ERROR.2
SB-POSIX-TESTS::MKDIR.ERROR.3 SB-POSIX-TESTS::RMDIR.1 SB-POSIX-TESTS::RMDIR.2
SB-POSIX-TESTS::RMDIR.ERROR.1 SB-POSIX-TESTS::RMDIR.ERROR.2
@takoeight0821
takoeight0821 / posix-tests.lisp.patch
Last active Aug 29, 2015
fix sb-posix/posix-tests.lisp failed on Japanese Mac OS X
View posix-tests.lisp.patch
diff --git a/contrib/sb-posix/posix-tests.lisp b/contrib/sb-posix/posix-tests.lisp
index ec5a49c..444b3b0 100644
--- a/contrib/sb-posix/posix-tests.lisp
+++ b/contrib/sb-posix/posix-tests.lisp
@@ -3,6 +3,9 @@
(in-package "SB-POSIX-TESTS")
+#+darwin(setf sb-alien::*default-c-string-external-format* :utf-8)
+#+darwin(setf sb-impl::*default-external-format* :utf-8)
@takoeight0821
takoeight0821 / log.txt
Created Jun 14, 2015
build roswell log
View log.txt
➜ roswell git:(master) sh bootstrap
configure.ac:14: installing './compile'
configure.ac:10: installing './install-sh'
configure.ac:10: installing './missing'
src/Makefile.am:30: warning: CLEANFILES multiply defined in condition TRUE ...
src/Makefile.am:24: ... 'CLEANFILES' previously defined here
src/Makefile.am: installing './depcomp'
➜ roswell git:(master) ✗ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
View Group.hs
import Data.Monoid
class Group g where
gidentity :: g
gop :: g -> g -> g
ginverse :: g -> g
instance Num a => Group (Sum a) where
gidentity = Sum 0
(Sum x) `gop` (Sum y) = Sum (x + y)
@takoeight0821
takoeight0821 / guess_my_number.cpp
Created May 17, 2015
数当てさせゲーム
View guess_my_number.cpp
#include <iostream>
int small = 1;
int big = 100;
int guessMyNumber()
{
return (small + big) / 2;
}
You can’t perform that action at this time.