JSON, TOML, YML? No! Apples New Config Lang!

Поділитися
Вставка
  • Опубліковано 10 лют 2024
  • Recorded live on twitch, GET IN
    / theprimeagen
    Become a backend engineer. Its my favorite site
    boot.dev/?promo=PRIMEYT
    This is also the best way to support me is to support yourself becoming a better backend engineer.
    MY MAIN YT CHANNEL: Has well edited engineering videos
    / theprimeagen
    Discord
    / discord
    Have something for me to read or react to?: / theprimeagenreact
    Kinesis Advantage 360: bit.ly/Prime-Kinesis
    Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
    turso.tech/deeznuts
  • Наука та технологія

КОМЕНТАРІ • 564

  • @LordHonkInc
    @LordHonkInc 3 місяці тому +727

    "Situation: there are 15 competing standards"

    • @oakley6889
      @oakley6889 3 місяці тому +114

      "Programmer: I want to make the end all standard that takes the best of all the standards"
      "Situation: There are 16 competing standards"

    • @nisonatic
      @nisonatic 3 місяці тому +52

      Ironically, despite being around for almost 20 years, there are only about 6 xkcd comics that people cite endlessly.

    • @d3j4v00
      @d3j4v00 3 місяці тому +10

      That’s the beauty of standards, you have so many to choose from!

    • @VojtaJavora
      @VojtaJavora 3 місяці тому +6

      Not really. It's Apple, they can do whatever they want in their walled garden.

    • @carlsjr7975
      @carlsjr7975 3 місяці тому +1

      Jsonnet already exists too

  • @LoudMouth_
    @LoudMouth_ 3 місяці тому +295

    He turned his YAML into a PKL, funniest shit I've ever seen.

    • @FathDaniel
      @FathDaniel 3 місяці тому

      Pickle rick joke is old. Old enough to know how to read and write.

    • @LoudMouth_
      @LoudMouth_ 3 місяці тому +6

      @@FathDaniel 👍🥒

  • @markojozic3944
    @markojozic3944 3 місяці тому +339

    you know python had Pickle-Files for years and they are nothing like this

    • @noisetide
      @noisetide 3 місяці тому +7

      pin this

    • @thedoctor5478
      @thedoctor5478 3 місяці тому +48

      Python pkl is still going strong, and is super useful. I was about to say Apple just don't GAF but I instantly realized: They're Apple devs. They don't reach for sensical tools to solve problems. They prob have no idea what they've done.

    • @SerHergen
      @SerHergen 3 місяці тому +4

      Was about to comment this same thing

    • @regfinley7111
      @regfinley7111 3 місяці тому

      ok I wsnt going crazy I thought i read about pickle files at some point. I thought they where just a data structure or something like pandas to manipulate and or store json data.

    • @SerHergen
      @SerHergen 3 місяці тому

      Pickling is just serialization of a python object. The object can in theory be anything including but not limited to JSON data.@@regfinley7111

  • @InforSpirit
    @InforSpirit 3 місяці тому +56

    PISD (Post inheritance stress disorder) intensifies when someone drops DRY in middle of sentence.

    • @CielMC
      @CielMC 3 місяці тому +10

      I just PISD myself

  • @anteaters4455
    @anteaters4455 3 місяці тому +230

    Will they also rename their brand to Apl?

    • @pertsevds
      @pertsevds 3 місяці тому +32

      They already AAPL

    • @AD-zs9cc
      @AD-zs9cc 3 місяці тому +21

      array programming mfs gonna flip out

    • @mmmhorsesteaks
      @mmmhorsesteaks 3 місяці тому +4

      They're gonna need a bigger keyboard if they want apl...

    • @notuxnobux
      @notuxnobux 3 місяці тому

      more like aplel

    • @complexity5545
      @complexity5545 3 місяці тому +3

      Array Programming Language....nah, they don't what to start that confusion. APL is one h311 of a language written by elves.

  • @paulsanchez5030
    @paulsanchez5030 3 місяці тому +161

    They dropped DRY and the fear of inheritance became real.

    • @DryBones111
      @DryBones111 3 місяці тому +1

      Yeah, the main reason I'm really not keen on this even though I drown in YAML daily.

  • @emjizone
    @emjizone 3 місяці тому +47

    One Apple to rule them all. One Apple to load them.
    One Apple to compile them all, and on a white screen display them.

  • @whimahwhe
    @whimahwhe 3 місяці тому +199

    Imagine debugging your code AND YOUR CONFIG FILES

    • @MrMudbill
      @MrMudbill 3 місяці тому +47

      okay but imagine assuming your config file is correct when it isn't

    • @KManAbout
      @KManAbout 3 місяці тому +28

      Already do this with k8s yaml files and dockerfiles and literally all dsl files

    • @matiasbpg
      @matiasbpg 3 місяці тому +19

      Debugging config files isn't new, trying to find where a large yaml is wrong is hell. Debugging with help of type information and ide support for a generic non DSL config is new and spend really useful

    • @curtisw0234
      @curtisw0234 3 місяці тому +8

      Use Linux so you debug your workstation too

    • @KManAbout
      @KManAbout 3 місяці тому +2

      @matiasbpg to be fair jsonnet existed for a while and does kind of similar things.

  • @codeline9387
    @codeline9387 3 місяці тому +29

    You are so transparent, I literally see your thoughts

  • @sarabwt
    @sarabwt 3 місяці тому +139

    They are solving something that I haven't come across in my career ever and I was doing frontend, backend dev and devops with AWS and Kubernetes. It does sound interesting, until you realize that JSON schemas already exist and provide autocompletion. Also, having a build step for configs sounds like a nightmare.

    • @jpleveille
      @jpleveille 3 місяці тому +19

      > having a build step for configs sounds like a nightmare
      Plus how do you configure the build step? Oh yeah there's Pkl for that...

    • @renderwood
      @renderwood 3 місяці тому

      Yeah, how would that work with Kubernetes and it's cloud secret storage/vault?

    • @itssilence9998
      @itssilence9998 3 місяці тому +1

      On one way, feels great. On other way, feels unnecessary. Having pkl to for checking on my toml, yaml and json config file when I try to implement a certain project is a good way to prevent me, as a User, to scratch my head when trying to check what is wrong with my deployment. On the other hand, as a dev, it can be a bad day when you need to update your project and forgot to update your pkl config because you add a new must have config variable in your python, and then you only find out about it when User try to deploy your project somewhere.

    • @Daniel_Zhu_a6f
      @Daniel_Zhu_a6f 3 місяці тому +10

      a compiled, strongly typed, nearly Turing-complete config language. is it a bad idea or is it a bad idea?

    • @VictorRodriguez-zp2do
      @VictorRodriguez-zp2do 3 місяці тому

      ​​@@itssilence9998I feel the extra complexity added is the real problem. If pickle was just a standard to define the structure of your config files it would be nice since you could use it on any programming language as a library with the tools you are already using.
      But no, they HAD to make it into it's own tool that requires compilation, it's Turing complete and even has a package manager. They could not for the love of god keep it simple.
      EDIT:
      Changed "code" to "config files", my mistake

  • @RealRatchet
    @RealRatchet 3 місяці тому +32

    Pickle is a well known tool for object serialization in python so naming it pickle and create a SEO mess is such an apple thing to do. Also solving a problem that doesn't exist/is solved by existing standards and claiming you done it first is also such an apple thing to do. I'm just glad I finished my pickle/unpickler in nim before this was released.

  • @Daniel_Zhu_a6f
    @Daniel_Zhu_a6f 3 місяці тому +36

    when you have a programming language to configure a program, you have a countdown until you'll need a config language to configure language to configure a program. good plan, very original, very reliable, can't wait to learn another revolutionary language, that will finally solve complexity of configuring programs.
    now, seriously, has anybody had all those problems when writing a config file?

    • @harleyspeedthrust4013
      @harleyspeedthrust4013 3 місяці тому +10

      no, they haven't. this is just people overengineering something stupidly simple because they want to feel smart.

    • @Daniel_Zhu_a6f
      @Daniel_Zhu_a6f 3 місяці тому +9

      seriously, it's capitalist innovation at it's worst. instead of writing 3 awesome C libraries for parsing and validating json, toml, yaml and making bindings to 2-3 other languages, you make your own bs language, that is probably somehow tied to your platform (for security reasons, obviously) and that solves a problem that nobody asked to solve.
      there has to be "a choice" of syscalls, basic filesystems, rendering mechanics and ui libraries, so that one wouldn't be able to just cross-compile an app from windows to posix and back. same as there has to be a choice of socket voltages and phone chargers. isn't it nice to "have options"?

    • @nisonatic
      @nisonatic 3 місяці тому +2

      We'll need a configuration language for the AI linear algebra pipeline to configure the AI that writes the configuration file builder and wires it into a Spring AbstractConfigurationFileFactoryAIGeneratorStrategyInterface.

    • @ra2enjoyer708
      @ra2enjoyer708 3 місяці тому

      @@Daniel_Zhu_a6f Yeah, just write your JSON config validation logic in C, lol.

    • @Daniel_Zhu_a6f
      @Daniel_Zhu_a6f 3 місяці тому

      @@ra2enjoyer708 validation can't be harder than parsing. and people write far more complex parsers in C than a json one.
      but maybe you should just use python scripts for that.

  • @ReedoTV
    @ReedoTV 3 місяці тому +81

    Damn, all of this to avoid XML

    • @sproccoli
      @sproccoli 3 місяці тому +11

      the funny thing is that xml has stuff like this since a long time ago, xslt.

    • @ytdlgandalf
      @ytdlgandalf 3 місяці тому +10

      My brother is in to some weird sadomasochism stuff. I trumped him by saying I wrote XML and xslt by hand.

    • @ReedoTV
      @ReedoTV 3 місяці тому

      @@sproccoli They said classes, I heard xs:complexType

    • @nisonatic
      @nisonatic 3 місяці тому

      @@ytdlgandalf 🤢Jeez, can't people have normal fetishes anymore?

    • @TheNewton
      @TheNewton 3 місяці тому +16

      all this to avoid ecosystems with bad tooling, by creating yet another ecosystem with bad tooling

  • @sproccoli
    @sproccoli 3 місяці тому +2

    this reminds me of something that used to be in the odin standard library. It was a configuration language that allowed you to refer to things in diffrerent parts of the config and apply relational/arithmetic operations to it. last time i looked it wasn't there anymore, but it was pretty cool.

  • @rossbagley9015
    @rossbagley9015 3 місяці тому +2

    Google's internal deployment configuration files used a python-derived DSL called PCL. The programming element was essential to resolving the final command line used to start a binary within a borglet. The previous configuration syntax, borgconf, didn't allow as much expressiveness and ended up with a lot of cases that couldn't be addressed.

  • @michelfeinstein
    @michelfeinstein 3 місяці тому +8

    I found it funny that Apple is using Kotlin and Gradle to create pkl.

  • @bobertgaming3113
    @bobertgaming3113 3 місяці тому +12

    22:34 I loved the reaction from the flash bang LOL.

  • @emjizone
    @emjizone 3 місяці тому +6

    4:29 What a subtle way for Apple to say "Stop kidding with all these different languages and specific DSL and just do everything in *OUR* environment." ;p

  • @giuliopimenoff
    @giuliopimenoff 3 місяці тому +2

    one issue I have with this is that you still need to define env variables somewhere. that means having most likely a .env.template which I this point I would just use for all configuration variables. I wrote my own lib in Kotlin to create those template envs from kotlin and I think that's already more than enough. Kinda unsure if I wanna duplicate the work

  • @Gunzy83
    @Gunzy83 3 місяці тому +4

    I'm with prime on DRY. Everyone's obsession with this concept means they couple it with premature optimisation and you never find the real patterns and it becomes a clusterfuck fast.

  • @user-so5cx7lj5f
    @user-so5cx7lj5f 3 місяці тому +38

    22:40 the best part

    • @what-a-lark
      @what-a-lark 3 місяці тому +1

      Nearly unalived himself and everyone watching.

  • @demmidemmi
    @demmidemmi 3 місяці тому +3

    This feels like an excavator for your hole.
    It's powerful but probably just going to dig you deeper rather than lift you up,

  • @matiasbpg
    @matiasbpg 3 місяці тому +1

    Looks cool. The language bindings to generate the DTOs definitions for an API spec is a lot like using protoc and protobuf but without imposing a protocol, only the types that are expected.

    • @ra2enjoyer708
      @ra2enjoyer708 3 місяці тому

      It will impose the types, since you are only be able to operate on types understandable by Pkl and which can be mapped to your target language type. So you'd still have to handwrite extra transform step in the language of your choice which transforms lists in the config into `LazyStreamableOrderedUniqueSet`'s.

    • @matiasbpg
      @matiasbpg 3 місяці тому

      @@ra2enjoyer708 you are right. The same is happening to me right now with sqlc, lol. Anyhow because DTOs come at json or other serialized form, it is reasonable that there is mismatch of types with the model layer so to speak

  • @hannessteffenhagen61
    @hannessteffenhagen61 3 місяці тому +13

    Is this just apple-branded dhall?
    Edit: yes it's just dhall, but Apple

    • @lucsoft
      @lucsoft 3 місяці тому +2

      Well who knows dhall? Now everyone knows pkl

    • @complexity5545
      @complexity5545 3 місяці тому +1

      My god, I've been in the game for a long time. This is the first time I've heard of D-Hall. We have too many of these things. Thanks for teaching me something new.

  • @krtirtho
    @krtirtho 3 місяці тому +42

    Great they recreated Groovy. Now give them all credits

    • @lucsoft
      @lucsoft 3 місяці тому +3

      Groovy when strings. 10 ways, none work good without Jenkins complaining

    • @michaelslattery3050
      @michaelslattery3050 3 місяці тому

      He addressed why using Typescript is a bad idea, which also applies to Groovy. I've seem some pretty ridiculous "configuration" files that were basically application code

  • @AR-jx1sy
    @AR-jx1sy 3 місяці тому +5

    I’m oncall today and that slack sound gave me a panic attack lol 😂

  • @aaronhamburg4428
    @aaronhamburg4428 3 місяці тому +6

    To me that has the vibes of 15th competing standards.... I am also not quite big fan of making simple things be dynamic and more complex that they need to be.
    I see two main reasons to like/want this:
    1. DRY your hart out with the config
    2. Type hinting
    Both are weak souse excuse to make a whole new config lang/standard.
    There are already options to have minimal DRY abilities when doing config, having something that goes ballistic with abstraction will makes configs way harder to work with and maintain.
    Type hinting seems like a great lure but really now if the config is simple, readable and not abstract we need less type validation in general, the more we abstract the more we need validation and what good is validating that I entered a string and not a an integer when the string was a database name and the string I entered is still the wrong name...
    How do we go about making the validations and abstractions safe and not allow you to shoot yourself in the foot, should we also have testing framework and write tests for our config?

  • @markhaus
    @markhaus 3 місяці тому +1

    Love the Apple hopium, can't say I'm expecting PKL to point to much better developer relations than what we've seen from Apple so far. It just makes sense for Apple to have open source buy in to config and markup systems to make their internal lives easier.

  • @GackFinder
    @GackFinder 3 місяці тому +6

    YAML is an absolute nightmare to work with. I don't understand why so many products and tools use it.

    • @SeafoodFriedRice
      @SeafoodFriedRice 3 місяці тому +4

      Because JSON was a nightmare to work with. Especially so, since you can't add comments.

    • @arjix8738
      @arjix8738 3 місяці тому +1

      Yaml is fine, what is ur issue with it?
      I've been writing a lot of docker compose configs and it has been great
      Although I prefer toml

    • @DryBones111
      @DryBones111 3 місяці тому +3

      It is because YAML is the most expressive, writable and readable of all of the static markup syntaxes.

    • @GackFinder
      @GackFinder 3 місяці тому

      @@arjix8738 "ur" argument is based on the most trivial usage of yaml. Yaml becomes non-trivial when "ur" manifest files either have to span multiple screens or has to be divided into multiple files due to the sheer size of the config, like when you deal with e.g. nested Helm charts or kustomize for business critical stuff.

  • @petrusboniatus
    @petrusboniatus 3 місяці тому +7

    This is more like less advanced version of the dhall programming language than nix. Anyway my opinion is that configuration should be done in a general programming language that can be used for configuration (lua, scheme, python...) instead of a configuration language that can be used to program. It's even better if the configuration language is the same as the app language, this can be practical also in compiled languages if you have a fast enough compiler and hot-reloading.

    • @SystemAlchemist
      @SystemAlchemist 3 місяці тому

      Yes - it's funny seeing all these configuration helpers when the Lisps solved that problem before it even existed.

  • @eveleynce
    @eveleynce 3 місяці тому +3

    anytime I'm writing a program that I know only I will ever configure, I just use a raw text file or environment variables, and anytime I'm writing something that other people will have to look at, I go with either json or ini because they're familiar

    • @KManAbout
      @KManAbout 3 місяці тому +2

      Dude I never run into ini files in the wild

    • @arjix8738
      @arjix8738 3 місяці тому

      ​@@KManAboutyou may run into toml which is basically ini++

  • @monocledmanatee6355
    @monocledmanatee6355 3 місяці тому +2

    Somehow this reminds me of a build system called Bazel. Where you have a language called Starlark, which is annoyingly similar to Python (except when it suddenly isn't). The end result is you have to create a ton of Python-y build definitions and whatnots and... well, we had 15 competing standards...

    • @weakspirit_
      @weakspirit_ 2 місяці тому

      i tried to build a rather popular open source project that uses bazel, could never grok what the fuck i'm supposed to configure to get shit right. i quit trying to contribute right then and there

  • @excitedbox5705
    @excitedbox5705 3 місяці тому +6

    I thought I was going to make it through a day without having to learn a new syntax.

  • @LucasSzczepaniki
    @LucasSzczepaniki 3 місяці тому +2

    that moment when you throw the flashbang and it hits a corner before coming back to you

  • @saiphaneeshk.h.5482
    @saiphaneeshk.h.5482 3 місяці тому +5

    I love how your head gets translucent.

  • @aavash441
    @aavash441 3 місяці тому +1

    this will be great for deployers and operators and is super useful for validation, i've lost countless hours just sifting through helm chart values.yml files and deploying wrong configuration. developers will have to however push validation and maintenance of config outside of their applications to this which can be both good and bad

  • @emilfilipov169
    @emilfilipov169 3 місяці тому +45

    Neovim will be default.. Only for the small price of $699

    • @adammontgomery7980
      @adammontgomery7980 3 місяці тому +6

      But, you can upgrade from 8G of RAM to 16 for the low, low price of $299

    • @emilfilipov169
      @emilfilipov169 3 місяці тому +1

      @@adammontgomery7980 CPU not included. xD

    • @electronpie
      @electronpie 3 місяці тому +2

      ...a month

  • @raiguard
    @raiguard 3 місяці тому +2

    I probably won't use this in the production builds of applications, but being able to define a schema and automatically generate code to parse it, and in the future also generate man pages and cli arg parsing/help, would be incredibly useful.

    • @ci6516
      @ci6516 3 місяці тому

      Are you my professor of operating systems by chance

    • @raiguard
      @raiguard 3 місяці тому

      @@ci6516 no, I'm a student.

    • @_unknown_guy
      @_unknown_guy 3 місяці тому

      so XSD which we have fore ages...

  • @BenTzionZuckier
    @BenTzionZuckier 3 місяці тому +6

    DRY = Do repeat yourself

  • @WhyDoesYTUseHandlesNow
    @WhyDoesYTUseHandlesNow 3 місяці тому +17

    I've had many situations where I've wanted this, but its already too easy to add a thousand hyperspecialized libraries to your project, so I'll likely avoid it at all cost.

  • @faceeverychallenge
    @faceeverychallenge 3 місяці тому +1

    Love seeing prime’s hair becoming one with the background

  • @StevenHunt1
    @StevenHunt1 3 місяці тому +3

    I like that yaml and json do not allow programming functionality. Once you have the potential for conditions and flow control now we have to think about how this gets tested since it's actually code.

  • @nisonatic
    @nisonatic 3 місяці тому +4

    "It is common to think of static languages like ... Property Lists."
    No, Apple, nobody thinks of property lists. People who know about them wish they didn't.

    • @arjix8738
      @arjix8738 3 місяці тому +1

      What is a property list?
      Is it the plist file every macOS program had?

    • @nisonatic
      @nisonatic 3 місяці тому

      @@arjix8738 Yup.

  • @_unknown_guy
    @_unknown_guy 3 місяці тому

    So how is this better than XSD, JSON schemas or whatever variation? Basically push XSD in LSP to get autocompletion in editor?

  • @digimbyte
    @digimbyte 3 місяці тому

    this is beautiful, as someone who makes configurable software to be used in prod/dev and we don't want to expose values and environment stats, this allows us to migrate and control data that is also easy enough that anyone can step in and reconfigure without things breaking. imagine if all config files used this.
    and I get your point on extraction, it introduces a layer of complexity and dissassociative on debugging, my counter for this is config files. they should be a dynamic form that can't be broken or extracted from a formula. else you may as well use typescript for your configs. I honestly love everything i see in Pkl and I am creating something similar for an admin interface.
    Non-programmers creating code configs.
    wild right?
    but its because we have an event system that fires micro instances of objects on a per trigger event. and these need to be configured per managments needs. so i've made my own mutable pkl like parser.

  • @Oler-yx7xj
    @Oler-yx7xj 3 місяці тому +14

    New PasKaL just dropped

  • @user-hk3ej4hk7m
    @user-hk3ej4hk7m 3 місяці тому +1

    While the regex for zip code is always a mistake for user input, my understanding is that this is there to catch errors by people doing the config, not to sanitize malicious input.

  • @adaliszk
    @adaliszk 3 місяці тому

    14:48 In Hungary we explicitly have 4-digit zip-codes :)

  • @YoTengoUnLCD
    @YoTengoUnLCD 3 місяці тому +7

    So… Dhall but worse?

  • @nevokrien95
    @nevokrien95 3 місяці тому

    What if u generate code that generates code?
    Like python to cython to c to assembly.

  • @danko95bgd
    @danko95bgd 3 місяці тому +14

    Cue already exists

    • @DryBones111
      @DryBones111 3 місяці тому +1

      Cue is all the greatness of this but without the inheritance footgun + a super neat scripting layer which I think the Primeagen would love.

    • @DryBones111
      @DryBones111 3 місяці тому +1

      Unfortunately Cue doesn't have the resources of Apple behind them so the language is still working on an LSP and package manager. Once those are ready to go, I'm all in on Cue.

    • @KManAbout
      @KManAbout 3 місяці тому

      Well let me Cue you in. Cue isn't queued up for use.

  •  3 місяці тому

    Question to you: how do you spell this one - data or data?

  • @nexovec
    @nexovec 3 місяці тому +1

    "Your age will never be a long int"
    Oh my Lord
    "It won't even be a short"
    Oh Jesus

  • @lmao6
    @lmao6 3 місяці тому

    A use case I’m thinking of is ci. Let the company write scary yml configs that could potentially break prod. But have a small set of experts in pkl write some ci to validate that the yaml they wrote passes the pkl file. Is that something that’s possible?

  • @magfal
    @magfal 3 місяці тому +1

    14:48 there are placed with alpha-numeric zip codes too.

    • @aaronhamburg4428
      @aaronhamburg4428 3 місяці тому +2

      like the UK, which was also mentioned in the video

  • @ShotgunKlaus
    @ShotgunKlaus 3 місяці тому +1

    i love this. this will make writing kubernetes manifests so much faster

  • @eveleynce
    @eveleynce 3 місяці тому +4

    the only things required to be turing complete are 1: ability to read and write memory in some way (file text counts) 2: the ability to move around the memory, and 3: the ability to determine which of the above to do at any given time.

    • @klaudyw3
      @klaudyw3 3 місяці тому

      This reads a lot like a quote from Doctor Who. "First you have to imagine a very big box fitting inside a very small box. Then, you have to make one. It's the second part people normally get stuck on."

  • @hielkefe
    @hielkefe 3 місяці тому +1

    wow, now I can enjoy Stored Procedures in data files...

  • @sealoftime
    @sealoftime 3 місяці тому +3

    I mean Cue has been there all this time, and is much simpler, no OOP nonsense in there

  • @max-mr5xf
    @max-mr5xf 3 місяці тому

    You can use references in JSON and YAML so you don’t need to repeat everything. But it lacks flexibility in cases where strict „copy and paste“ isn’t enough.

  • @joaooliveirarocha
    @joaooliveirarocha 3 місяці тому +6

    Everyone keeps forgetting of Nix

  • @praphael
    @praphael 3 місяці тому

    In order to be considered a "true" programming language you need to be able to compute any computable function - i.e. it needs to be "Turing complete'. Prolog doesn't have explicit branching or loops, however it is Turing complete.

  • @SuperGulamali
    @SuperGulamali 3 місяці тому

    Bruh my eyes 23:00, Also your hair look funny af!

  • @pinpox
    @pinpox 3 місяці тому +16

    So, this is like Nix, but not nix?

    • @ScibbieGames
      @ScibbieGames 3 місяці тому +5

      Yeah, except Nix can do way more because of the package manager.
      I guess that can be seen as dead weight if all you wanted was a config language..

    • @LKamii
      @LKamii 3 місяці тому +3

      This is not really like Nix. More like cuelang.

    • @Saeppel
      @Saeppel 3 місяці тому +1

      This is similar to nix with types. The closest to Pkl I know is dhall.

    • @KManAbout
      @KManAbout 3 місяці тому +2

      @@Saeppel jsonnet

    • @bew
      @bew 3 місяці тому +2

      Or Nickel? (a potentiellement successor of Nix)

  • @nikolamar
    @nikolamar 3 місяці тому

    Light theme incident is golden! :)

  • @haomingli6175
    @haomingli6175 3 місяці тому

    if programming languages are defined by turing completeness, then apparently some dependently-typed languages like agda or coq cease to be languages because they are not turing complete. they are used to write formal proofs, and as such, any well-typed program must be guaranteed to terminate on all inputs, which instantly means that they are not turing complete, because you can have turing machines that never terminate on some inputs.

  • @TheNewton
    @TheNewton 3 місяці тому

    17:01 How much cares is put into that variable?

  • @ValerioRiva
    @ValerioRiva 3 місяці тому

    Will try it to manage large openapi yaml specs

  • @brandonw1604
    @brandonw1604 3 місяці тому

    Are you about to move to Mac and use Yabai for window management?

  • @shad-intech
    @shad-intech 3 місяці тому

    Can't believe I cheeked out my slack😂😂😂

  • @alanscodelog
    @alanscodelog 3 місяці тому +1

    Lol, I also immediately thought is this just nix lang? Though I'll give you nix is maybe a bit to functional for some people and can be slightly hard to read at first. Also nix doesn't really have typed properties though I hope it gets them in the future.

    • @bew
      @bew 3 місяці тому

      Nix won't have types in any time, but Nickel is being built to maybe replace Nix some day

  • @CrazyMineCuber
    @CrazyMineCuber 3 місяці тому +6

    So it is like Nix except for the infinite recursion errors.

  • @ravenecho2410
    @ravenecho2410 3 місяці тому +1

    Jsonnet isn't bad but pkl seems a bit more tightly defined.
    Jsonnet works well, but its very loose, and you would want an external validate so it's cool that you get that in the tool.
    Jsonnet is a little heavy as well...

  • @lyovson
    @lyovson 3 місяці тому

    I fell from my chair laughing when Prime did 🤣🤣🤣

  • @asdfghyter
    @asdfghyter 3 місяці тому

    we all know that it’s not intended to be a json/jaml/toml/etc killer, it’s intended as a .plist killer, since that’s currently apple’s default configuration language

  • @electrostatic1
    @electrostatic1 3 місяці тому

    Xcode has vim motions, but it's missing some functionality

  • @lorenzo42p
    @lorenzo42p 3 місяці тому

    I'm using handlebars templating engine in rust to generate configs

  • @mmmhorsesteaks
    @mmmhorsesteaks 3 місяці тому +2

    It's puh-kewl actually!

  • @DanielSantanaBjj
    @DanielSantanaBjj 3 місяці тому +1

    That RegExp matches any string that contains 5 digits in a row 🤣

  • @maxparker4808
    @maxparker4808 3 місяці тому

    IMO data and logic should not be overlapping. You could roll your own CI/CD using a Python script that consumes a JSON data structure and some env variables (or values from a secret store) and it would be better than using YAML.

  • @Oler-yx7xj
    @Oler-yx7xj 3 місяці тому +1

    22:37 Nice hair

  • @RedPlayer_1
    @RedPlayer_1 3 місяці тому

    I love that his hair is now partially transparent xD

  • @hemmper
    @hemmper 3 місяці тому

    22:33 light mode is kryptonite for hooded developers 🙂

  • @astronemir
    @astronemir 3 місяці тому +1

    ⁠time to debug the config that generates the code that generates the config that generates the helm values that generates the K8s manifest that generates the deployment logic that generates the node and network calls that end up breaking because of the UI entered config your IT department put in when setting up network drives that back up your node.
    It’s going to be great.

  • @psyjax2
    @psyjax2 3 місяці тому +1

    Lua was basically this. Legit, lua started life as a programming language for configuration and is still used that way. e.g neovim

  • @cexeodus
    @cexeodus 3 місяці тому

    can you even pickle an apple?? 😂
    Apple:
    "I got seeds too, can ya pkl me too Greg?"

  • @tonyedwards3086
    @tonyedwards3086 3 місяці тому +1

    How does this compare to cue?

    • @DryBones111
      @DryBones111 3 місяці тому +1

      Pkl has type inheritance meaning values can be overwritten at any point. The Turing completeness without the immutability is a setup for a bad time in my opinion.

  • @skudge
    @skudge 3 місяці тому +2

    Clojure's EDN is all you need.

    • @KManAbout
      @KManAbout 3 місяці тому

      Not everyone likthes lithsp

    • @skudge
      @skudge 3 місяці тому

      @@KManAbout yeah, not everybody has good taste

  • @LukasKrotovic
    @LukasKrotovic 3 місяці тому

    I think they will be really soon flooded with requests for more validation options. It will be really hard to draw the line between validation and a logic around the data.

  • @steffennilsen2132
    @steffennilsen2132 3 місяці тому +1

    I have to admit I like the Bicep language that Microsoft provides for Azure ARM

    • @ihnatklimchuk1018
      @ihnatklimchuk1018 3 місяці тому

      I feel sorry for you. As an engineer, I don't see any reason to learn yet another DSL that I'll forget right after infra setup, instead of using AWS CDK or CDKTF + any language I like.

    • @steffennilsen2132
      @steffennilsen2132 3 місяці тому

      @@ihnatklimchuk1018 it's part of the job so I don't really have much choice in the matter. It is a big improvement over writing ARM configs in JSON so I'll take any W I can

  • @Gennys
    @Gennys 3 місяці тому

    6:00 what do you mean? That's Lua.

  • @SatoshiCommentorto
    @SatoshiCommentorto 3 місяці тому +1

    Apple lets their employees often code in whatever IDE or framework they want to. I am sure that varies team to team but its not rare.

  • @TheSimRacers
    @TheSimRacers 3 місяці тому

    My first thought was actually “configuration doesn’t start with a K…” 😅

  • @shadowviper95
    @shadowviper95 3 місяці тому +7

    Why note json schema / schema store was the first thing that came to mind

  • @ivanjermakov
    @ivanjermakov 3 місяці тому +1

    12:30 What is the domain where TypeScript is not enjoyable to use? It's just as enjoyable as any other statically typed language with good tooling.

    • @harleyspeedthrust4013
      @harleyspeedthrust4013 3 місяці тому +2

      that would be the domain of skill issue, where you don't know typescript and don't want to learn it so you complain and publish plain javascript packages that don't work

    • @ivanjermakov
      @ivanjermakov 3 місяці тому +2

      @@harleyspeedthrust4013 my exact thought. You either write type safe code that you're skilled enough to write, or it contains a ton of type errors.

    • @arjix8738
      @arjix8738 3 місяці тому

      Typescript is actually great for config files.

  • @Hossimo
    @Hossimo 3 місяці тому

    GIF Jif, Char Car things can be both wrong and right at the same time

  • @alexthotse5487
    @alexthotse5487 3 місяці тому

    Blue haired agen: have you heard of cuelang? Seems similar to pkl

  • @blenderpanzi
    @blenderpanzi 3 місяці тому

    zip codes can be pretty much anything in different countries. Can't make any assumptions for that if you need to handle more than one country.

  • @aspiesoft
    @aspiesoft 3 місяці тому

    I needed something like this about a week ago. At this point, I've almost finished making a dynamic configuration file that uses yml and is compiled in golang.
    I wanted to make a theme configuration file that automatically finds better text contrast, and forces users (me) to make better design choices. Please do not ask my why I spend weeks on this simple project.

  • @Ardren
    @Ardren 3 місяці тому

    How **do** you make a zipcode type in Pkl? I assume you just can't and have to it in the program logic anyway.
    Ignoring the age itself is a bad example (unless it's for events, or fictional things), how do you keep validation code (0-130) in sync with program logic?
    The demos look good, but they also only cover absolutely trivial things.