[240623] Ruby from the perspective of ShellScript _ Tiobe 2406 – C++ is super C; Fortran is getting stronger with age

Table of contents

  • @[TOC](Table of Contents)
    • Ruby from a ShellScript perspective
  • *Introduction
  • Advantages of Ruby for Shell Scripting
  • in conclusion
  • Tiobe 2406 – C++ is super C; Fortran is getting stronger with time

Ruby from a ShellScript perspective

Introduction

  • Ruby is often associated with the Rails framework, causing many people to overlook its power.
  • Ruby is a feature-rich and complete language that is even better than Python for writing shell scripts.

Advantages of Ruby for Shell Scripting

  1. Call external commands: Use backticks (`) to easily call external commands and save the output to a variable.
  2. Status code: $? variable stores the status code of the previous command to facilitate error handling.
  3. Typed language: Although not statically typed, Ruby has a type system that is safer and more reliable than Bash.
  4. Functional structure: Supports functional operations such as map, select, and reduce to facilitate processing of command output.
  5. Regular expression matching: Built-in regular expression types and operations facilitate text processing.
  6. Easy to use threads: Use Thread.new to easily create threads for concurrent operations.
  7. Built-in file and directory operations: The File and Dir classes provide rich file and directory operation methods.

in conclusion

  • When shell scripts get complex, Ruby is an alternative worth considering.
  • Ruby is more powerful than Bash and simpler than Python, making it an excellent choice for writing shell scripts.

source:

https://lucasoshiro.github.io/posts-en/2024-06-17-ruby-shellscript/

Tiobe 2406 – C++ is super C; Fortran is getting stronger with time

**According to the latest TIOBE programming language rankings, the C++ language surpassed the C language for the first time and historically ranked second. ** This milestone event marks that the C++ language has finally surpassed its “predecessors” in popularity 39 years after its birth.

The TIOBE index is an important indicator of programming language popularity and is updated monthly. The index's rankings are based on the number of skilled engineers, relevant courses and third-party providers worldwide.

The C++ language has always been considered an improved object-oriented version of the C language. It is known for its high performance and scalability and is widely used in embedded systems, game development, financial trading software and other fields. However, due to its long history and pursuit of backward compatibility, the C++ language is also complex due to its rich syntax and features.

Paul Jansen, CEO of TIOBE, said: “C++ has been updated three times a year since 2011, which has given it new vitality. Although most compilers and engineers cannot keep up with this update speed, seeing the language continue to evolve, Still a good thing.”

In addition to C++'s breakthrough, other highlights of this month's TIOBE index include the Go language entering the top seven for the first time, and the Rust language reaching an all-time high, ranking 17th.

**The TIOBE index helps developers understand whether programming skills are keeping pace with the times and which programming languages ​​should be used when building new software systems. **

source:

https://www.tiobe.com/tiobe-index/

Please read more: blog-240623


Follow the official WeChat public account: oh my x

Get the latest usage of open source software and x-cmd