Elm

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(简介)
(链接)
 
(未显示1个用户的13个中间版本)
第1行: 第1行:
 +
{{SeeWikipedia|Elm (programming language)}}
 +
 
Elm
 
Elm
 +
[[文件:elm-logo.png|right|Elm]]
  
 
==简介==
 
==简介==
第7行: 第10行:
  
 
==功能==
 
==功能==
 +
Elm 架构核心的三个概念:
 +
* Model — the state of your application
 +
* View — a way to turn your state into HTML
 +
* Update — a way to update your state based on messages
 +
 +
Elm is also [https://elm-lang.org/blog/blazing-fast-html-round-two very fast] and [https://elm-lang.org/blog/small-assets-without-the-headache very small] when compared with [[React.js|React]], [[Angular]], Ember, etc.
 +
 +
==Haskell==
 +
*[https://github.com/eeue56/haskell-to-elm haskell-to-elm] 关于 Elm 与 [[Haskell]] 不同之处的例子集。
  
 
==指南==
 
==指南==
 +
*[https://github.com/izdi/elm-cheat-sheet Elm Cheat Sheet]
 +
*[https://sporto.github.io/elm-patterns/index.html Elm patterns] A collection of common patterns for Elm.
 
  $ curl -L -o elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz
 
  $ curl -L -o elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz
 
  $ chmod +x elm
 
  $ chmod +x elm
第29行: 第43行:
 
  > round 3.14159
 
  > round 3.14159
 
  3 : Int
 
  3 : Int
 +
> greet name =
 +
|  "Hello " ++ name ++ "!"
 +
 +
<function> : String -> String
 +
> greet "Huihoo"
 +
"Hello Huihoo!" : String
  
 
==软件包==
 
==软件包==
 
*[https://package.elm-lang.org/ Elm Packages]
 
*[https://package.elm-lang.org/ Elm Packages]
 +
*[https://korban.net/elm/catalog/ Elm Catalog]
 +
*[https://klaftertief.github.io/elm-search/ Elm Search]
  
 
==项目==
 
==项目==
[https://github.com/sporto/awesome-elm Awesome Elm] [[文件:awesome.png]]
+
*[https://github.com/sporto/awesome-elm Awesome Elm] [[文件:awesome.png]]
 +
*[https://github.com/elm Elm @ GitHub]
 +
*[https://github.com/pd-andy/awesome-elm-pltd Awesome Elm PLTD] [[文件:awesome.png]]
 
*[https://github.com/topics/elm Elm GitHub Topics]
 
*[https://github.com/topics/elm Elm GitHub Topics]
 +
*[https://github.com/halfzebra/create-elm-app Create Elm App]
 
*[https://builtwithelm.co/ Built with Elm]
 
*[https://builtwithelm.co/ Built with Elm]
 
*[https://github.com/rofrol/elm-games All Elm Games]
 
*[https://github.com/rofrol/elm-games All Elm Games]
第42行: 第67行:
 
*[https://github.com/jfmengels/elm-review Elm Review]
 
*[https://github.com/jfmengels/elm-review Elm Review]
 
*[https://github.com/erkal/kite Kite] An interactive visualization tool for graph theory   
 
*[https://github.com/erkal/kite Kite] An interactive visualization tool for graph theory   
 +
*[https://github.com/ryannhg/elm-spa elm-spa] single page apps made easy
 
Inspired by Elm
 
Inspired by Elm
 
*[https://github.com/wende/elchemy elchemy] Write Elixir code using statically-typed Elm-like syntax (compatible with Elm tooling)  
 
*[https://github.com/wende/elchemy elchemy] Write Elixir code using statically-typed Elm-like syntax (compatible with Elm tooling)  
第49行: 第75行:
 
==用户服务商==
 
==用户服务商==
 
*[https://github.com/jah2488/elm-companies Elm Companies]
 
*[https://github.com/jah2488/elm-companies Elm Companies]
 +
 +
==文档==
 +
 +
==书籍==
  
 
==图集==
 
==图集==
 
<gallery>
 
<gallery>
 +
image:Elm-Architecture.png|架构
 
image:elm-benchmark.png|性能
 
image:elm-benchmark.png|性能
 
</gallery>
 
</gallery>
第57行: 第88行:
 
==链接==
 
==链接==
 
*[https://elm-lang.org/ Elm官网]
 
*[https://elm-lang.org/ Elm官网]
*[https://github.com/elm Elm @ GitHub]
 
  
 
[[category:programming language]]
 
[[category:programming language]]
 
[[category:haskell]]
 
[[category:haskell]]

2024年9月7日 (六) 15:19的最后版本

Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 Elm Thanks, Wikipedia.

Elm

Elm

目录

[编辑] 简介

Elm: Functional Frontend

Elm is a functional language that compiles to JavaScript.

[编辑] 功能

Elm 架构核心的三个概念:

  • Model — the state of your application
  • View — a way to turn your state into HTML
  • Update — a way to update your state based on messages

Elm is also very fast and very small when compared with React, Angular, Ember, etc.

[编辑] Haskell

[编辑] 指南

$ curl -L -o elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz
$ chmod +x elm
$ sudo mv elm /usr/local/bin/
$ elm --help
$ elm repl
---- Elm 0.19.1 ----------------------------------------------------------------
Say :help for help and :exit to exit! More at <https://elm-lang.org/0.19.1/repl>
-------------------------------------------------------------------------------
> [ "Haskell", "Elm" ]
["Haskell","Elm"] : List String
> [ 1.0, 2.1, 4.5, 43.1 ]
[1,2.1,4.5,43.1] : List Float
> String.length
<function> : String -> Int
> "hello"
"hello" : String
> not True
False : Bool
> round 3.14159
3 : Int
> greet name =
|   "Hello " ++ name ++ "!"
|   
<function> : String -> String
> greet "Huihoo"
"Hello Huihoo!" : String

[编辑] 软件包

[编辑] 项目

Inspired by Elm

  • elchemy Write Elixir code using statically-typed Elm-like syntax (compatible with Elm tooling)
  • Fabulous F# Functional App Development, using declarative dynamic UI
  • Elmish Elm-like abstractions for F# applications.

[编辑] 用户服务商

[编辑] 文档

[编辑] 书籍

[编辑] 图集

[编辑] 链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱