Why base64 should be changed.

Поделиться
HTML-код
  • Опубликовано: 20 янв 2025
  • www.brandonhil...
    github.com/Bra...

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

  • @rz2374
    @rz2374 18 дней назад +30

    > complains about multiple versions of base 64
    > solves this by creating a new version of base 64

    • @__Brandon__
      @__Brandon__ 18 дней назад +6

      The problem isn't that there multiple standards. The problem is that the standard is bad and there's multiple standards. If it was just a single standard and it was bad then you should keep it. If there's multiple standards and it's bad then you replace it.
      But since HTML defined one encoding and HTML and web adjacent formats are here forever and there's only one encoding, it's pretty clear we are stuck with that one

    • @BrandonHilde129
      @BrandonHilde129  18 дней назад

      @@__Brandon__ ya unfortunately we are pretty stuck

  • @vytah
    @vytah 15 дней назад +4

    base64 isn't a numeric base, it's a representation for binary data. It should not be handled by the same code that formats numbers.

  • @ranpergames
    @ranpergames 19 дней назад +6

    I learned something new and I sign the petition too.

  • @idkwhatIshouldsayhere
    @idkwhatIshouldsayhere 20 дней назад +8

    I sign that petition that's dumb

  • @denoww9261
    @denoww9261 15 дней назад

    Interesting, I didn't know that and it's weird that it's like this. I wonder if there's a justification in some spec/proposal documentation. That said, changing it now would probably cause more problems than it would solve imo.

    • @BrandonHilde129
      @BrandonHilde129  15 дней назад

      correct its not going to change. There may be a justification but I don't know what it is.

  • @noface1200-pho
    @noface1200-pho 17 дней назад +1

    based 64

  • @AK-vx4dy
    @AK-vx4dy 18 дней назад +1

    I think it was done to ease detection of format and not confuse with hex ;)

    • @BrandonHilde129
      @BrandonHilde129  18 дней назад

      probably. I just feel like thats trying to solve a problem that doesn't exist. Like idk of any circumstance where you wouldnt have known formats

    • @aouerfelli
      @aouerfelli 2 дня назад

      It is like saying we swap the values of 0 and 1 so we don't confuse binary with decimal.
      Changing the value of digits does not solve anything, it only creates problems.
      Now the digit 0 does not mean 0.

    • @AK-vx4dy
      @AK-vx4dy 2 дня назад

      @@aouerfelli You know the joke "There are 10 kinds of people"...?

  • @rothbardfreedom
    @rothbardfreedom 18 дней назад

    If it ain't broken, don't fix it

  • @PimPumSObaka
    @PimPumSObaka 18 дней назад

    Where is petition?

    • @BrandonHilde129
      @BrandonHilde129  18 дней назад +1

      I mean I could make a change.org petition but its very unlikely to change anything

  • @BrandonHilde129
    @BrandonHilde129  20 дней назад

    "if we put 2 in here" then types 'w' for some reason 🤷‍♂

  • @anon_y_mousse
    @anon_y_mousse 9 дней назад

    I agree that it should be changed, but disagree with what you want to change it to. I think it should be [0-9a-zA-Z\-+], if you'll excuse the lazy regex-ish representation. For one, lowercase letters should come first, irrespective of ASCII/Unicode encodings and dash and plus symbols make sense given their safety in use for URL's, and in that order. As far as automatic conversion between numerical bases, I'm not so sure it makes sense beyond base 36 because of our reliance on ignoring case and our inability to agree on which digits should come next. If we could stop ignoring case, and agree on which case comes first, then up to at least base 62 would be easy.

    • @AK-vx4dy
      @AK-vx4dy 2 дня назад

      @@anon_y_mousse \ seriously? Or you just trolling?

    • @anon_y_mousse
      @anon_y_mousse 2 дня назад

      @@AK-vx4dy I'm assuming that you don't know regex or the syntax for ranges or that if you're going to talk about a single character that you should quote it in some way.

    • @AK-vx4dy
      @AK-vx4dy День назад

      @@anon_y_mousse I'm assuming you know where base64 is mostly used and it goes by so many diffrent aplications and operating systems when risk of not escaping or not quoting properly is high.
      bas64 "alphabet" was constructed that way to maximize "transferability" and to be universal (variant with - and _ is better IMHO)
      I know but i don't see use of regexe's anwhere near base64 suitable.

    • @AK-vx4dy
      @AK-vx4dy День назад

      base of 64 was choosen to allow operations using bit shifts because when it was invented multiplications and divisions were very costly (or not existent in hardware), also this format is used to encode messages not single numbers so encoding/decoding kiloBytes or megaBytes using mul/div is at least controversial.
      If you need/want use universal procedure to change bases, you just need to make table with mapping from base64 alphabet direct to numbers.

    • @anon_y_mousse
      @anon_y_mousse День назад

      @ And again you missed the point. You wouldn't use regexes to actually define it, it was only a shorthand to quickly list the alphabet. Unless you're so dumb that you need someone to spell out 0123456789 and so on.