This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#|-*- mode:lisp -*-|# | |
#| | |
exec ros -Q -- $0 "$@" | |
|# | |
(defparameter *width* 0) | |
(defparameter *height* 0) | |
(defun neighbors (pos) | |
(let ((x (car pos)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#|-*- mode:lisp -*-|# | |
#| | |
exec ros -Q -- $0 "$@" | |
|# | |
#| | |
$ ros build lisp.ros | |
$ ./lisp hoge | |
|# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Siv3D.hpp> | |
double world_line = 0.0; | |
double readingSteiner() { | |
// 1%の確立で世界線が大きく変動する。 | |
if (RandomBool(0.01)) | |
{ | |
if (RandomBool(0.5)) // 減るか増えるかは半分半分 | |
{ | |
++world_line; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defparameter *stack* nil) | |
(defun push-stack (val) | |
(push val *stack*)) | |
(defun pop-stack () | |
(pop *stack*)) | |
(defparameter *defined* nil) | |
(defun definedp (name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ql:quickload :alexandria) | |
(defparameter *globol-env* (make-hash-table)) | |
(defun bindp (expr env) | |
(second (multiple-value-list (gethash expr env)))) | |
(defun get-env (expr env) | |
(gethash expr env)) | |
(defun set-env (var val env) | |
(setf (gethash var env) val)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Kernel, except: [+: 1, +: 2, -: 1, -: 2, *: 2, /: 2] | |
defprotocol Arithmetic do | |
def left + right | |
def left - right | |
def left * right | |
def left / right | |
def +value | |
def -value | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <iterator> | |
template <class T, class F> | |
decltype(auto) map(const std::vector<T> a, const F fn) { | |
std::vector<decltype( fn(a[0]) )> result = {}; | |
std::transform(a.cbegin(), a.cend(), std::back_inserter(result), fn); |