EmotionalHub

所属分类:编程语言基础
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2022-12-06 14:41:35
上 传 者sh-1993
说明:  用于教育和娱乐的交互式编程语言。
(The interactive programming language for education and entertainment.)

文件列表:
.travis.yml (123, 2021-03-26)
Procfile (71, 2021-03-26)
description/ (0, 2021-03-26)
description/SETUP.md (519, 2021-03-26)
description/TODO.md (1557, 2021-03-26)
description/screenshot.png (180383, 2021-03-26)
description/screenshot2.png (214967, 2021-03-26)
emhub-ws/ (0, 2021-03-26)
emhub-ws/LICENSE (11218, 2021-03-26)
emhub-ws/doc/ (0, 2021-03-26)
emhub-ws/doc/intro.md (106, 2021-03-26)
emhub-ws/project.clj (548, 2021-03-26)
emhub-ws/src/ (0, 2021-03-26)
emhub-ws/src/emhub_ws/ (0, 2021-03-26)
emhub-ws/src/emhub_ws/core.clj (793, 2021-03-26)
emhub-ws/test/ (0, 2021-03-26)
emhub-ws/test/emhub_ws/ (0, 2021-03-26)
emhub-ws/test/emhub_ws/core_test.clj (168, 2021-03-26)
emhub/ (0, 2021-03-26)
emhub/Procfile (41, 2021-03-26)
emhub/emhub-js/ (0, 2021-03-26)
emhub/emhub-js/.bowerrc (52, 2021-03-26)
emhub/emhub-js/.node-version (8, 2021-03-26)
emhub/emhub-js/Gruntfile.js (1696, 2021-03-26)
emhub/emhub-js/assets/ (0, 2021-03-26)
emhub/emhub-js/assets/typescript/ (0, 2021-03-26)
emhub/emhub-js/assets/typescript/emola/ (0, 2021-03-26)
emhub/emhub-js/assets/typescript/emola/canvas.ts (4734, 2021-03-26)
emhub/emhub-js/assets/typescript/emola/emola.ts (5610, 2021-03-26)
emhub/emhub-js/assets/typescript/emola/error.ts (835, 2021-03-26)
emhub/emhub-js/assets/typescript/emola/input.ts (460, 2021-03-26)
emhub/emhub-js/assets/typescript/emola/lang.ts (4215, 2021-03-26)
emhub/emhub-js/assets/typescript/emola/manager.ts (1872, 2021-03-26)
emhub/emhub-js/assets/typescript/emola/reader.ts (2494, 2021-03-26)
... ...

# EmotionalHub [![Build Status](https://travis-ci.org/ymizushi/EmotionalHub.svg?branch=master)](https://travis-ci.org/ymizushi/EmotionalHub) EmotionalHub is the interactive programming platform for amusement and education with Emola. Emola is a kind of LISP programming language designed by ymizushi. [Try Emola](http://ymizushi.github.io/emohub/) ## Setup See [SETUP.md](https://github.com/ymizushi/EmotionalHub/blob/master/description/SETUP.md "SETUP.md") ## Screenshot ![alt text](https://github.com/ymizushi/EmotionalHub/blob/master/description/screenshot.png "Screenshot1") ![alt text](https://github.com/ymizushi/EmotionalHub/blob/master/description/screenshot2.png "Screenshot2") ## Emola Language Specification ### Arithmetic operator ```clojure (+ 1 1 1) ; Emola=> 3 (- 2 1 1) ; Emola=> 0 (* 2 2 2) ; Emola=> 8 (/ 4 2 2) ; Emola=> 1 (/ 1 3) ; Emola=> 0.3333333333333333 (= 2 2) ; Emola=> true (= 2 1) ; Emola=> false (>= 1 1) ; Emola=> true (> 1 1) ; Emola=> false (<= 1 1) ; Emola=> true (< 1 1) ; Emola=> false ``` ### Binding ```clojure (def hoge 1) hoge ;Emola=> 1 ``` ### Defiinition of function ```clojure (defn calc (x y) (* x y)) (calc 2 3) ;Emola=> 6 ``` ### Local binding ```clojure (defn calc (x) (let (y 1 z 2) (* x y z))) (calc 3) ;Emola=> 6 ``` ### If ```clojure (defn calc (x) (if (= x 1) true false)) (calc 1) ;Emola=> true (calc 2) ;Emola=> false ``` ### Evaluates the expressions in order. ```clojure (do (def hoge 1) (+ hoge 1)) ;Emola=> 2 ``` ### Message passing ```clojure (send (point 100 100) toString) ;Emola=> {x: 100, y: 100} ``` ### Call Javascript built-in function ```clojure (send (window) alert 1) ``` ### Create Circle ```clojure (def c (circle (point 100 100) 200 (color 100 100 100))) (draw c) ``` ### Create Rectangle ```clojure (def r (rect (point 100 100) (size 100 100) (color 0 255 0))) (draw r) ``` ### Create Line ```clojure (def l (line (point 100 100) (point 1000 1000))) (draw l) ``` ### Create Text ```clojure (def t (text "hoge" (point 100 100) (color 50 50 50))) (draw t) ``` ### Clear graphic context ```clojure (clear) ```

近期下载者

相关文件


收藏者