問題タブ [interpreter]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
haskell - Write a Haskell interpreter in Haskell
A classic programming exercise is to write a Lisp/Scheme interpreter in Lisp/Scheme. The power of the full language can be leveraged to produce an interpreter for a subset of the language.
Is there a similar exercise for Haskell? I'd like to implement a subset of Haskell using Haskell as the engine. Of course it can be done, but are there any online resources available to look at?
Here's the backstory.
I am exploring the idea of using Haskell as a language to explore some of the concepts in a Discrete Structures course I am teaching. For this semester I have settled on Miranda, a smaller language that inspired Haskell. Miranda does about 90% of what I'd like it to do, but Haskell does about 2000%. :)
So my idea is to create a language that has exactly the features of Haskell that I'd like and disallows everything else. As the students progress, I can selectively "turn on" various features once they've mastered the basics.
Pedagogical "language levels" have been used successfully to teach Java and Scheme. By limiting what they can do, you can prevent them from shooting themselves in the foot while they are still mastering the syntax and concepts you are trying to teach. And you can offer better error messages.
programming-languages - ジュニアプログラマーはどの言語でインタープリターを実装できますか?
私の大学はもうすぐ始まりますが、残りの数週間で何かしたいです:)
私は前学期にコースを受講しましたがprogramming languages
、自分の知識を実現したいと思っています。ジュニアプログラマーが通訳を実装できるシンプルでエレガントな言語は何ですか?
言語が非常に小さいか実験的であるかは気にしません。
c - メタサーキュラーインタープリターの正確な定義は何ですか?
Cで書かれたCコンパイラまたはPHPメタサーキュラーで書かれたPHPインタプリタを呼び出すことは合法ですか?この定義は、Lispなどの特定のタイプの言語にのみ有効ですか?要するに、通訳者がメタサーキュラーと呼ばれるために満たすべき条件は何ですか?
python - Pythonインタープリターでは、「」なしで戻る
Pythonでは、次のような変数をどのように返しますか。
'x'
('
)がx
?の周りにない場合
functional-programming - アソシエーションリストを使用したスキームの機能テーブル
Schemeで初歩的なインタープリターを作成しようとしていますが、関連リストを使用して算術関数にマップしたいと思います。これは私がこれまでに持っているものです:
問題は、テーブルのRHSの要素がシンボルのリストとして保存されていることです。誰かが彼を治療する方法について何か考えを持っていますか?前もって感謝します。
c - C で独自の基本的な UNIX シェルを実装するにはどうすればよいですか?
私はプロセスとスレッド管理の初心者です。私のシェルはPATH
環境変数を理解する必要があります。設定・変更可能です。インタラクティブ モードとバッチ モードの 2 つの方法で実行されます。シェルは、ls;ps;wc file;cal のように複数のジョブを実行できます。信号も手を汚したい。したがって、 ^K 、 ^c も処理する必要があります。
exec、フォーク、パイプを使用する必要があることはわかっていますが、始めることはできません。
parsing - 私の言語のパーサーを書くための最短の方法は何ですか?
PS。構文解析理論についてどこで読むのですか?
iphone - iPhoneアプリケーションに埋め込まれた通訳の例?
私はiPhoneに移植されたインタプリタ言語の例を見つけようとしています。デバイスをジェイルブレイクせずに、iPhoneを埋め込む方法を示すためにソースコードを利用できます。
私が見つけた:
- Ruby: http: //www.cocos2d-iphone.org/forum/topic/1163
- Lua:http ://www.mobileorchard.com/announcing-iphone-wax-native-uikit-iphone-apps-written-in-lua/
そして私はそこに他に何があるかを見たいです。Appleがアプリでのインタープリターの使用(またはインタープリターで実行するための新しいコードのダウンロード)を許可する場合と許可しない場合があることは知っていますが、これは主に開発を簡素化するためです。
他に例はありますか?
python - ipythonを終了します
私はPythonインタープリターを操作するためにIPythonが大好きです。しかし、私は継続的に終了するために入力exit
していることに気付き、「終了するにはexit()と入力してください」というプロンプトが表示されます。
Ctrl-Dを入力して終了できることは知っていますが、exit
括弧なしで入力してIPythonを終了させる方法はありますか?
更新: noskloのおかげで、これは次の行を:のmain()関数に追加することで簡単に実行できますipy_user_conf.py
。