Meet Nickel: better configuration for less
This is a modal window.
Das Video konnte nicht geladen werden, da entweder ein Server- oder Netzwerkfehler auftrat oder das Format nicht unterstützt wird.
Formale Metadaten
Titel |
| |
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 | 10.5446/50642 (DOI) | |
Herausgeber | ||
Erscheinungsjahr | ||
Sprache |
Inhaltliche Metadaten
Fachgebiet | ||
Genre | ||
Abstract |
|
Nixcon 202016 / 19
2
3
7
8
12
14
15
17
18
19
00:00
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)
00:00
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
00:22
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.
00:47
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.
01:03
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.
01:21
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.
01:45
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.
02:00
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.
02:22
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.
02:42
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
03:03
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.
03:20
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.
03:44
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.
04:01
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
04:24
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.
04:47
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.
05:02
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.