2024/04/20 更新
この記事は、自作OS Advent Calendar 2017の 12/6 の記事として書かれました。
主に、ライブラリや仕様書のダウンロード・サイトやリポジトリなどの URL を集めてみました。この他の URL は、以下でブックマークを公開していますので、興味がある方は参照してみてください。
Lisp interpreter in 90 lines of C++ | |
I've enjoyed reading Peter Norvig's recent articles on Lisp. He implements a Scheme interpreter in 90 lines of Python in the first, and develops it further in the second. | |
Just for fun I wondered if I could write one in C++. My goals would be | |
1. A Lisp interpreter that would complete Peter's Lis.py test cases correctly... | |
2. ...in no more than 90 lines of C++. | |
Although I've been thinking about this for a few weeks, as I write this I have not written a line of the code. I'm pretty sure I will achieve 1, and 2 will be... a piece of cake! |
#!/bin/sh | |
#|-*- mode:lisp -*-|# | |
#| | |
exec ros -Q -- $0 "$@" | |
|# | |
(defvar *filters* '(/line)) | |
(defvar *results* '()) | |
(defun /line (output error) | |
(values |
#!/bin/sh | |
#|-*- mode:lisp -*-|# | |
#| <Put a one-line description here> | |
exec ros -Q -- $0 "$@" | |
|# | |
(progn ;;init forms | |
(ros:ensure-asdf) | |
;;#+quicklisp (ql:quickload '() :silent t) | |
) |
2024/04/20 更新
この記事は、自作OS Advent Calendar 2017の 12/6 の記事として書かれました。
主に、ライブラリや仕様書のダウンロード・サイトやリポジトリなどの URL を集めてみました。この他の URL は、以下でブックマークを公開していますので、興味がある方は参照してみてください。
2024/05/01 更新
この記事は、自作OS Advent Calendar 2017の 12/4 の記事として書かれました。C 言語と JavaScript、それに両者を繋ぐ役割を持つ Web IDL についてのメモです。
主に、仕様書のダウンロード・サイトなどの URL を集めてみました。この他の URL は、以下でブックマークを公開していますので、興味がある方は参照してみてください。
この文章は、 Steve Losh 氏の記事 "A Road to Common Lisp" の翻訳です。
原文はこちらです: http://stevelosh.com/blog/2018/08/a-road-to-common-lisp/
A Road to Common Lisp (Common Lisp への道)
これまで、「最近のCommon Lispをどう学ぶとよいでしょう?」と助言を求めるメールをたくさん受け取ってきました。そこで私は、これまでメールやソーシャルメディアに投稿した全てのアドバイスを書き下すことにしました。これが誰かに有益ならば幸いです。
#| | |
$ cat test.f | |
#!forth | |
: <= over over < rot swap = or ; | |
: fib dup 0 swap <= if drop 0 else dup 1 = if drop 1 else | |
dup 1 swap - fib swap 2 swap - fib + then then ; | |
10 fib | |
$ ros run -l uf-reader.lisp -l test.f -q | |
|# | |
(require 'uf) |
// 命令セット一覧(2019-04-03) | |
// 命名規則が揺れている…… | |
END // 実行終了。以降、速度などそのままに動き続ける | |
VANISH // バイトコードを動かしているActor(敵や弾丸の総称)自体を消して終了 | |
// スタック操作系 | |
PUSH_8 | |
PUSH_16 | |
PUSH_32 |
(1) ある日、yamaya さんという怖い方がこのツイートを投稿する。
(ql:quickload :chirp) | |
(setf chirp:*oauth-api-key* "Put" | |
chirp:*oauth-api-secret* "your" | |
chirp:*oauth-access-token* "credencials" | |
chirp:*oauth-access-secret* "here!") | |
(print (chirp:account/verify-credentials)) | |
(defun status-text-without-mention (status) |