Let's build a printf! Episode n° 1 : Format parser

Поділитися
Вставка
  • Опубліковано 30 жов 2024

КОМЕНТАРІ • 11

  • @otetumooluwaseun3948
    @otetumooluwaseun3948 9 місяців тому +8

    Explaining how printf works with those flags and precisions in the introductory part is a great step to writing a custom printf.
    Thank you for doing this.
    Hope to see your work on Shell.

    • @onaecO
      @onaecO  9 місяців тому +1

      Ty! for the shell I think I'll do, even though it's a totally different beast to tame 😂

  • @stefanodipuma6552
    @stefanodipuma6552 9 місяців тому +1

    dude fenomenal as always. Its fantastic that I started doing printf and 2 hours later you posted the first printf video...

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

    video is lit. excellent work. just wow. greetings from Nairobi, Kenya.

    • @onaecO
      @onaecO  9 місяців тому

      Ty bro always kind words from u ❤️🫡

  • @ThePolbruc
    @ThePolbruc 9 місяців тому

    this format of live coding helps a lot thank you

  • @dayoluk
    @dayoluk 2 дні тому

    "The `%` symbol was chosen historically and is somewhat arbitrary, but here’s why it likely became the standard:
    1. **Symbol Clarity**: `%` wasn't already widely used for other purposes in strings or C syntax, making it a suitable candidate to indicate "format specifier" without conflicting with common programming symbols like `#`, `&`, or `$`.
    2. **Semantic Fit**: `%` is often associated with "percent" or "portion," which can suggest that something will be inserted or substituted in place of it, as in placeholders. Other symbols (like `#` or `&`) don’t carry this implication as intuitively.
    3. **Historical Conventions**: Early programming languages (like Fortran and BASIC) influenced C's design, and `%` was sometimes already associated with formatting or placeholders in these languages. Since C was designed in the early '70s when conventions were forming, the `%` symbol stuck, setting a standard that carried forward into other languages influenced by C.
    In short, `%` won out partly by convention, partly by availability, and partly because it hinted at substitution or placement in a way other symbols didn’t quite match!"
    thx chatGPT!

  • @its_code
    @its_code 9 місяців тому +1

    ❤❤❤❤😊wowow

    • @onaecO
      @onaecO  9 місяців тому

      🫡❤️

  • @konstantinrebrov675
    @konstantinrebrov675 9 місяців тому

    Are you Italian?

    • @onaecO
      @onaecO  9 місяців тому

      yep! 🇮🇹