We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Meet Nickel: better configuration for less

00:00

Formale Metadaten

Titel
Meet Nickel: better configuration for less
Serientitel
Anzahl der Teile
19
Autor
Lizenz
CC-Namensnennung 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
A quick presentation of Nickel, a general configuration language which is inspired from Nix expressions to which it adds some cool features. Have you ever wished once that you could use the Nix language for something else than Nix ? To write a small project-specific script, or to generate a configuration when having to deal with horrendous YAML templating languages ? Nix may have its flaws, but it uses a simple yet powerful language - fundamentally, a lazy JSON with higher-order functions - that could very well be used to generate other configurations than Nix packages. In this short talk, I present the Nickel configuration language, which is an ongoing effort to make a standalone offspring of the Nix language , and while doing so, takes the opportunity to add new capabilities to the language.
ProgrammierungEigentliche AbbildungFormale SpracheRegulärer Ausdruck <Textverarbeitung>KonfigurationsraumVollständiger VerbandTypentheorieSpeicherabzugPhysikalisches SystemBimodulRegulärer AusdruckMaßerweiterungTypentheorieProjektive EbeneMusterspracheMultiplikationsoperatorLeistung <Physik>Gesetz <Physik>BeobachtungsstudieMereologieVersionsverwaltungProgrammierungQuellcodeElektronisches ForumBitDiskrete UntergruppeGruppenoperationRichtungMixed RealityRechter WinkelFormale SpracheArithmetischer AusdruckSoftwareSnake <Bildverarbeitung>LeistungsbewertungAbstandDatenflussRepository <Informatik>Figurierte ZahlKonfigurationsraumDemoszene <Programmierung>SpeicherabzugProgrammbibliothekPhysikalisches SystemSchnittmengeArithmetisches MittelDesign by ContractCodeLaufzeitfehlerSoftware EngineeringHydrostatikBimodulFunktionale ProgrammierspracheAttributierte GrammatikPunktEigentliche AbbildungDatensatzSchaltnetzCASE <Informatik>Vollständiger VerbandSkriptspracheProgrammverifikationDynamisches SystemComputeranimation
Transkript: Englisch(automatisch erzeugt)
Our final lightning talk is Meet Nickel, Better Configuration for Less by Yam Hondawi. And if I mispronounce your name, I apologize and you can go ahead and say it afterwards. And the topic is Nickel language aims to generate other general configurations that are not packages. And I believe our moderator is going to link the source code if it's not actually
in the slides. Hello, everyone. I'm very happy to be here for my first Nixcon. I'm a software engineer. I'm working on a project at Twig called Nickel, and I will talk about it in this talk. So I just recently dove into the Nix world, and it's quite an amazing piece of software.
And in particular, I was struck by the power of Nix expression, right? Nix expression, first, it's a proper programming language, which is not always the case if you have had to deal with horrendous YAML templating language.
You know what I'm talking about. And it's also a simple language, basically JSON plus functions. And yet it is a powerful one because JSON plus functions allow you to encode quite a lot of patterns and idioms in it.
And I've heard some Nixers tell me that they wish they could use this for something else to generate, not only packages, but other configurations or even small per-project scripts. But as Elko pointed out in his first talk, there are some shortcomings in the Nix expressions.
First one is discoverability and extensibility problem. By extensibility, I mean overrides, overlays, all this kind of stuff is really complicated for newcomers. The lack of types that already had been discussed quite extensively.
And these two points are more or less addressed by the Nix OS module system, but it's not the language features, it's something external, which has some drawbacks. And finally, it's not really a flaw in itself, but if you want to use Nix on something else than Nix, you have to be able to evaluate Nix expressions outside of the Nix world.
And it turned out that in practice, this is not something trivial to use the Nix expression for something really unrelated to Nix. And so from there, this project started, which is NikL, configuration language.
And we have somehow two main reasons for doing that. The first one is to detach Nix to make a spinoff of the Nix expressions language, but which is not dependent of Nix. And the second direction is to be able to explore and experiment with what could we
add to this language for it to be able to do more stuff than Nix or to overcome some of the shortcomings I talked about earlier. So this NikL language, it has the Nix-like core, I would say.
So same thing, lazy JSON functions. Try to retain the simplicity and the beauty of the Nix expressions language. And then also we add some typing. So static typing is a bit of a heavy thing for a configuration language, right? You don't want to write and to statically type all part of your configurations.
And so gradual typing allows both static typing and untyped code to coexist. But even if you don't want static typing, you may want dynamic runtime checks, which is what is done, for example, in the type checking of the NixOS module.
And contracts allow you to do that, so to verify things at runtime in a principle approach. And it also has a merge operation, which allow you to combine records or attributes set in Nix. And the idea is to be able more or less to fulfill the same purpose than the NixOS
module system, but with a curated set of native features of the language. Rather than the external library. Right, so there is more, but it's a lightning talk, so I can go on and on. I have to warn you that the project is still experimental, so it lack good syntax.
It lack a JSON backend, so it did not yet generate configuration. But most of the thing I talk about and the design and the core language is actually implemented. It just lack the last layer of paint to be able to actually use it.
But if you're interested, check out the repo, see the readme, or just watch from distance what will happen in the, I don't know, next month, maybe. And that's all. Thanks.