Live data from Hacker News

The KCL Programming Language

github.com

11–20 of 27 posts

Re: The KCL Programming Language

#11
post #10
post #2

Kusion Configuration Language (KCL) is an open source constraint-based record and functional language. KCL improves the writing of a large number of complex configurations such as cloud native scenarios through mature programming language technology and practice, and is committed to building better modularity, scalability and stability around configuration, simpler logic writing, fast automation and good ecological e…

How does it compare to Cue or Dhall?

Compared with other languages, you can refer to the relevant documents on the KCL website:

+ https://kcl-lang.io/docs/user_docs/getting-started/intro

+ https://kcl-lang.io/blog/2022-declarative-config-overview

Re: The KCL Programming Language

#13

How to publish my package, is there an example?

Hello, we are supporting the kpm tool for publishing and sharing KCL modules. To put it simply, we can install and use the modules related to kubernetes through the command: `kpm install kubernetes`. The detailed user stories are here: https://github.com/KusionStack/KCLVM/issues/338

Re: The KCL Programming Language

#14
post #9
post #2

Kusion Configuration Language (KCL) is an open source constraint-based record and functional language. KCL improves the writing of a large number of complex configurations such as cloud native scenarios through mature programming language technology and practice, and is committed to building better modularity, scalability and stability around configuration, simpler logic writing, fast automation and good ecological e…

Excellent, that really helps the work for DevOps

Thank you for your liking.

Re: The KCL Programming Language

#15
post #5
post #4

From the example provided I can see that the KCL K8s sample had 18 lines whereas the generated YAML file had 21 lines. I'm sort of missing the point here as to how KCL is helping here.

In readme, we only show a simple k8s example. In fact, KCL can achieve a high information compression ratio through its code abstraction capabilities. For example: https://github.com/KusionStack/konfig/blob/main/appops/guest... and https://github.com/KusionStack/konfig/blob/main/appops/guest...

The core features of KCL are its modeling and constraint capabilities, and the basic functions of KCL revolve around the two core features. In addition, KCL follows the user-centric configuration concept to design its basic functions, which can be understood from two aspects:

Domain model-centric configuration view: With the rich features of KCL language and KCL OpenAPI tools, we can directly integrate a wide range of well-designed models in the community into KCL (such as the K8s resource model). We can also design and implement our own KCL models or libraries according to different scenarios, forming a complete set of domain models for other configuration end users to use.

End user-centric configuration view: With KCL's code encapsulation, abstraction and reuse capabilities, the model architecture can be further abstracted and simplified (for example, the K8s resource model is abstracted into an application-centered server model) to minimize the end user configuration input*, simplify the user's configuration interface, and facilitate manual or automatic API modification.

No matter what configuration view is centered on, for configuration code, there are requirements for configuration data constraints, such as type constraints, required/optional constraints on configuration attributes, range constraints, and immutability constraints. This is also one of the core issues KCL is committed to solving.

Re: The KCL Programming Language

#19
post #18

Clashes with Kyoto Common Lisp.

Can you give Kyoto Common Lisp more reference information? I'm interested in it.

Kyoto Common Lisp was developed in the mid 80s in Japan as an independent new implementation. It's a Common Lisp to C compiler. KCL was the first in a family of implementations based on KCL: AKCL, GCL, Delphi CL, ECL, CLASP. The currently usable implementations of those are ECL, CLASP and possibly GCL.

For KCL see: https://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/...

Post reply on HN