Hacker News new | past | comments | ask | show | jobs | submit login
The KCL Programming Language for DevOps (github.com/kusionstack)
56 points by peefy on Dec 27, 2022 | hide | past | favorite | 21 comments



[Insert XCKD with adding a 15th standard when 14 already exist]


Sorry, I didn't understand. Can you provide more information?



Thank you. Let me check.


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.


What are the selling points of KCL compared to Dhall?


I think the main selling points are the object-oriented model abstraction ability and automation ability. It is close to the writing method of conventional programming language and the automatic processing ability of Data. In Kubernetes and DevOps scenarios, automation is an important means to improve efficiency. https://kcl-lang.io/docs/user_docs/guides/automation


Or Nickel


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 extensionality.


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


Excellent, that really helps the work for DevOps


Thank you for your liking.


The KCL website is https://kcl-lang.io/


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/...


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: