Summary of Pkl: Apple's New JSON/YAML Killer (I actually want to use this...)
00:00:00Apple has introduced a new configuration-focused programming language called Pkl. It offers a programmable, scalable, and safe configuration solution. Pkl files can be exported to various formats like JSON, YAML, Plist, or .properties. Additionally, Pkl supports integrated application config for languages like Java, Kotlin, Swift, and Go. Pkl even has IDE integration with Visual Studio Code, which is surprising coming from Apple, known for not supporting their own Xcode as well. The language allows for programming logic, like enforcing constraints such as integer values being greater than a certain threshold.
00:02:11Apple has introduced a new programming language called Pickle for configuration. It aims to address the limitations of traditional static languages like JSON and YAML, which can lead to configuration errors and repetition as complexity grows. Pickle offers both the simplicity of static languages and the power of general-purpose programming languages, allowing users to use features like classes, functions, and loops for configuration logic. It aims to strike a balance between readability and functionality, enabling the creation of declarative and expressive configuration code.
00:04:30Pickle is a versatile tool for creating configuration files and can serve different configuration needs. It is designed with three main goals in mind: providing safety by catching validation errors, scaling from simple to complex use cases, and being easy and enjoyable to use. Pickle allows for defining configuration schemas using familiar syntax, including features like classes, functions, loops, and type annotations. It aims to simplify configuration management by defining types with the concept of a template. It differs from T3 environment in that it validates configurations inside and outside of the environment variables and can be integrated well with tools like Terraform. Pickle supports creating variations of configuration data by amending base files, offering built-in read expressions for external resources, and enabling easy generation of variations using features like for loops.
00:06:50The list details a simplified approach to using a for loop for creating database configurations based on values 0, 1, 2, and 3, each with a port offset. The process involves exporting JSON data and setting environment passwords, with Pickle validation ensuring data integrity through type annotations and constraints. An example showcases constraints such as age limits, non-empty name, and specific zip code format. Failure to meet constraints results in evaluation errors, emphasizing the need for valid data. Pickle offers flexibility through arbitrary expressions for authoring custom type checks, enabling sharing packages as dependencies in projects.
00:09:10Pkl is presented as the PPM (Pickle Package Manager), offering a convenient way to share pickle code across projects. Users can create and publish packages, import them via absolute URLs, and manage dependencies to resolve version conflicts within a dependency graph. It serves as a Json replacement, replacing package JSON, reflecting lessons learned from past JavaScript and node mistakes. Apple's involvement in open source, such as with the Pantry monorepo and Kubernetes bindings, showcases their usage and expansion into new technologies. The developer ecosystem engineering account on GitHub, believed to be affiliated with Apple, adds an intriguing element to their open-source presence.
00:11:24Apple unexpectedly contributed improvements to the OBS project for testing their new capture solutions, including language bindings for embedding in other languages like Swift, Go, Java, and Kotlin. They emphasized editor support for PICKLE, offering instant feedback, autocomplete, and documentation, with the option of using the intell plugin for JetBrains editors. This move aims to enhance the overall user experience and ensure the safety of coding tasks, potentially replacing conventional JSON files with PICKLE configurations in the future.
00:13:42Exciting new tool discussed which eliminates the need for complex hacks like embedding config files in code and compiling. It offers features like syntax highlighting and code folding, with plans for error checking. Apple's open source project provides examples for various platforms. The speaker is pleasantly surprised by the tool's progress and Apple's initiative, expressing excitement and inviting viewers to share their thoughts.