For faster navigation, this Iframe is preloading the Wikiwand page for KEMURI (プログラミング言語).

KEMURI (プログラミング言語)

この記事の主題はウィキペディアにおける独立記事作成の目安を満たしていないおそれがあります。 目安に適合することを証明するために、記事の主題についての信頼できる二次資料を求めています。なお、適合することが証明できない場合には、記事は統合されるか、リダイレクトに置き換えられるか、さもなくば削除される可能性があります。出典検索?"KEMURI" プログラミング言語 – ニュース · 書籍 · スカラー · CiNii · J-STAGE · NDL · dlib.jp · ジャパンサーチ · TWL (2020年6月)

KEMURI(ケムリ)は、Brainfuckに類したプログラミング言語の一つ。実用言語ではない。

BrainCrashHQ9+についで世界で3番目に短くHello worldを出力するプログラムを記述できる。

KEMURIはスタックマシンであり、0~255の値が入るスタックがある。

実用性はほとんど無いように思われるが、KEMURI_PLUSではチューリングマシンで実行可能なあらゆるプログラムが記述できる(チューリング完全である)とされている。

KEMURIの言語仕様

[編集]

実行可能な命令は「6つ」のみである。

  1. ^ XOR スタックの先頭2つをpopし、xorを計算してpushする。
  2. ~ NOT スタックの先頭をpopし、notを計算してpushする。(必要性が疑問視されている)
  3. " DUP スタックの先頭をpopし、それを2回pushする。スタック先頭の複製(duplicate)である。
  4. ' ROT スタックの先頭3つをpopし、並べ替えてpushする。先頭から順にx y zという順に並んでいたのなら、y z xという順番に変わる。
  5. ` スタックに[72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33]を積む。これはASCIIコードとみなすと"Hello, world!"に相当する。
  6. | スタックの中身を文字コードだと見なして出力する。スタックの中身すべてを出力するのでスタックは空になる。プログラムの最後で一度だけ使うことが推奨されている。

KEMURI_PLUSの拡張仕様

[編集]
  1. l (小文字のエル) スタックの中身をBrainfuckのコードだと見なして実行する。プログラムの最後で一度だけ使うことが推奨されている。

外部リンク

[編集]
{{bottomLinkPreText}} {{bottomLinkText}}
KEMURI (プログラミング言語)
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?