並び順

ブックマーク数

期間指定

  • から
  • まで

41 - 80 件 / 159件

新着順 人気順

lispの検索結果41 - 80 件 / 159件

  • 継続を扱えるLispの簡易的な処理系をRubyで実装 - Qiita

    プログラミング言語の処理系を実装してみたく思い、LispのようなS式を実行する簡易的な処理系を書いてみました。 「第一級の継続(call/cc)を実装する」というのが一番の目標でした。 ひとまずは動くものができた(と思う)ので、実装するにあたって考えたこと、試したことなどを書き残しておこうと思います。 ソースコードはこちらにあります。 言語を軽く説明 Rubyで実装したS式の簡単な処理系です。 VM(バーチャルマシン)実行方式を採用しました。ソースコードを独自のバイトコードに変換して、それを独自のVMで実行します 扱える値は整数と文字列くらいです。組み込みの関数名などは若干Rubyに寄せています。if、while、変数などは実装してあって、こんなコードが動きます。 (= a 5) (= sum 0) (while (!= a 0) (= sum (+ sum a)) (= a (- a 1

      継続を扱えるLispの簡易的な処理系をRubyで実装 - Qiita
    • A tutorial quantum interpreter in 150 lines of Lisp

      By Robert Smith Simulating a universal, gate-based quantum computer on a classical computer has many uses and benefits. The top benefit is the ability to inspect the amplitudes of the system’s state directly. However, while the mathematics is very well understood, implementing a general-purpose simulator has largely been folk knowledge. In this tutorial, we show how to build an interpreter for a g

      • Powerful Scheme interpreter in JavaScript | LIPS Scheme

        ;; &() is object literal used with quasiquote (let ((obj `&(:name "LIPS Scheme" :version ,lips.version))) ;; you can access JavaScript properties ;; with dot notation, print is display + newline (print (string-append obj.name " " obj.version)) ;; you can mix scheme and JavaScript (setTimeout (lambda () (alert (JSON.stringify obj))) 1000) #void) With LIPS you can mix Scheme and JavaScript. You can

          Powerful Scheme interpreter in JavaScript | LIPS Scheme
        • 「bit全巻電子化記念に付きLISP記事全部読む」

          zick @zick_minoh ((LAMBDA (LAMBDA) `((LAMBDA (LAMBDA) ,LAMBDA) ',LAMBDA)) '`((LAMBDA (LAMBDA) ,LAMBDA) ',LAMBDA)) zick @zick_minoh bitが全巻電子化されたので、全部読みたいけど時間がかかりすぎるから、とりあえずLISPの記事だけ読むことにした。具体的には g000001.cddddr.org/3847385058 ここに書いてる記事。 2021-12-07 12:18:40

            「bit全巻電子化記念に付きLISP記事全部読む」
          • 限定継続いろいろ | 雑記帳

            このブログでは限定継続について過去に何回か記事を書きました: LunarMLと継続限定継続と例外とモナド 今回、LunarML向けのVMに限定継続を実装してみて理解が深まったので、改めて記事にします。 限定継続:スタックを使ったざっくりとした説明 今回はスタックを使って限定継続をざっくりと説明してみます。 関数という概念を持つプログラミング言語では、スタックを使って関数の呼び出しを管理することが多いです。コールスタックとか、スタックのバックトレースとか言いますよね。ここではネイティブのスタックか仮想マシンのスタックかというのは問いません。 関数を呼び出すと、フレームと呼ばれる領域がスタックに確保されて、関数への引数やローカル変数はそこに確保されたりします。 例えば、以下のプログラムを考えます: void g() { // すごい計算 } void f() { double j; g();

            • Why I Chose Common Lisp — Dan's Musings

              Goodbye, Clojure After ~7 years, I was done with Clojure. I was writing a some CLI apps, and I hated how long they took to start up. The community at large seemed not to care about this problem, except for the babashka folks. However, I spent long, hard hours banging my head against native-image and it just wasn't working out. It was incredibly painful, and at the end of it, I still didn't have st

              • haku

                Haku A toy functional programming language based on literary Japanese. Is Haku for you? Haku lets you write programs that look very much like written Japanese. So you need to be familiar with written Japanese to program in Haku. I have added translations and explanations to the documentation. Haku is an experiment, not a practical programming language. Several of its features are rather contrary.

                  haku
                • Gamedev in Lisp. Part 2: Dungeons and Interfaces · Wiki · Andrew Kravchuk / cl-fast-ecs · GitLab

                  Blazingly fast Entity-Component-System microframework ⚡📦 https://awkravchuk.itch.io/cl-fast-ecs

                    Gamedev in Lisp. Part 2: Dungeons and Interfaces · Wiki · Andrew Kravchuk / cl-fast-ecs · GitLab
                  • Glispの展望と悩ましいこと(誰か助けてください) | 麦 Baku

                    Glispを開発している中で、このエントリにも上げたような問題があったので言語処理系自体を、一般的なLisp評価器とは異なった、よりGUIやデザインとの親和性の高いものへとアップデートしようとしています。しかしまた色々行き詰まった所が出てきたので、言語化も兼ねて今一度悩んでいるところを書き出しておきます。 言い訳までに、僕はただの映像専攻の美大中退者でして、言語処理系に関して何の専門教育を受けたこともないので、車輪の再発明をしているような予感もありますし、以下の考察も適切ではないかもしれません。もし、この辺勉強するとスッキリするよ~とか、こういう概念があるんよ~みたいなアドバイスがあれば、断片的にでも構わないので教えてくださるととても嬉しいです。 Lispの何が問題だったか? そのシンボルが指し示す値、関数の実体、そして型が、評価されるまで分からない(Lispは動的型付けなので)その関数の

                      Glispの展望と悩ましいこと(誰か助けてください) | 麦 Baku
                    • Lispの面白いサイトまとめ - Qiita

                      Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

                        Lispの面白いサイトまとめ - Qiita
                      • GitHub - Robert-van-Engelen/tinylisp: Lisp in 99 lines of C and how to write one yourself. Includes 20 Lisp primitives, garbage collection and REPL. Includes tail-call optimized versions for speed and reduced memory use.

                        You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                          GitHub - Robert-van-Engelen/tinylisp: Lisp in 99 lines of C and how to write one yourself. Includes 20 Lisp primitives, garbage collection and REPL. Includes tail-call optimized versions for speed and reduced memory use.
                        • Emacsと暦 - Qiita

                          はじめに 本記事は、Emacs のカレンダー機能・天文計算ツールの簡単な紹介、Emacsでサポートされている世界の暦、また本フレームワークを使った、和暦の実装を試みと、その際に気づいた注意点を紹介します。また「またアジア各国の旧暦に関する雑学」についても触れています。 世界の暦 世界には様々な暦が存在します。 人類が月の満ち欠けを意識し、農耕・牧畜、そして宗教祭礼を始めた頃から、一年のうち、どの時期に何をするかを記録することは、社会生活を営む上で重要となり、そこから暦の概念は始まったと考えられます。 その中でもグレゴリオ暦は、世界的に共通の暦として使われ、日本でも多くの年中行事の基準となっています。 しかし、欧米を除いて単一の暦を使っている国はあまり多くはなく、ほとんどの国が、ローカルな暦とグレゴリオ暦を併用しています。グレゴリオ暦のみを使っている日本は、欧米以外では数少ない例外です。 た

                            Emacsと暦 - Qiita
                          • Why I'm Writing a Scheme Implementation in 2025 (The Answer is Async Rust)

                            Why I'm Writing a Scheme Implementation in 2025 (The Answer is Async Rust) by Matthew Plant This blog post is an introduction to scheme-rs. I really love Rust. I’ve been using it as my language of choice for about ten years now. I believe that it is a remarkably well designed language, and that includes the parts that are often most criticized, most notably async. But while I thing that async Rust

                            • Lispはなぜ神の言語と呼ばれるのか - SEむううみんのプログラミングパラダイス

                              古から存在するプログラミング言語Lisp。その通り名の一つに「神の言語」というものがある。 なんという甘美な響きだろうか。この名前だけで男子中学生は全員習得することを決心するだろう。そのくらいインパクトのある名前である。文部科学省はプログラミング教育を推進するにあたって、この通り名を公式に採用することを真剣に検討されると良いと思う。 さて、「神の言語」の勉強を始めてみて驚くだろう。どのあたりが神なのかよくわからないのだ。たしかに丸括弧は多い。多いが、それと神との関連性はよくわからない。 何か土着の信仰の話なのだろうか?あなたがそう戸惑うのも無理からぬことだ。 私自身、前からこのフレーズは聞いたことがあったが、あまり理解していなかった。そこで今回改めて調べてみたので共有しようと思う。 「神の言語」の由来 そもそも、Lispは神の言語だと誰が言い出したのか?どうやら海外でそのような歌が作られた

                              • Emacs Lisp Elements

                                This book, written by Protesilaos Stavrou, also known as “Prot”, provides a big picture view of the Emacs Lisp programming language. The information furnished herein corresponds to stable version 1.0.0, released on 2025-04-12. Official page: https://protesilaos.com/emacs/emacs-lisp-elements Git repository: https://github.com/protesilaos/emacs-lisp-elements The purpose of this book is to provide yo

                                  Emacs Lisp Elements
                                • Scheme in the browser: A Hoot of a tale -- Spritely Institute

                                  Scheme in the browser: A Hoot of a taleDave Thompson — October 10, 2023 Hey there, it’s been a while! We’re back to share some more exciting news about Guile Hoot, a WebAssembly toolchain and Scheme→WASM compiler. In our last post we demonstrated that the Guile Hoot toolchain can be used to assemble programs written in WebAssembly Text (WAT) format, which allowed us to develop for the WASM-4 fanta

                                    Scheme in the browser: A Hoot of a tale -- Spritely Institute
                                  • 【iOS16】設定アプリのURLスキーム一覧(標準アプリ) - もう一人のY君

                                    ランキング参加中iPhone ランキング参加中Apple Modified 2025/4/3 iOS16のiPhoneで使用可能な設定アプリおよび標準アプリのURLスキームを紹介しています. スポンサーリンク 検証 環境および先頭の文字列について 設定アプリ(起動) アカウント Apple ID iCloud > 名前、電話番号、メール iCloud > パスワードとセキュリティ iCloud > お支払いと配達先 > お支払いを追加 サブスクリプション iCloud iCloud > パスワードとキーチェーン iCloud > バックアップ 探す ファミリー共有 連絡先キー確認 Apple Pencil Wi-Fi Bluetooth モバイル通信 通信のオプション(シングルSIMの場合) 通信のオプション(デュアルSIMの場合) "インターネット共有"を設定 通知 プレビューを表示 各

                                      【iOS16】設定アプリのURLスキーム一覧(標準アプリ) - もう一人のY君
                                    • A Lisp Interpreter Implemented in Conway’s Game of Life

                                      Lisp in Life is a Lisp interpreter implemented in Conway’s Game of Life. The entire pattern is viewable on the browser here. To the best of my knowledge, this is the first time a high-level programming language was interpreted in Conway’s Game of Life. Running Lisp on the Game of Life Lisp is a language with a simple and elegant design, having an extensive ability to express sophisticated ideas as

                                        A Lisp Interpreter Implemented in Conway’s Game of Life
                                      • プログラミング言語における再帰の初出はLISPではなかった - Arantium Maestum

                                        ポール・グレハムの記事の一つにWhat Makes Lisp Different?というものがある: www.paulgraham.com ポール・グレハムらしくよく書かれていて、C言語などと比較した場合のLispの特徴をうまく捉えているように思う。 その中の一つが Recursion. Recursion existed as a mathematical concept before Lisp of course, but Lisp was the first programming language to support it. (It's arguably implicit in making functions first class objects.) こうある通り、私も今まで深く考えたこともなく「プログラミングにおける再帰はLispが由来」と考えていたのだが、前回の記事を書く

                                          プログラミング言語における再帰の初出はLISPではなかった - Arantium Maestum
                                        • GitHub - jart/sectorlisp: Bootstrapping LISP in a Boot Sector

                                          LISP has been described as the Maxwell's equations of software. Yet there's been very little focus to date on reducing these equations to their simplest possible form. Even the original LISP paper from the 1960's defines LISP with nonessential elements, e.g. LABEL. This project aims to solve that by doing three things: We provide a LISP implementation that's written in LISP, as a single pure expre

                                            GitHub - jart/sectorlisp: Bootstrapping LISP in a Boot Sector
                                          • #:g1: 祝bit電子復刻 & bitのLisp記事まとめ

                                            Lisp一人 Advent Calendar 2021 2日目の記事です。 bitは1969年から2001年まで刊行されていた、コンピューター科学寄りのコンピューター誌でした。 Lispの記事も豊富にあるのですが、その他の記事も非常に興味深い内容で今読んでも面白い内容です。 復刊の声も強かったのですが、この度イースト株式会社の尽力により電子復刻となったようです。 素晴らしい! 共立出版 コンピュータサイエンス誌『bit』 bitには古くは後藤英一先生のLISP連載等に始まり、今読んでも面白いLisp記事が沢山あります。 以前から日本で出版されたLisp本の目録を恐らく数十〜百時間という無駄な時間を掛けて作成していましたが、bit電子版復刻によりついに火を吹く時が来たようです。 このまとめには、bit以外の本も載っていますが、ページ内で適当に検索してもらって、リンクに飛べばAmazonの商品

                                            • GitHub - coalton-lang/coalton: Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp.

                                              (in-package #:coalton-user) (named-readtables:in-readtable coalton:coalton) (coalton-toplevel ;; Define Coalton `Symbol`s as Lisp `cl:keyword`s. (repr :native cl:keyword) (define-type Symbol) ;; Bind a Lisp function into Coalton. (declare sym (String -> Symbol)) (define (sym s) "Create a new symbol named `s`." (lisp Symbol (s) (cl:intern s "KEYWORD"))) ;; Define equality of `Symbol` types using CL

                                                GitHub - coalton-lang/coalton: Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp.
                                              • GitHub - woodrush/lisp-in-life: A Lisp interpreter implemented in Conway's Game of Life

                                                You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                  GitHub - woodrush/lisp-in-life: A Lisp interpreter implemented in Conway's Game of Life
                                                • llrl programming language

                                                  github.com/yubrot/llrl Rust + LLVMで自作言語をセルフホスティングした話 Rust + LLVM による自作プログラミング言語処理系。大きな特徴は以下の 3 つ。 Hindley-Milner ベースの型推論による静的型付け (+型クラス) Lisp-like な S 式によるシンタックスと LLVM JIT によるマクロ 完全なセルフホスティングコンパイラ実装 目標: セルフホスティング llrl は複合的な理由で作り始めたが、とにかく一度完全にセルフホストされた言語処理系を実装したいという気持ちからセルフホスティングを最優先の目標とした。 プログラミング言語のセルフホスティングは、以下のような明確なゴールを設定できる。 何らかの既存のプログラミング言語によって自作言語コンパイラを実装する → 世代 0 自作言語、およびその標準ライブラリをコンパイラを実装

                                                    llrl programming language
                                                  • Bauble

                                                    • GitHub - udem-dlteam/ribbit: A portable, compact and extensible Scheme implementation that is fully R4RS compliant. This includes closures, I/O, tail calls, first-class continuations and a Read Eval Print Loop (REPL). The R4RS Scheme REPL fits inside 6.5K

                                                      Currently, Ribbit has only been tested with Gambit v4.7.5, and may not work with other Scheme implementations. The Ribbit AOT compiler is written in Scheme and can be executed with Gambit v4.7.5. The compiler's source code is in a single file: src/rsc.scm. Ribbit currently compiles Scheme code to more than 15 different host languages. To select a language, use the -t compiler option followed by th

                                                        GitHub - udem-dlteam/ribbit: A portable, compact and extensible Scheme implementation that is fully R4RS compliant. This includes closures, I/O, tail calls, first-class continuations and a Read Eval Print Loop (REPL). The R4RS Scheme REPL fits inside 6.5K
                                                      • Emacs の起動時間を""詰める""

                                                        Emacs はプラグインを増やしていくと起動に何秒もかかって重い、という話をみることがあります。 しかし、考えてみれば Emacs には 1000 以上の Emacs Lisp ファイルが初めから同梱されているわけで、そこに数十のプラグインを足しただけで爆裂に遅くなるのは、なにか設定にも問題がある気がします。 この本では、 Emacs の起動時間を徹底的に縮めるテクニックたちを紹介します。 設定内容自体の改善から、 Emacs の仕組みを利用したハック的な技術まで、これまでに試して効果のあった工夫を総括した内容になっています。

                                                          Emacs の起動時間を""詰める""
                                                        • GitHub - mattwparas/steel: An embedded scheme interpreter in Rust

                                                          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                            GitHub - mattwparas/steel: An embedded scheme interpreter in Rust
                                                          • 2025年のCommon Lispの処理系はこれだ!

                                                            もともとQiitaで書いていた記事ですが、Qiitaを退会したところすべて消えてしまいました。 あのまとめどこいったの?と訊ねられるので、Zennで復活 SBCL (これがおすすめだ!) 2025年もSBCLが充実の一年ではないでしょうか(2015年から変化なし) 大体月に一度リリースしていますが、途切れることもなく安定しています。 Common Lisp Community Survey 2024では実に全体の87.67%がSBCLユーザーでした。 Common Lisp Community Survey 2024 Results その他の処理系 LispWorks ネイティブコンパイラで速度も高速。周辺ライブラリや処理系の機能は充実しています。 コンパイル速度は、CCLと同等かそれ以上です(cl-bench比較) 日本国内ではマイナーですが、ヨーロッパなどを中心に、マルチプラットフォー

                                                              2025年のCommon Lispの処理系はこれだ!
                                                            • State of the Common Lisp ecosystem, 2020 🎉 - Lisp journey

                                                              NEW: 9 videos (86min) about CLOS on my Common Lisp course. Out of 7h+ of content. Rated 4.7/5. Learn more and stay tuned. 🎥 I also have cool Lisp showcases on Youtube . The last ones: how to build a web app in Common Lisp, part 1 and 2. This is a description of the Common Lisp ecosystem, as of January, 2021, from the perspective of a user and contributor. The purpose of this article is both to gi

                                                              • GitHub - baku89/glisp: Glisp is a Lisp-based design tool that combines generative approaches with traditional design methods, empowering artists to discover new forms of expression.

                                                                Demo (Chrome Only) Documentation 🇺🇸 English 🇯🇵 日本語 Glisp, an acronym for Graphical LISP, is the prototyping project to experiment what if a design tool meets a way of creative coding, and obtain the self-bootstrapping power of LISP. This tool looks like the integration of Illustrator and Processing IDE at a glance. And in fact, it adopts both benefits of intuitiveness of direct manipulation on

                                                                  GitHub - baku89/glisp: Glisp is a Lisp-based design tool that combines generative approaches with traditional design methods, empowering artists to discover new forms of expression.
                                                                • On repl-driven programming - by mikel evins

                                                                  Once upon a time, someone with the handle “entha_saava” posted this question on Hacker News: Can someone knowledgeable explain how are lisp REPLs different from Python / Ruby REPLs? What is the differentiating point of REPL driven development? The answer is that there is a particular kind of programming in which you build a program by interacting with it as it runs, and there are certain languages

                                                                  • LispKit Lisp処理系の実装 序 - Arantium Maestum

                                                                    純粋関数型Lisp方言であるLispKit LispのインタプリタとSECD抽象機械の機械語へのコンパイラを作成する。 タネ本はHendersonの「Functional Programming - Application & Interpretation」で、この本に載っているISWIMやPASCALのコードを大体なぞるようにPythonで書いていく。(最近出た「コンパイラー原理と構造ー」でもSECDマシンへのコンパイルの話題が出ているらしいがまだ届いていないので未確認・・・) 例によって長くなるので複数の記事に分ける。 流れとしては以下のようになる: LispKit Lispの紹介 (本記事) パーサとAST インタプリタ 前編 後編 SECD抽象機械の実装 1 2 3 SECD機械語へのコンパイラ SECD抽象機械ガベージコレクション LispKit Lisp LispKit Lis

                                                                      LispKit Lisp処理系の実装 序 - Arantium Maestum
                                                                    • Second Draft (in-progress) · Learn Lisp The Hard Way

                                                                      Learn Lisp The Hard Way (Second Draft, In-Progress) by "the Phoeron" Colin J.E. Lupton ;; Welcome to L(λ)THW! (let ((llthw '(learn lisp the hard way))) (format t "~{~@(~A~)~^ ~}, because ~{~A~^ ~} is easier!" llthw (cddr llthw))) ;; Common Lisp: Powerful, Expressive, Programmable, General Purpose, Multi-Paradigm. This is a draft-in-progress edition of Learn Lisp the Hard Way. Content is being cons

                                                                      • Rustで簡単なLispを書いてみた

                                                                        初めに 先日Rustの勉強で、jpmens/joをRustに移植してみたんですが、 ちょっと課題がシンプル過ぎたので、Lisp処理系を書いてみました。 本記事は「こんなことをやったよ」くらいの内容で、実装について細かくは書いていないため、 それでも興味ある方は読んでもらえたら嬉しいです。 rispについて 四則演算、変数、関数しか動かない簡単なインタプリタです。 実装 Lisp自体がよくわかっていないので、お気楽 Common Lisp プログラミング入門を読みつつ雰囲気を掴んでいまた。 Lispのリスト構造は(関数 引数...)という感じなので、stack/pop すれば動くかなと思って、最初はこんな感じに雑に実装していました。 初期実装 fn eval(&mut self, chars: &mut Peekable<Chars>) -> String { loop { let ch =

                                                                          Rustで簡単なLispを書いてみた
                                                                        • GitHub - jcubic/lips: Scheme based powerful lisp interpreter in JavaScript

                                                                          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                            GitHub - jcubic/lips: Scheme based powerful lisp interpreter in JavaScript
                                                                          • A Scheme Primer

                                                                            The following is a primer for the Scheme family of programming languages. It was originally written to aid newcomers to technology being developed at The Spritely Institute but is designed to be general enough to be readable by anyone who is interested in Scheme. This document is dual-licensed under Apache v2 and Creative Commons Attribution 4.0 International and its source is publicly available.

                                                                            • Island Life - 無限cxr

                                                                              無限cxr 「carとcdrの合成 (car, caddr, cadddr,...)って4段階までしか無いのか」ってツイートを見かけたので、無限に合成されるのを作ってみた。 あらかじめ定義しておかなくても、ソースコードを読んだ時点で展開されるので、 いくらでも長いc[ad]+rを使える。 https://gist.github.com/dd6cf4242a5ae59b85732b405b6d961b これを使えば『Land of Lisp』のビリーとボブの会話も実行できるぞ! (setf *readtable* *cxr-readtable*) ;;「ジブラルドルのエメラルド」が今週末に超特急列車で運搬される (defparameter *train* '((controls) (empty security-camera) (gem) (empty guard1 empty empty

                                                                                Island Life - 無限cxr
                                                                              • コンピューティング史見聞録(12)ジョン・マッカーシーの発想と発明 – 京都テキストラボ情報&教育サイト

                                                                                前回に引き続き、人工知能の父の一人であるジョン・マッカーシーについて触れていこう。 マッカーシーは1950年代半ばに人工知能(Artificial Intelligence)という用語を考案し、「ダートマス会議」の中心人物として分野の発展に多く貢献した。 この時代以前にもサイバネティクスという言葉に代表される同様の分野の研究は行われていたのだが、マッカーシーは30歳前にしてここに新たな潮流をもたらす核となったわけである。 ジョン・マッカーシー ■マッカーシーとLisp マッカーシーは、コンピューティングの歴史に残る「知的な発明」を多く生み出した。彼が学生だった頃はコンピューターを専門の研究分野としていた人はもちろんいなかったわけだが、数学や科学の他分野で訓練を積んだ研究者たちが、培った知見や研究態度をコンピューティングの分野で発揮することによって、異なる考え方を含んだ豊かな土壌が生まれるこ

                                                                                • WebAssemblyでLISPインタプリタを書いた

                                                                                  WebAssemblyでLISPインタプリタを書いた WebAssemblyでLISP 1.5の処理系を書いた。 超高速WebAssembly入門 まずは このページ を読もう。 WebAssemblyのデータ型 WebAssemblyには基本的に整数型と浮動小数点数型しかない。具体的には i32, i64, f32, f64 の4種類。 文字列はC言語のように整数の並びとして表現する。 WebAssemblyのメモリ WebAssemblyにはデータを置く場所として、 スタック、ローカル変数、グローバル変数、メモリがある。 メモリはアドレスを介したアクセスができる。 逆に言えばスタック、ローカル変数、グローバル変数はアドレスを取得できない。 アドレス経由でアクセスしたいものはメモリに置く必要がある。 ;; 初期値0のグローバル変数 (global $gp (mut i32) (i32.c

                                                                                  新着記事