A programming language in Japanese

Write code in Japanese.

する (suru, “to do”) is a statically typed functional language whose source code is Japanese. Particles mark the arguments, types are inferred for you, and your programs compile to fast native binaries.

Never typed Japanese? Learn to type it in ten minutes →

divide.suru
# “a を b で 割る” — divide a by b
a を b で 割った数にする とは a / b です

10 を 2 で 割った数にする    # 割った数にする = make it into “the divided number”
2 で 10 を 割った数にする    # same: particles decide

n を 階乗する とは          # 階乗する = take the factorial of
  もし n が 0 ならば 1      # もし = if
  そうでなければ n * (n - 1 を 階乗する) です

10 を 階乗する
5
5
3628800
01 / GRAMMAR

Particles, not parentheses

In Japanese, little words called particles tell you what each noun does in a sentence. する uses them the same way: every argument is tagged with a particle, so arguments can come in any order and the function name always comes last, as a verb ending in する.

Lists are made with と (“and”), results flow forward with して (“and then”), and それぞれ (“each”) maps a function over a list.

をthe main object
にto, onto
でby, with
からfrom
へtoward
よりthan
lists.suru
x を 三倍する とは x * 3 です    # 三倍する = triple
数列 とは 1 と 2 と 3 と 4 です  # 数列 = sequence

数列 の それぞれ を 三倍する     # の = of
数列 を 加算して 三倍する        # 加算して = add up, and then
数列 から (x を 受け取って x > 2 を 返すこと) で 選別する  # 選別する = filter
(3 と 6 と 9 と 12)
30
(3 と 4)
02 / LANGUAGE

A real language, not a toy

Behind the Japanese surface is a modern functional core: inferred static types, algebraic data, pattern matching, and side effects kept apart as values.

型

Inferred static types

Hindley–Milner type inference checks the whole program before it runs. You never have to write a type, but you can declare one when you want to.

形

Data & pattern matching

Records, sum types, generic types, pattern matching with guards, definitions by cases, and type classes called 性質 (“traits”).

動

Effects as values

Printing and input are 入出力動作 (“input/output actions”) that you run in order between 以下の手順です and 以上です (“the procedure is as follows … that is all”), much like Haskell’s do notation.

速

Native binaries

The compiler emits LLVM IR and links it with clang into a single executable. A Go compiler, suruc, generates the IR 14–35× faster than the reference one.

並

Parallel threads

Threads run truly in parallel on every core. Share data through channels called 通路, locks, semaphores and atomic boxes, with a parallel garbage collector underneath.

繋

Call C, C++ and Go

Declare a type, point at a symbol, and call it. Use libc, libm, or any shared library you build yourself.

03 / STYLE

Two ways to write

Write with spaces between words, or write the way Japanese is really written: no spaces at all, sentences ending in “。” and pauses marked by “、”. You can even use the polite form します. Mix the styles freely in the same file.

spaced style
a と b を 平均する とは 合計 / 2 です  # 平均する = average, 合計 = sum
ただし 合計 とは a + b です            # ただし = where

3 と 5 を 平均する
4
punctuation style
aとbを平均するとは、合計/2です。ただし、合計とは、a+bです。
3と5を平均します。
「できました」を表示します。  # 表示します = display (polite form)
4
できました
04 / LIBRARY

Batteries included

The standard library is itself written in する. Load a module with 「名前」 を 読み込む and you have files, time and the Japanese calendar, JSON, TCP, threads and channels, processes and pipes, shared memory, and signals. The same code runs in the interpreter and as a compiled binary. An HTTP server (with static file serving and a client), SQLite and regular expressions are libraries outside the standard library that you add with kumu 追加. The official libraries also cover templates, a database layer with SQLite, PostgreSQL and MySQL drivers, an O/R mapper, a GUI with SDL3 and calling Python.

標準ファイル時間JSON通信スレッドプロセス共有メモリ共有箱シグナル算術乱数環境
server.suru — a web server in 7 lines (suru-lang/http)
「HTTP」 を 読み込む  # 読み込む = load

# 要求 = request, 応答 = response (from HTTP), 返す = return
HTTP内の要求 を 案内する は HTTP内の応答 を 返す
要求 を 案内する とは  # 案内する = guide (route)
  もし 要求 の 道 が   # 道 = path
    「/」 ならば 「こんにちは」 を HTTP内の本文応答する
    そうでなければ 404 で 「見つかりません: 」 + 要求 の 道 を HTTP内の状態応答する

8080 を 案内すること で HTTP内の待受する  # 待受する = listen
$ curl localhost:8080/
こんにちは
$ curl localhost:8080/x
見つかりません: /x
05 / WEB

A web framework in する

屋台 (suru-lang/web) puts the HTTP server, the template engine 雛形 and the O/R mapper 台帳 together. List the routes one per line with 【道】 and write a handler for each; the same code runs in the interpreter and as a compiled binary. kumu 新規 店 --対象 web creates an app with routes, templates, static files and tests. It needs する 0.11.0 or later. The API is documented on Read the Docs.

routes (【道】)templatesformssessions + cookiesmiddlewareO/R mapperroute tests
shop.suru — a page for each item
「屋台」 を 読み込んで 使う
「標準」 を 読み込んで 使う

# 品表示する = show an item, 文脈 = context
文脈 を 品表示する は HTTP内の応答 を 返す 入出力動作
c を 品表示する とは 「品 」 + (c から 「番号」 を 道引数取得する) + 「 です」 を 文字返答する

道群 とは 以下の【道】です    # 道群 = routes, 以下の = the following
  GET  /品/:番号    品表示する
以上です

8080 を 道群 で 屋台開店する  # 屋台開店する = open the stall (start the app)
$ curl localhost:8080/品/3
品 3 です
06 / ROS 2

ROS 2 nodes in する

rclsuru is a ROS 2 client library for する. Write nodes with topics, services, actions, parameters, logging and ROS time, and they talk to rclcpp and rclpy nodes and the ros2 tools as they are. Tested on ROS 2 Jazzy. Add it to a project with kumu 追加 github.com/suru-lang/rclsuru (する 0.11.0 or later). The API is documented on Read the Docs.

topics + QoSservicesactionsparameters/rosout logginguse_sim_timeros2 launch

About 200 message types from std_msgs, geometry_msgs, sensor_msgs, nav_msgs and more come bundled, and a generator written in する makes types from your own .msg and .srv files. Messages are serialized to CDR in する itself, and a built node is a plain executable that ros2 run and ros2 launch can start. A short tutorial →

hello.suru — a talker that publishes every second
「rclsuru」 を 読み込んで 使う

始めする とは 以下の手順です  # 始めする = start
  # 作成する = create, 結果 = result, 発行者 = publisher
  n とは 「hello」 を ノード作成した 結果
  p とは 文字列型 を 「chatter」 へ n で 発行者作成した 結果
  # 発行する = publish, 周期登録する = run on a timer
  (「こんにちは」 を p へ 発行する) を 1.0 で n に 周期登録する
  「始めました」 を n で 情報記録する  # 情報記録する = log info
  n を スピンする
  以上です

始めする
$ kumu 追加 github.com/suru-lang/rclsuru
$ kumu 実行 &
$ ros2 topic echo chatter std_msgs/msg/String
data: こんにちは
07 / OHANASHI

Chat with your local LLMs in the browser

Ohanashi (ohanashi-ollama) is a web app for chatting in the browser with the LLMs your local Ollama runs. Its server is about 4,000 lines of する and builds into a single executable. Conversations stay in a local SQLite file and never leave your machine.

conversations + threadsrules (OHANASHI.md)coding modeimages + PDFsweb searchDocker sandboxWord + PDF outputGitHub pull requestsnotifications

The model can run and check code in a Docker sandbox, read GitHub repositories, and open issues and pull requests. HTTP, WebSocket, SQLite, GitHub and Ollama each live in their own する library, so you can use them in your own apps too. How to use it →

terminal — run Ohanashi
$ ollama pull qwen3
$ git clone https://github.com/suru-lang/ohanashi-ollama
$ cd ohanashi-ollama
$ kumu 実行 &
$ open http://localhost:8080/   # open it in your browser
08 / TOOLS

Tooling that speaks Japanese too

Error messages, commands and tools all use Japanese, with English aliases where it helps.

書

VS Code

Highlighting, live type errors, hover types, go to definition, completion and rename, powered by the suru-ls language server.

検

点検 linter

suru --点検 finds unused names, mixed styles and more. The linter is written in する.

対

Interactive shell

Run suru with no file and every answer comes back with its type: 9 は 数.

組

kumu build tool

kumu 新規, kumu 実行: create, build and run projects. The project file is a する program.

09 / INSTALL

Get started

Pick whichever way you like. You need Python 3.10+ for the interpreter, Go 1.23+ for the fast tools, and clang to build binaries (on macOS, xcode-select --install). The API of the standard library and the built-in functions are in the documentation on Read the Docs.

pip

pip install suru-lang

Homebrew

brew install suru-lang/suru/suru
macOS and Linux, with every tool.

Binaries

GitHub Releases for each OS.

VS Code

Search “する” in the Marketplace.

latest, from source
$ pip install git+https://github.com/suru-lang/suru      # the suru interpreter
$ go install github.com/suru-lang/suru/cmd/suruc@latest  # fast compiler
$ go install github.com/suru-lang/suru/cmd/kumu@latest   # build tool
$ suru hello.suru            # run
$ suruc hello.suru && ./hello  # compile to a native binary
Say hi to するぞう (Suruzou), the mascot of する.

する means “to do.” So let’s do it.

「する言語」の最初のアイディアは、AI がコードを書く時代に、日本語話者が少しでも速くコードレビューができたらうれしい、という気持ちから始まりました。また、関数型言語を愛する作者が、日本語の「する」という動詞の便利さに着目したのが「する言語」の始まりです。