Accidently created JDSL | Prime Reacts

Поділитися
Вставка
  • Опубліковано 3 лют 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.
    Article link: matsmoll.github.io/posts/how-...
    By: Mats Eikeland Mollestad
    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
  • Наука та технологія

КОМЕНТАРІ • 150

  • @megaing1322
    @megaing1322 4 місяці тому +86

    Someone once said "any sufficiently complex program will contain a half-baked LISP interpreter."
    Edit: Aha, it's called "Greenspun’s Tenth Rule"

    • @isodoubIet
      @isodoubIet 4 місяці тому +12

      Basically the douchiest way to say that sufficiently complex DSLs end up turing complete, as if lisp were the only turing complete language on the planet

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

      ​@@isodoubIetLISP isn't the only Turing complete but it is simple and extremely flexible.

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

      ​@@isodoubIetyeah C is just lisp with different brackets

    • @duncanw9901
      @duncanw9901 4 місяці тому +2

      The other reason for it being Lisp specifically is that Lisp programs literally _are_ their own abstract syntax tree-so if you ever parse anything, you're in a sense "converting it to a bad Lisp"

    • @isodoubIet
      @isodoubIet 4 місяці тому

      @@duncanw9901 C++ and Rust are just lisp, you heard it here first folks

  • @LusidDreaming
    @LusidDreaming 4 місяці тому +55

    If anyone is interested, one hot encoding is the process of taking a set of values (think enum) and convert them to a series of arrays with a single 1 and the rest 0s. You're essentially creating a bitset to define the set of possible values. This representation matches the output of a neural network classifier.

    • @superuser8636
      @superuser8636 4 місяці тому +2

      Good explanation. I like to think of the easy example like strings converted to one-hot vector embedding

  • @bahaaka828
    @bahaaka828 4 місяці тому +15

    Tom is a genius.

  • @ymity4637
    @ymity4637 4 місяці тому +97

    That ping tricked me >:[
    Tom is a genius.

  • @ea_naseer
    @ea_naseer 4 місяці тому +85

    Me at 2:50: so we are writing parse trees by hand.
    Prime at 3:00: we are writing an interpreter
    Me: my CS degree is not for waste.
    my take: just use Lisp at that point

    • @spookyconnolly6072
      @spookyconnolly6072 4 місяці тому +2

      "but muh parens"

    • @ea_naseer
      @ea_naseer 4 місяці тому +8

      @@spookyconnolly6072 JSON - but muh braces 😂

    • @leon.t8772
      @leon.t8772 4 місяці тому +4

      Would that require shipping a Lisp interpreter with the newly defined DSL? I think they were trying avoid exactly that interpreter lock-in, but one could argue that they now instead need to ship their in-house tech. Seems a bit overengineered to me either way.

    • @user-qm4ev6jb7d
      @user-qm4ev6jb7d 4 місяці тому

      @@leon.t8772 But Lisp is both small *and* deterministic, that's the point. Same would go for Lua, for example: it's not much of a challenge to bundle that with your application.

    • @hkupty
      @hkupty 4 місяці тому +1

      I came to say this. My experience with clojure is that code is not too far from data. Lisp (and descendants) make that very obvious. I once wrote a prototype of an automated rules engine in clojure where you'd describe logic as data files in edn format.

  • @replikvltyoutube3727
    @replikvltyoutube3727 4 місяці тому +37

    Man built JVM
    JSON VM

  • @reoseah
    @reoseah 4 місяці тому +38

    This Mats is not Tom, but he seems quite smart

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  4 місяці тому +12

      seems like he could really run a place

    • @daltonyon
      @daltonyon 4 місяці тому +5

      Mats is the codename of Tom

  • @isodoubIet
    @isodoubIet 4 місяці тому +12

    Yes one-hot encoding is a very standard thing in data science, not necessarily python.
    Also if the success of your model hinges on slight numerical differences between different implementations of the same algorithm, your model is not very good.
    Also nobody should ever say "python" and "type-safe" in the same sentence.

  • @DarthChrisJ
    @DarthChrisJ 4 місяці тому +1

    STROKE!
    I lol’d out loud and lmao’d me ass off.
    Glorious recovery.

  • @JeremyAndersonBoise
    @JeremyAndersonBoise 4 місяці тому +7

    I was there for the live stream, being a chat clown, but I just realized there is a briliant idea hiding in here. I have a real use for “git JDSL” in mind.

  • @maxcharacterlimitreache-
    @maxcharacterlimitreache- 4 місяці тому +4

    Man, i feel bad for Keith, that will be tasked to maintain and work on Tom's atrocious and undocumented puppy when Tom leaves

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

    all of this to still have his original issues around version differences, and machine/set up specific quirks... sounds like they need a container solution instead... But it does solve a significant amount of issues around data and lineage etc.

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

    One day, all will be bespoke broken dynamic libs made in javascript with no comment support. Tom is magnanimous.

  • @jorenboulanger4347
    @jorenboulanger4347 4 місяці тому

    I built DDSL (double-diesel) at my company for our data transformations. The thing is awesome!

  • @MarcLucksch
    @MarcLucksch 4 місяці тому

    Having put LUA into 3 different things now, I also recommend LUA. It’s brilliant.
    Also, if you use JLua, you can throw objects on the LUA stack without them being modified, so you can have them encapsulate your data and even functions, essentially turning LUA into an OO language. It’s evil and dark magic, but also very useful. (For example, I had a players object with sockets in them that LUA could not touch, but I could add a kick() function to any player object that uses closes the socket in Java, but it would only work or be available on the player objects. But whatever the LUA code did with the object, store it in an array, pass it along, return it, save it in other structures, it would keep its specialness and kick() still worked)

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

    My take is that JSON is great for structured data that can be read by anything. It's very useful for shared lookup tables between disparate pieces of software in different languages that work together either remotely or on the same system. I recently used a JSON file to track modify times in a file sync tool and it went super smooth. Trying to use it as a language of its own seems ill-advised, but using it as a lingua franca between other languages is usually a solid tactic in my experience because both languages can work with their own ways of processing it.

    • @MarcLucksch
      @MarcLucksch 4 місяці тому

      It’s a decent way to safe structured data, until you need a datetime..

    • @andythedishwasher1117
      @andythedishwasher1117 4 місяці тому

      @MarcLucksch Unix timestamps, my man. They're just strings and almost everything has a converter.

    • @andythedishwasher1117
      @andythedishwasher1117 4 місяці тому

      @MarcLucksch Although I do feel your pain. Recently had a project that required me to do exactly that across a typescript front and a common JS node backend plugging into MSSQL. The time zone difference between the production server and my testing environment created no end of headaches.

    • @MarcLucksch
      @MarcLucksch 4 місяці тому

      @@andythedishwasher1117 @andythedishwasher1117 Yeah, there are workarounds, but saving it as a string is meh, and JS can't be trusted with numbers for timestamps. Also you always have to convert manually in JS, super annoying, even though JS has a Date type. And timezones are hell, as you said :)

  • @adamhenriksson6007
    @adamhenriksson6007 4 місяці тому

    Omg, i realized that i also made JDSL at work for processing excel files with an streamlit wrapper. It's also somehow pretty robust and worked really well.

  • @NibbleMeTwice
    @NibbleMeTwice 4 місяці тому

    I'm now convinced to write a Lexer for Lua. Writing a Lexer is something I've wanted to do for a while.

  • @Miginyon
    @Miginyon 4 місяці тому

    Rocking the arc

  • @levizin917
    @levizin917 4 місяці тому

    I did json coding in rust in my company, we wanted a service that could get events, hidrate, and send to multiple providers, some events go to all providers, some events only to some
    what I ended up building was a macro in wich you write where your events go and what are the properties transformations in json like, and it builds all conversions, and the events themselfs are typed on a .proto file, and everything is checked in compile time by rust

  • @georgecop9538
    @georgecop9538 4 місяці тому

    Bro got so angry that Jake added code comments, but yeah, Tom is a genius.

  • @arberstudio
    @arberstudio 4 місяці тому

    I use objects like this for load balancing and view rendering configs for vanilla js SPA

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

    "JDSL is an experience" Better words haven't been said

  • @onuktav
    @onuktav 4 місяці тому +11

    JSDL is inimitable. All hail Tom!

  • @robertfletcher8964
    @robertfletcher8964 4 місяці тому

    oh great another abstraction in ML. just what we needed.

  • @Kane0123
    @Kane0123 4 місяці тому

    4:10 - dog, pig, dog, pig. Loaf of bread.

  • @mattius17
    @mattius17 4 місяці тому

    man this gives me flash backs of logic being baked into xslt files via some local callback mechanism... *shudders*

  • @GearsDatapacks
    @GearsDatapacks 4 місяці тому

    Tom IS. A genius.

  • @Sfner
    @Sfner 4 місяці тому

    I guess that fits the requirements needed... let's convert that JDSL into XML, rename it to "DTSX", and pretend we used SSDT... and convert back legacy DTSXs into JDSL, so we can deploy on Camel and consider extending that data-oriented JDSL for enabling APIs with CamelK and Quarkus... great insight!

  • @thedoctor5478
    @thedoctor5478 4 місяці тому +1

    one-hot is a just a vector of zeros where you flip one (And only one) of the bits at a time. machine learning 001 bros

  • @suvalaki
    @suvalaki 4 місяці тому +1

    I think he's solving a problem that already has solutions behind it. Data processing is reasonably well accomplished via dbt , version editing spark or whatever. Model and data freshness can be maintained via tools like mlflow , kubeflow ect. I read his code and I'm just not seeing where to slot this in....
    Data pipelines are also version controlled already on the code side and are run in controlled execution environments; your tech of choice will be available.
    Freshness gets maintained via metadata tagging of your assets and rules.
    I do like him using dataclass fields to define named operations.

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

    the only thing worse than this is making a forth/stack machine embedded in json to be literal bytecodes for this

  • @CEOofGameDev
    @CEOofGameDev 4 місяці тому

    And when we needed the most, he returned....

  • @vojtastruhar8950
    @vojtastruhar8950 4 місяці тому

    Tom is a genius

  • @alexpyattaev
    @alexpyattaev 4 місяці тому +2

    Async python is genious.

  • @michaelwesolek8735
    @michaelwesolek8735 4 місяці тому +1

    Something Something, Haskel peerfunction ocaml.

  • @JorgetePanete
    @JorgetePanete 4 місяці тому

    Serious question, how do you call Java scripts (or compiled code) given by the user securely? let's say its purpose is to check things about data also given by the user

    • @thewhitefalcon8539
      @thewhitefalcon8539 4 місяці тому +2

      You don't

    • @asdfqwerty14587
      @asdfqwerty14587 4 місяці тому +1

      Well.. if you wanted to handle only very specific cases (ie. a very stripped down version of javascript where most functions don't exist anymore) then you could create a map of "allowed functions/operations" and then parse the string yourself to see if there's anything that's not allowed.. depending on what you're doing this could potentially be done (though you'd still need to be incredibly careful to not let any edge cases through).
      Realistically, if you were doing anything like this you should also ensure that the code is only ever run on the client side by the client that created it - you definitely don't want that running on your own servers or on anyone else's computer. That way if the client does something stupid it doesn't affect anyone other than themselves.
      If you mean just validating any javascript in general, that would be basically an impossible task and would probably be 100x more complicated than the entire rest of your program combined - it might even be mathematically impossible to do (I guess depending on what your definition of secure is..).

  • @Kaka-zs4cp
    @Kaka-zs4cp 4 дні тому

    Noooooooooooo! jDSL is back!
    Tom is a genius

  • @TAP7a
    @TAP7a 4 місяці тому

    I built an analysis pipeline that was entirely defined by (barely validated) YAML
    The only thing that saved my skin was the incredibly tight scope

  • @sk-sm9sh
    @sk-sm9sh 3 місяці тому

    All organisms evolve to crabs and all programming languages evolve to json. Its inevitable just like the big freeze of universe is inevitable one day once whole universe has finished encoding it self into json.

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

    Is this not how Redis databases are saved to disk? As in it records the full series of commands executed on the server and uses that to rebuild it in RAM?

  • @forrestbajbek3900
    @forrestbajbek3900 4 місяці тому +2

    This already exists. It’s called SQL.

  • @samuelschwager
    @samuelschwager 4 місяці тому

    I wonder what Vin Diesel would come up with

  • @thomasmackay4
    @thomasmackay4 4 місяці тому

    Usually this is done in Yaml for more pythonic review.

  • @helleye311
    @helleye311 4 місяці тому +1

    Not sure about this. I think I prefer Tom's solution. He's a genius after all.

  • @leagueoflags
    @leagueoflags 4 місяці тому +1

    JDSL is back! Hallelujah!

  • @georgerogers1166
    @georgerogers1166 4 місяці тому

    Symbols would help.

  • @djupstaten2328
    @djupstaten2328 4 місяці тому

    Wait till he sees Mojo...

  • @tylerlaprade642
    @tylerlaprade642 4 місяці тому

    Bro just invented Django

  • @webopeluo2
    @webopeluo2 4 місяці тому

    tom is a gnome

  • @andrewdunbar828
    @andrewdunbar828 4 місяці тому +1

    rust side-effect: s/in my life/in my lifetime/g

  • @urisinger3412
    @urisinger3412 4 місяці тому

    wait this this guy hears about graphs

  • @briankamras2913
    @briankamras2913 4 місяці тому +1

    Are we allowed to call JSON s expressions yet?

  • @andythedishwasher1117
    @andythedishwasher1117 4 місяці тому

    How long before somebody writes JSONlang?

  • @fkdhjfghdsjkghjkfhgkfjd
    @fkdhjfghdsjkghjkfhgkfjd 4 місяці тому

    So.... Why use SVN over Git? Real question.

  • @wilfridtaylor
    @wilfridtaylor 4 місяці тому

    Hehehe when I was much younger I created an action execution thing in xml. It was horrible.

  • @hebozhe
    @hebozhe 4 місяці тому

    So he recreated Unison.

  • @josephangelodelosreyes4206
    @josephangelodelosreyes4206 4 місяці тому

    JDSL: But does it have comment support though??

    • @ricky2629
      @ricky2629 4 місяці тому

      You can't have comments in JSON

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

    Tom is a genius, we are the morons!

  • @user-xx5pv6wv5w
    @user-xx5pv6wv5w 4 місяці тому

    bro invented langgraph, wow

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

    "torture-wise SVN"?

  • @oblivion_2852
    @oblivion_2852 4 місяці тому

    Developer discovers IR... But in json

    • @oblivion_2852
      @oblivion_2852 4 місяці тому

      I mean... It's easier to read than bytecode *shrug*

  • @gardnmi
    @gardnmi 4 місяці тому +1

    I would ask him to refund his salary if I employed him.

  • @capycodying
    @capycodying 4 місяці тому

    Now, I have a question: How do I add comments to JDSL?

  • @kevinkkirimii
    @kevinkkirimii 4 місяці тому

    OP ->'Otovo' | Prime -> 'Aviato'

  • @thatmg
    @thatmg 4 місяці тому

    Mats' a Genius!

  • @mats66
    @mats66 6 годин тому

    Isn't this what we normal people call "a config file"? 😅

  • @sirrobinofloxley7156
    @sirrobinofloxley7156 4 місяці тому

    Should have Tom on, as a guest, and that other dude who did that stuff with Lua, Scandish name, I think, Jensen, somethin. I'd love to see a weekly with a panel, that would be increds.

  • @DaweSounds
    @DaweSounds 4 місяці тому

    haha the stroke yelling at 5:20: made me spit out my coca cola in laughter

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

    Jom is a tenius.

  • @smarakdas3794
    @smarakdas3794 4 місяці тому

    TOM IS A GEEEENIUSSSS

  • @75hilmar
    @75hilmar 4 місяці тому

    Oh boy what is this 😂

  • @Governorrr
    @Governorrr 4 місяці тому

    This article provides too much documentation for this to be truly considered JSDL

  • @ObiWanKenobi_IceNation
    @ObiWanKenobi_IceNation 4 місяці тому

    Sype Tafe santrformations

  • @KuroKazeZX
    @KuroKazeZX 4 місяці тому

    aren't you that dr disrespectful guy? the moustache is about the same, its probably just you with glasses

  • @mattw.28
    @mattw.28 4 місяці тому

    Turns out, Tom was right all along 😅

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

    All hail Tom

  • @liteniteTheOne
    @liteniteTheOne 4 місяці тому

    Microsoft needs to watch this. Logic apps 😢

  • @xcuu
    @xcuu 4 місяці тому

    Prime, it’s time that you roll up your sleeves and create your own JDSL. You’ll never be as genius as Tom, but still it’d be pretty awesome.

  • @gungun974
    @gungun974 4 місяці тому +1

    Lua4DSL❤

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

    Pkl moment

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

    The man just reinvented serde and enums, in python.

    • @d3stinYwOw
      @d3stinYwOw 4 місяці тому +2

      Where enums exist in Python, natively xD
      Just more sophisticated serialization/deserialization engine based on JSON

    • @isodoubIet
      @isodoubIet 4 місяці тому

      It's nothing like serde or enums

    • @duncanw9901
      @duncanw9901 4 місяці тому

      ​@@isodoubIetJSON is literally a wire format for Javascript objects.
      He is serializing his pipelines, and then deserializing his pipelines. That is exactly what is happening.

    • @isodoubIet
      @isodoubIet 4 місяці тому

      ​@@duncanw9901Thank you for the definition but everyone already knows what json is. This is not just a serialization thing because it imposes additional structure. Python has json as a built-in, don't you think he would've used that if it was enough?

    • @duncanw9901
      @duncanw9901 4 місяці тому +1

      @@isodoubIet just because it is not using primitives to serialize pipeline objects, or is serializing pipeline objects at a more abstract level than you consider normal, does not mean it is not serializing them.
      Serialization simply is the fundamental problem they are solving: "how do I get my object from this context to this other context automatically, with no corruption?"

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

    tbh, i'm not sure why one would want to build data pipelines with json. it is probably better to use lua or python or some other language.

  • @landonyarrington7979
    @landonyarrington7979 4 місяці тому

    Tom é um gênio

  • @Ataraxia_Atom
    @Ataraxia_Atom 4 місяці тому

    Suineg a si Mot

  • @RandomGeometryDashStuff
    @RandomGeometryDashStuff 4 місяці тому

    09:17 very verbose assembly?

  • @glowingone1774
    @glowingone1774 4 місяці тому

    LISP

  • @fbiofusa3986
    @fbiofusa3986 4 місяці тому +1

    As a data engineer, this is awful. He is not a genius like Tom

  • @Luiz6247
    @Luiz6247 4 місяці тому

    Tom also thought JDSL was a great solution to the problem... The author is a unreliable narrator

  • @pauldraper1736
    @pauldraper1736 Місяць тому

    Why not use the same programming language???

  • @wake-digital
    @wake-digital 2 дні тому

    I can't help but think that article was written by AI

  • @thatmg
    @thatmg 4 місяці тому

    What an unfortunate last name.

  • @testolog
    @testolog 4 місяці тому

    This is shit. Im big dana engineer 10 year's. Support this shit is nightmare. Append something new for person who create is good. But in best case should be only framework or lib with basic generic transformarion related to domain. I wrote this kind stuff so many time, and understand this is shit.

  • @slebetman
    @slebetman 4 місяці тому +1

    JSON may feel bad until you've had to maintain 1k line YAML files. Even with the help of YAML aware code editor editing JSON is a pleasure compared to YAML. I often cheat and convert my YAMLs to JSON because JSON is a valid subset of YAML (therefore JSON is valid YAML syntax)

  • @br3nto
    @br3nto 4 місяці тому

    3:25 blerg! Why do peeps use JSON for this 💩. At least choose something easier to write and read like YAML.

  • @swedishpsychopath8795
    @swedishpsychopath8795 4 місяці тому

    10 seconds in: "programmed in JSON" ????? Is this amateur hour? PrimeTime thinks JSON is a programming language? I'm out.

  • @Mglunafh
    @Mglunafh 4 місяці тому

    Going to send this beatuty to my friend who is currently on his endeavor to build up his own Java-driven SQL-filled abomination of a JDSL, let's call it JSQDL (jei-sqwi-dl)

  • @litfill54
    @litfill54 4 місяці тому +8

    Tom is a genius.

  • @JLarky
    @JLarky 4 місяці тому +1

    Tom is a genius

  • @deado7282
    @deado7282 4 місяці тому +10

    Tom is a genius.