Dhall可编程的配置语言
Dhall是一种可编程的配置语言,可以理解成:JSON + functions + types + imports。
{- You can optionally add types
`x : T` means that `x` has type `T`
-}
let Config : Type =
{- What happens if you add another field here? -}
{ home : Text
, privateKey : Text
, publicKey : Text
}
let makeUser : Text -> Config = \(user : Text) ->
let home : Text = "/home/${user}"
let privateKey : Text = "${home}/.ssh/id_ed25519"
let publicKey : Text = "${privateKey}.pub"
let config : Config =
{ home = home
, privateKey = privateKey
, publicKey = publicKey
}
in config
let configs : List Config =
[ makeUser "bill"
, makeUser "jane"
]
in configs
评论
JsonnetJSON 兼容的配置语言
Jsonnet是Google开源的一个JSON兼容的配置语言,用来取代JSON。可以支持注释,self等语法。它完全向后兼容并加入了一些新特性:注释、引用、算术运算、条件操作符,数组和对象内含,引入,
JsonnetJSON 兼容的配置语言
0
ImplicitCAD可编程的 CAD 软件
ImplicitCAD是一个开源的可编程的CAD软件。采用Haskell语言开发。示例代码:/* This creates a twisted extrusion of 5 unioned circl
ImplicitCAD可编程的 CAD 软件
0
ONetSwitch可编程交换机
ONetSwitch是叠锶公司作为全球首款基于Zynq器件实现的OpenFlowSwitch产品,作为理想的SDN教育科研平台,具备“软件可编程,逻辑可重构,硬件可扩展”能力,是面向SDN/OpenF
ONetSwitch可编程交换机
0