console.log([1, 2, 3].at(-1)) transpiles to 44k

Поделиться
HTML-код
  • Опубликовано: 12 ноя 2024

Комментарии • 278

  • @Cecekcz
    @Cecekcz Месяц назад +782

    It is I, Polyfloat Bill.

    • @joshuachan6317
      @joshuachan6317 Месяц назад +16

      0:30 😂

    • @berbold
      @berbold Месяц назад +16

      "They thought no-one could master hydrodynamics until he came to town"

    • @CrateSauce
      @CrateSauce Месяц назад +1

      I love this

    • @alexhiatt3374
      @alexhiatt3374 Месяц назад

      hi Bill

    • @michaelbuckers
      @michaelbuckers Месяц назад +5

      Things change, Standford Pines! *T̺͛H̭̅I͔̞̾͑N̘͖̬ͫ͋ͥG͚ͯͭ̅ͅͅS̩̙͎̭ͫ̈̿ ̺̳̥̘̉ͭ͌C͕̠̙̥̄ͧ̽H͚̩̭͉̅͋̃Á͉͈͍͉͋͒N͈̪͎͂͛ͦG̘͎̗͗ͭ͋E̮̓ͫͅ* HAHAHAHAHA

  • @SaHaRaSquad
    @SaHaRaSquad Месяц назад +194

    I think the part with Date(NaN) is the best example for the fact that all behaviour and edge cases are also an implicit part of the API. Imagine how much of the internet would break if an update changed the error message for a few nonsensical pieces of code.

    • @thewhitefalcon8539
      @thewhitefalcon8539 Месяц назад +18

      That's why !==String(Date(NaN)) is better than !=="invalid date"

    • @igorstasenko9183
      @igorstasenko9183 Месяц назад +10

      Can someone enlighten me why it is so important to keep sane the output of this function , to such extent, that it requires a separate library code to cover this case?
      It looks like some people can't stand without wiping asses of everyone who writes absurdly broken & non-functional code, to make sure it keeps being absurd and broken even after you upgrade the javascript version. :D

    • @Lord_zeel
      @Lord_zeel Месяц назад

      @@igorstasenko9183 Because there might be some website somewhere that checks for that output to determine something important, and if the message changes by even one character it won't match and everything breaks. It might even be a TEST that expects that output, and changing it would cause all the tests to fail which could cost someone time and money figuring out what changed. So instead, there spec specifies the message, and the polyfill makes sure the message matches the spec even if it's a silly thing like that. There are dozens of other messages that are way more important than that one, but the author of the polyfill isn't going to decide which ones seem important and which ones don't, they are just going to make sure they are all to-spec just in case. That is, after all, the point of the polyfill. If we didn't care that all the edge cases were covered, we would just write out own `Array.prototype.at = function...` replacement. It's not as if that's a complicated function after all! But we want anything like a polyfill to be extremely reliable, that's why we use them. So they need to cover EVERYTHING in the spec.

    • @LetsDark
      @LetsDark Месяц назад +1

      This would be great, then there are even more ways to differantiate between versions lol

    • @MunyuShizumi
      @MunyuShizumi Месяц назад

      @@igorstasenko9183 Because people can't left-pad strings and if new Date(NaN) casts to some other string value, there's a small-but-not-zero possibility of ICBMs being launched due to an invalid date being treated as valid. And ICBMs being launched is not part of ECMAScript, so Babel is keeping things nice and safe.

  • @StrengthOfADragon13
    @StrengthOfADragon13 Месяц назад +157

    "I know I'm the last committer, I committed atrocities" gonna steal this when my current project ends at the end of the month

    • @smocloud
      @smocloud Месяц назад +1

      “You didn’t commit code, you committed a crime!” 😂

  • @alexanderjordan2506
    @alexanderjordan2506 Месяц назад +148

    I think the slow rollout of WASM is generally a response to the state of JS and the history of browser compatibility. There's nothing I'm aware of stopping it from being a complete replacement for JS. The problem is that we all have to live with the decisions made about it for the rest of our careers, and nobody wants to make a mistake that we're all working around for the next 20 years because 100,000 websites depend on that mistake.

    • @username7763
      @username7763 Месяц назад +27

      As long as developers keep using JS on the server and in place where they don't have to use JS, I don't have a ton of hope for WASM. The idea is fine and I also liked asmjs. But we have generations of developers who don't realize the problems with JS just don't exist in other languages.

    • @kuhluhOG
      @kuhluhOG Месяц назад +5

      @@username7763 well, there are also a lot of developers who (would like to) not use JS
      tbf, a lot of them are currently in backend or an entirely different field in IT, but still, they exist and when WASM can actually replace JS, I could see the field becoming considerably more competitive

    • @ivanjermakov
      @ivanjermakov Месяц назад +17

      > There's nothing I'm aware of stopping it from being a complete replacement for JS
      As of now, no DOM API

    • @alexanderjordan2506
      @alexanderjordan2506 Месяц назад +3

      @@ivanjermakov That's the root of my point. There's nothing absolutely stopping someone from just shoveling some version of a DOM API out the door, if your only goal is to ship it. I feel that the reason it hasn't been done yet is because it's not as simple as just making it work.

    • @ivanjermakov
      @ivanjermakov Месяц назад

      @@alexanderjordan2506 it's not as simple and not anyone can do this, browsers must natively allow DOM access.

  • @rotors_taker_0h
    @rotors_taker_0h Месяц назад +36

    As a non-javascript developer I thought that this ES6 thing as some new thing created literally yesterday (as customary in JS world that is famous for its relentless speed) but then I googled it and realized that ES6 was released almost 10 years ago and the current one is version 15th, lol. And the vast majority of websites serving minced code processed god knows how and containing shreds of different versions... Honestly, I'm glad I never bit the bullet and dived into that stuff

    • @aztracker1
      @aztracker1 Месяц назад +4

      Yeah, and except for modules, which everything current supports, ES6 has been in the browser for roughly as long. I stopped using the polyfills several years ago now.
      I wouldn't use them today at all.

    • @bltzcstrnx
      @bltzcstrnx Месяц назад

      The problem is unpredictable client machines. I write nodejs backend, which in a server, we control what runtime version we use. So, in this situation, it's much easier to use recent standards such as ES2023 without any polyfill.

    • @aztracker1
      @aztracker1 Месяц назад

      Most client browsers are self updating and less than a year behind as it stands.

  • @JamesJansson
    @JamesJansson Месяц назад +84

    The code is probably using Date to check JS engine version.

    • @vignesh306
      @vignesh306 Месяц назад

      What

    • @DatMilu2K
      @DatMilu2K Месяц назад +2

      I think he realized it shortly after

    • @aztracker1
      @aztracker1 Месяц назад

      @@JamesJansson I forgot that the behavior didn't used to be common across browsers,. It'd been so long.
      It's kind of like the select box in or 5.0.0 or the JSON hydration function when extending array or object prototype in ie8. It's just something I don't think about any more.
      The IE 5.0.0 issues were painful as that point release was burned to discs and even though fixed in 5.0.1 many just used what came with office 2000 and never upgraded. It supported the newer DOM mode but not the old list API.

  • @YashShah-ml9pg
    @YashShah-ml9pg Месяц назад +171

    Safari is the new IE11

    • @hugeant97
      @hugeant97 Месяц назад +3

      Due to our platform's OS support we need to support Safari 10.10.

    • @thekwoka4707
      @thekwoka4707 Месяц назад +14

      Safari supports more of the spec than Firefox does

    • @nordern1
      @nordern1 Месяц назад

      @@thekwoka4707 Would be great if they could support the parts I need, because if I have browser issues, they tend to be caused by Safari.

    • @gamechannel1271
      @gamechannel1271 Месяц назад +54

      Firefox is always exactly to spec. They don't implement and ship draft specs before they are finalized, which is probably what you are referencing. Chrome is notoriois for introducing new APIs that are later deprecated because the draft spec changes.

    • @nezu_cc
      @nezu_cc Месяц назад

      ​@@thekwoka4707 on desktop. Safari on mobile is trash and the fact that it's tied to the OS version is even worse. Mobile Chrome is basically identical to desktop chrome and way ahead of safari. The moment Mozilla started actively refusing to add features from the spec is the moment I stopped giving a fuck about ff compatibility.

  • @remrevo3944
    @remrevo3944 Месяц назад +57

    First off: There *is* a proposal for wasm host bindings, which would enable direct DOM access for wasm in the browser!
    Second: It is *far* less than a 1 MB.
    For example the 1000 row benchmark - leptos 0.6.3 is ~200kb uncompressed and 60kb compressed.
    And while those numbers are still pretty high, leptos 0.7 promises significant improvements on that.

    • @krux02
      @krux02 Месяц назад +17

      Just to pit it in perspective. Super Mario World is 1MB.

  • @anobodyscontentstream5347
    @anobodyscontentstream5347 Месяц назад +66

    HOLD UP! IE 11 is not dead. They "killed it", but they literally made it so Edge can delegate to the Trident engine and they committed to supporting that to 2029. The company I work for literally had some dumb butt medical client complain that a report broke because we deployed a feature that didn't work in IE11 and we were all like "WTF? You are doing what!? You're using COMPATIBILITY MODE with IE IN EDGE!?"

    • @anobodyscontentstream5347
      @anobodyscontentstream5347 Месяц назад +8

      Also, while that doesn't work for Mac Edge, it does still work in Windows Edge... there are legitimately clients being stupid about needing Trident rendering still...

    • @aztracker1
      @aztracker1 Месяц назад

      @@anobodyscontentstream5347 when you're farther behind in technology than the govt. I've worked on several banking and govt projects and legacy support is no longer required.
      If they want to use a modern app, they should have a modem browser. It's a matter of security and should be stated as such. #NoFix is my general response to these things

    • @DarkorbitForever12
      @DarkorbitForever12 Месяц назад +5

      At my job they still have some old terminals where they use the IE compatibility mode in Edge.
      The worst part is that there are things that work in actual IE, actual Edge, but not in Edge compatability mode...

    • @celdaemon
      @celdaemon 12 дней назад +1

      It's dead enough that I would not want any modern tool to still target IE

  • @Dom-zy1qy
    @Dom-zy1qy Месяц назад +27

    Compiler optimizations are magic, javascript transpilers are dark magic

  • @LearnValkey
    @LearnValkey Месяц назад +70

    I wasted my youth on making rounded corners in IE6. Times before HTTP/2 were crazy.

    • @succatash
      @succatash Месяц назад +3

      The true follys of youth. Curves all kinds of curves

    • @DatMilu2K
      @DatMilu2K Месяц назад +18

      I remember when fancy layouts were made by using pictures with every designed element on it, like a spritesheet. Then we used tables and these sprites as background images to make a "beautiful" website with it. Many rounded corners and things like buttons were actually just pictures because CSS/Browsers didnt support this yet. Today you can do this all in just HTML/CSS lol. I hope Im not the only one who remembers and had to suffer through this hahaha

    • @josephvictory9536
      @josephvictory9536 Месяц назад +4

      @@DatMilu2K You aren't. I remember when we discovered that repeating a tiny square image can make the website load faster. Spent hours figuring out which pixels to chop/add to make the pattern look cool. Everything was tables, literally everything. I assumed all curves were just images. Never even considered the possibility it could be done any other way.

    • @TehKarmalizer
      @TehKarmalizer Месяц назад

      @@josephvictory9536 tables take me back to high school 20 years ago. It was a simpler time.

    • @MunyuShizumi
      @MunyuShizumi Месяц назад +4

      What does HTTP/2 have to do with round corners?

  • @KertaDrake
    @KertaDrake Месяц назад +13

    The death of IE was wonderful, but it was like blowing up the Death Star only to see a second one was finished and sitting right behind it waiting to attack the whole time in the form of Edge.

    • @josephvictory9536
      @josephvictory9536 Месяц назад +4

      Edge is good though.. and based on chromium.

    • @SimonBuchanNz
      @SimonBuchanNz Месяц назад +1

      Nah, the new IE is Safari

    • @KertaDrake
      @KertaDrake Месяц назад +6

      @@josephvictory9536 Don't forget that the modern Edge is a completely different browser that just happens to share the name of the original Edge that replaced IE.

    • @خيالكرةالقدم-ج7ش
      @خيالكرةالقدم-ج7ش Месяц назад

      And it runs in the background doing god-knows-what from startup

    • @j________k
      @j________k Месяц назад

      Underrated comment

  • @onhate
    @onhate Месяц назад +24

    uncurryThis(Nuts)

  • @יובלהרמן-ח2ד
    @יובלהרמן-ח2ד Месяц назад +3

    Rocking that screen tear for more then a year now, that's dedication

  • @Mitakbacktrack
    @Mitakbacktrack Месяц назад +53

    Some developers stick with ES5 to keep their code working on older browsers like Chrome 49, which still runs on Windows XP.

    • @fluoriteByte
      @fluoriteByte Месяц назад +8

      Might as well just tell the users to use supermium instead of targeting such old version of chrome

    • @thekwoka4707
      @thekwoka4707 Месяц назад +13

      At that point just don't write JavaScript at all

    • @theairaccumulator7144
      @theairaccumulator7144 Месяц назад +10

      There are more modern browsers for winxp. There's no need to use Chrome 49 anymore.

    • @celdaemon
      @celdaemon Месяц назад +2

      Don't, just don't

    • @sn-xc7rv
      @sn-xc7rv Месяц назад +6

      Doesn't windows xp get hacked the second you turn it on?

  • @tschichpich
    @tschichpich Месяц назад +6

    On the topic of "tech project are a snapshot of the time it's made"
    the project i'm working on at my company had to upgrade framework as it's not supported anymore and it's still half zendframework 1, half zf 2. It truly is a snapshot even if a bit of longtime exposure is used

  • @ikirachen
    @ikirachen Месяц назад +28

    call TOM we need genius

    • @chithiradiasseneviratne3562
      @chithiradiasseneviratne3562 Месяц назад

      J-Diesel truly is the hero we need to fix this

    • @justsomeonepassingby3838
      @justsomeonepassingby3838 Месяц назад

      The kind of genius that will blame interns for not using ES5 everywhere to make the codebase compatible with everything it was already compatible with, right ?

  • @cubiss1273
    @cubiss1273 Месяц назад +16

    Now I want a video where Prime doesn't say "No" to any of the rabbit holes. It can be 10 hours long.

  • @AlJey007
    @AlJey007 Месяц назад +1

    respek for mentioning Closure Compiler - a massively awesome and criminally underappreciated tool

  • @tschichpich
    @tschichpich Месяц назад +24

    You look to me like dr disrespects evil twin brother, Dr Respect

    • @jakezepeda1267
      @jakezepeda1267 Месяц назад +2

      Or would it he High-School Drop-out Disrespect?

    • @vidal9747
      @vidal9747 Месяц назад +1

      I wouldn't want to be compared to him before seeing the messages...

    • @DatMilu2K
      @DatMilu2K Месяц назад

      Man... Now I cant unsee it

    • @gnerkus
      @gnerkus Месяц назад +1

      Dr DatRespect

    • @notapplicable7292
      @notapplicable7292 Месяц назад +6

      Evil dr disrespect be like: I'm not going to be a pedo

  • @scott7699
    @scott7699 Месяц назад +6

    I was required to use babel at a mega corpo, and it caused a bunch of our deployments to end up super bloated for languages that didn't even need to use it in the first place...

  • @ivanjermakov
    @ivanjermakov Месяц назад +4

    5:30 look, undefined behavior in JS!

  •  Месяц назад +4

    5:17 Comparing `new Date(NaN)` seems like checking if the browser supports a specific feature

    • @EvilTim1911
      @EvilTim1911 Месяц назад +2

      It will give a different output based on the JS engine being used. It's a hack to detect the engine version

  • @Ganerrr
    @Ganerrr Месяц назад

    im so happy i started just writing my own framework years ago, its 7kb unoptimized and uncompressed and just werks for all my purposes

  • @JoshDix531
    @JoshDix531 Месяц назад

    That code is something else hahahaha what fun. TY for sharing.

  • @rns10
    @rns10 Месяц назад +3

    So here is the future -
    1. Someone probably Evan You, comes up with removing bloated dependencies that are not needed for transpiled code.
    2. It is a success, but then people have opinions and 10 other debloat-transpiler-code.
    3. 1-10+ new dependencies for this new package added to your code base.
    4. Someone now comes and makes same thing in Rust claiming 80% improvement on speed to debloat-transpiled code.
    Repeat same cycle to detect ES6+ code in ES5 code.
    And as Murphy's law says if it can happen it will happen.

  • @vincent_sz
    @vincent_sz Месяц назад +4

    "When to write an DSL?" If the DSL solves a Problem AND it is your core business. Good Examples: Dockerfile uses a DSL. The DSL is a tight reflection of how Docker builds the file and the dsl removes a ton of noise in comparison to YAML. More complex requirements can be solved trough RUN Commands and args etc. In comparison saltstack and ansible are using YAML with jinja. Any DSL would be so massiv complex that it wouldnt add any value. In contrast Config languages for e.g. webservers most of the time are not adding great value (see apache,nginx vs. traefik)

  • @meatcow417
    @meatcow417 Месяц назад

    Yooo, Happy Birthday big guy!

  • @microcolonel
    @microcolonel Месяц назад +3

    Why is anyone transpiling ES6 right now? It's literally a decade old... A browser from ten years ago doesn't even support TLS1.3 lol

  • @alexandrecolautoneto7374
    @alexandrecolautoneto7374 Месяц назад +3

    33:23 comrade prime.

  • @kyay10
    @kyay10 Месяц назад +2

    That's why eDSLs are goated. Your base language solves the error-handling and +1 problem and all that.

    • @Archimedes.5000
      @Archimedes.5000 Месяц назад

      How is this any different?
      This works only for features native to the host language, new ones still need to be implemented separately, otherwise you wouldn't need a DSL in the first place

    • @kyay10
      @kyay10 Месяц назад +1

      @@Archimedes.5000 It at least surpasses the "+1" problem, and needing to add any form of control flow or anything.
      Imagine if their eDSL looked like (kotlin syntax):
      ```
      targets {
      Chrome greaterThan 0
      Firefox atLeast 0 and last(2.5.years)
      }
      ```
      Then you can easily do arithmetic for their values, and you could even define reusable conditions etc

    • @kyay10
      @kyay10 Месяц назад

      @@Archimedes.5000 In fact, here's a runnable example (just search up Kotlin Playground because I can't post links):
      ```
      import kotlin.time.Duration
      import kotlin.time.Duration.Companion.days
      fun main() {
      val targets = listOf(
      Chrome atLeast "0",
      Firefox greaterThan "0" last 2.5.years
      )
      println(targets)
      }
      sealed interface Query
      data object Chrome: Query
      data object Firefox: Query
      data class VersionSpec(val query: Query, val comparedTo: String, val comparisonType: ComparisonType): Query
      enum class ComparisonType {
      Equals,
      NotEquals,
      LessThan,
      GreaterThan,
      LessThanOrEquals,
      GreaterThanOrEquals
      }
      data class LastSpec(val query: Query, val duration: Duration): Query
      infix fun Query.atLeast(version: String): Query = VersionSpec(this, version, ComparisonType.GreaterThanOrEquals)
      infix fun Query.greaterThan(version: String): Query = VersionSpec(this, version, ComparisonType.GreaterThan)
      infix fun Query.last(duration: Duration): Query = LastSpec(this, duration)
      val Double.years get() = (this * 365).days
      ```

  • @Omikronik
    @Omikronik Месяц назад +2

    That webpack comment hit hard… i have no idea how that shit works on the thing im working on now…

    • @Jabberwockybird
      @Jabberwockybird Месяц назад +2

      Someone setup webpack once a long time ago, and now all devs are copying the same webpack config to every new project.

  • @an_imminence
    @an_imminence Месяц назад +1

    35:47 The whole video I was thinking: Nix fixes this. I'm so glad we got there in the end. Dependencies without some kind of Nix approach is hell, why would you do that. I hope there is The Nix of Node, but I fear the answer. That should be the next thing being worked on, it seems very straightforward.

    • @sbmb9613
      @sbmb9613 Месяц назад

      there is lock files, at least 3 variations being package-lock.json, yarn.lock, .pnpm-lock.yaml which take the hash of the packages similar to how nix has flake.lock. then there is package.json + .npmrc similar to flake.nix inputs declaration. Then there is the .npm_cache folder similar to the nix_store, but its not read only, just hopes you don't modify the cache. But also its not symlinked, its copied. Its a mess, But so was nix till flakes came along and set a better standard.

  • @brionlund2467
    @brionlund2467 Месяц назад

    Happy birthday code daddy

  • @ProfessorThock
    @ProfessorThock Месяц назад

    Aye happy birthday! Didn’t know our bdays were so close

  • @robertjif6337
    @robertjif6337 Месяц назад

    shipping polyfills for my polyfills never got more exciting

  • @FunctionGermany
    @FunctionGermany Месяц назад +3

    hey prime or editor, i feel like prime's mic is often clipping in these videos recently. maybe his mic gain is too high? love your videos regardless ✌️

  • @unowenwasholo
    @unowenwasholo Месяц назад +3

    16:30 I think we can say the higher the abstraction, the more volatile it is. Likewise, the more that's built on top of something, the more resistant it is to change. Everything uses binary under the hood of the hood of the hood. Most things use C under the hood of the hood. ES5 is buried under enough abstractions that moving away from it creates enough resistance and doesn't have enough need for some to bother. In some ways, it's a "don't fix what ain't broken", in other ways it's that to change the foundation means to change the everything that's on top.

  • @nocturne6320
    @nocturne6320 Месяц назад +1

    Webdevs will tell you this is good, because at least they don't have to deal with types

  • @MarcelRobitaille
    @MarcelRobitaille Месяц назад

    I find it crazy that npm ships minified code. I think it would be really cool to transpile the code once on install with your browserlist settings. This would also make the code in node_modules readable and match what's on git, which is good for people like me who like to go digging around in there.

  • @basementmaker2110
    @basementmaker2110 Месяц назад

    So true and so sad, Going to work and using webpack 4 ... After using Vite SWC ... At personal projects.

  • @MissedWarrior
    @MissedWarrior Месяц назад

    Would be even cooler if article told why the heck do you need generators(or any other included stuff) for this. But still an interesting topic.

  • @MartenK141095
    @MartenK141095 Месяц назад +4

    Happy Birthday!

  • @ankhzet
    @ankhzet Месяц назад

    Never managed to write that "target browser version" string on the first try.

  • @douglasg14b
    @douglasg14b Месяц назад +1

    "people don't want to sue multiple languages". Is a bit ironic given that the biggest learning cost you'll face is in learning the frameworks & libraries themselves. Which have little to no consistency or staying power in JS.

  • @carlosmspk
    @carlosmspk Месяц назад +1

    14:50 You can redefine functions, you can't redeclare variables (and, therefore, arrow functions)

  • @DASPRiD
    @DASPRiD Месяц назад

    I don't see any problem in transpiling `node_modules` libraries. I mean, Rust is doing the same thing, even during debug builds. The difference is that Rust is caching the compilation of every individual crate.

  • @aztracker1
    @aztracker1 Месяц назад

    I stopped using polyfills for web projects about 4 years ago. Saved a lot of space in general and there hasn't been that much added to justify the overhead.

  • @syntaxerorr
    @syntaxerorr Месяц назад

    browserlist targets evergreen browsers.

  • @Lord_zeel
    @Lord_zeel Месяц назад +1

    22:32 What in the heck is this spammer even trying to say? We invented dishwashers decades ago, you don't need AI for that you just need surfactants, hot water, and time.

  • @Ostap1974
    @Ostap1974 Месяц назад

    Using any polyfill library for fictional oneliner is not the best strategy. But if you develop smth larger, polyfill footprint becomes neglible fast. Few years ago I compared ES5 and ES6 rollup minified builds of a reasonably large web app and the difference in size was about 2%

  • @AllanSavolainen
    @AllanSavolainen Месяц назад +4

    You should still make sites that work without Javascript, less pain, faster loading, can be archived for the future.

  • @rikschaaf
    @rikschaaf Месяц назад

    11:00 Technically etcd is a kind of database (just not a sql relational database), so (almost) anyone using k8s is using a database for config.

  • @avasam06
    @avasam06 Месяц назад

    Last time I looked at Angular, it did just that: split bundles

  • @thekwoka4707
    @thekwoka4707 Месяц назад +1

    The real issue was using Babel. Aint nobody using babel

  • @TatharNuar
    @TatharNuar Месяц назад

    eternally thankful that I'm not in webdev

  • @andrewxv8088
    @andrewxv8088 Месяц назад

    wait till they find out about a hello world in next

  • @hugeant97
    @hugeant97 Месяц назад

    To me it feels far more likely that the sites were built during a time when ES5 support was required. Then moved to not supporting it, but the rxisting code wasnt cleaned up.

  • @leppie
    @leppie Месяц назад

    arrow functions does not introduce a new dynamic scope (iow `this` has different meaning)

  • @kennytheamazing
    @kennytheamazing Месяц назад

    I just went through the package,json and vite config file of the webapp my company builds, and I'm happy to say we don't support legacy browsers. Phew.

  • @jeffwhite3867
    @jeffwhite3867 Месяц назад

    What you think is the Canadian way of saying idempotent is actually just the correct way, for everyone.

  • @donkeyy8331
    @donkeyy8331 25 дней назад

    I noticed something with these types of videos. It starts interesting and gradually spirals into a spaghetti of web dialact that makes me bored out of my life.

  • @SebastianMares
    @SebastianMares Месяц назад

    Everytime you pronounce Vite the way you do (like bite) and not in French like it's supposed to be, a baby kitten dies asphyxiated by a croissant.

  • @Lord_zeel
    @Lord_zeel Месяц назад

    42:07 Well, that answers the question about pr0n... lol. Row 3414 is right there on screen. Interesting that that one isn't a hyperlink for *some* reason 🤣

  • @the-answer-is-42
    @the-answer-is-42 Месяц назад

    I think the solution is to port that Python module that makes sure your code works by deleting lines that thow exceptions until the program no longer throws exception to JavaScript. Just imagine, every time your code has an error, if it's too modern JavaScript or anything else, it will automatically correct itself by removing the offending code. Perfect solution. Nothing could possibly go wrong.
    I shall not name it as to not risk getting banned from this mortal realm, but I can say this: The module name starts with a word that is simultaneously a swear word and one of the favorite pastime for us humans, and it ends with the word "it".

  • @hanro50
    @hanro50 Месяц назад

    Even when ie 11 was supported by Microsoft, I dropped support for it. Since I was a junior developer, was still using base javascript and had written a fair amount of code ei 11 was fundamentally incompatible with.

  • @einargs
    @einargs Месяц назад

    I'm noticing that the 44kb example makes no mention of how tree shaking affects the bundle size. Why would Babel do the tree shaking when that's an existing part of pretty much every build process?

  • @FlorianWendelborn
    @FlorianWendelborn Месяц назад

    34:19 ✨ pʰɑɹ'sɛl ✨

  • @blenderpanzi
    @blenderpanzi Месяц назад

    Arrow functions close over this, other functions don't. That's IMO the most important difference.

  • @AlecThilenius
    @AlecThilenius Месяц назад +2

    If they ever get around to actually shipping WASI those WASM problems will be solved. Direct DOM API bindings, browser-provided GC and heap, et. al.

    • @theairaccumulator7144
      @theairaccumulator7144 Месяц назад

      Bruh if we can't stop transpiling to ES5 because people don't want to stop supporting IE9 or whatever we'll never adopt WASM.

  • @sub-harmonik
    @sub-harmonik Месяц назад

    I think library authors should use reasonably up-to-date js and leave it to people using it to transpile. They have to pick library versions and targets anyways.

    • @michaelschmid2311
      @michaelschmid2311 Месяц назад

      Tell me you havent ever maintained a Library without actually telling me.
      This requests IS Just straight Up unreasonable. Many libraries are developed in devs freetime. You would always be out of date somewhere.
      Just a week of having installed dependabot anywhere Just made me stop bothering

  • @adnan7698
    @adnan7698 Месяц назад +2

    Why does he say Babel like that

  • @HeberLopez
    @HeberLopez Месяц назад

    There is people who’ve had to maintain DSLs on a real project and people who have not, I don’t think anyone that has had to maintain a DSL on a real project with a moderate level of complexity would ever recommend it to anyone period :P

  • @marcusrehn6915
    @marcusrehn6915 29 дней назад

    If only we could trust the user agent string, then we could only serve this nonsense to the users who insist on using old or bad browsers.

  • @Bolpat
    @Bolpat Месяц назад

    I will never understand why companies of a sector where you can fairly easily switch jobs don’t offer better pay over time. I love my job and colleagues, the only reason I want to go is because of low pay increases. I even know why they can’t pay me better, but that’s irrelevant for the financial plans I made signing up. Two years ago, I was completely new. They compensated me ~5% more each year, which amounts to at best inflation. Why would you pay an fresh-from-university employee the same or more than a trusted employee? Makes no sense. I get why your salary wouldn’t have a big net increase going from year 11 to year 12.

  • @michaelutech4786
    @michaelutech4786 27 дней назад

    "just give 'em a raise" - This is what an entrepreneur would do. But salary determination is rarely done by entrepreneurs. For a manager, success is not defined by how well the company does, but by any metric that can be traced to their decisions. So if a manager fires an employee, that can only be a bad decision, if the absence of that employee can be directly traced to some damage. The savings in salary can always be traced to the decision to fire them. An increase in salary is always an increase in cost and thus at least questionable. If an employee quits, you don't necessarily know why. So it's common sense or guesswork competing with integer numbers. What is more convincing?

  • @JorisGriffioen
    @JorisGriffioen Месяц назад

    The longer we go on, the more I feel transpiling was just a mistake to begin with.

  • @wb3904
    @wb3904 Месяц назад +1

    I'm at the point where the more shit a programming language is the more it gets adopted... the end is nigh

    • @SaHaRaSquad
      @SaHaRaSquad Месяц назад +3

      Let's not tell web developers about esolangs then.

  • @kyay10
    @kyay10 Месяц назад

    Isn't tree-shaking (dead code elimination) a thing though? Or is that hard to do with transpiling because polyfills end up in obscure places?

    • @thekwoka4707
      @thekwoka4707 Месяц назад +1

      You can't really eliminate dead code like that, since it's...not dead. It's Injected to run

    • @kyay10
      @kyay10 Месяц назад +1

      @@thekwoka4707 yeah that's what I'm realising now. I'm not super familiar with JS, I come from a JVM background where DCE is standard and not worried about at all.

  • @maccsguitar
    @maccsguitar Месяц назад

    function has different 'this'-semantics to arrow functions

  • @BrazilMentionedHueHue
    @BrazilMentionedHueHue Месяц назад

    Damn, Swoleagen

  • @gund_ua
    @gund_ua Месяц назад +1

    This just goes to show that Angular is miles ahead of every major lib out there as they started shipping ES6+ bundles long ago and even created Angular Package Format which streamlined library authoring and pretty much every angular library is also shipping ES6 bundles just like Angular core. React and it's ecosystem simply don't stand a chance in comparison.

  • @KevinLyda
    @KevinLyda Месяц назад

    Oh look, it's like autoconf shell code but in javascript.

  • @ritiksharma9539
    @ritiksharma9539 Месяц назад

    Although I do not have OCD still his text highlighting triggers some kind of itch in my brain.

  • @TheNoirKamui
    @TheNoirKamui Месяц назад

    Holding stocks in 2024 sounds like not a good idea tho...

  • @paulkiat
    @paulkiat Месяц назад

    What does only 1 fedora per group REALLY MEAN?!

  • @benlavi6235
    @benlavi6235 Месяц назад

    Why not look at the user agent to decide which JS code to ship?

  • @jonamr
    @jonamr Месяц назад

    67.54 lol they did use the ceiling

  • @StrengthOfADragon13
    @StrengthOfADragon13 Месяц назад

    Your turnover rate of under 2 years is criminal for as little as a 10% increase in pay. Something is clearly messed up in industry that this is accepted

  • @nightking4615
    @nightking4615 Месяц назад

    Whoever wrote this has not experience web web development! No body in web dev says "website developer"

  • @orlandovftw
    @orlandovftw Месяц назад

    Greatest day for all of web development was when I could stop supporting IE6.

  • @NickHempsey
    @NickHempsey Месяц назад

    Tbf… 89 is just 68 rotated 180 degrees.

  • @SimonBuchanNz
    @SimonBuchanNz Месяц назад

    As i recall, that dsl grew out of parsing a simple line based .browserlist file that was just browser name followed by a version.
    I think it's pretty crap and json would have been better even from then, but i get it.
    I actually think DSLs with variables and functions etc are super fun to write... but I've never really managed to figure out editor support for any of my toys.
    A proper DSL is certainly better than inflicting magic JSON or YAML configs on people, but *most* of the time, youre going to want to just use an existing scripting lang like Javascript, but occasionally that results in way to much syntax overhead or weird peformance issues because you don't have access to be able to cache things or the like across threads or runs.

  • @ElvenSpellmaker
    @ElvenSpellmaker Месяц назад

    Terraform > Pulumi.
    Sometimes a DSL can be useful.

  • @skullerhood
    @skullerhood Месяц назад +6

    the name is

  • @cheebadigga4092
    @cheebadigga4092 Месяц назад

    ahhh JavaScript... never change

  • @MySisterIsASlytherin
    @MySisterIsASlytherin Месяц назад

    the JS ecosystem is a horror show

  • @japonskibrulionik7729
    @japonskibrulionik7729 Месяц назад

    My client uses Chromium 64 and says it is not possible to upgrade for at least 5 more years. ;-)

  • @nathanpotter1334
    @nathanpotter1334 Месяц назад

    C++ / EMCC / WASM Enjoyer 👋

  • @aqua-bery
    @aqua-bery Месяц назад

    What is es*?