Open-source News

How the C programming language has grown

opensource.com - Fri, 04/15/2022 - 15:00
How the C programming language has grown Jim Hall Fri, 04/15/2022 - 03:00

The C programming language will turn fifty years old in 2022. Yet despite its long history, C remains one of the top "most-used" programming languages in many "popular programming languages" surveys. For example, check out the TIOBE Index, which tracks the popularity of different programming languages. Many Linux applications are written in C, such as the GNOME desktop.

I interviewed Brian Kernighan, co-author (with Dennis Ritchie) of The C Programming Language book, to learn more about the C programming language and its history.

Where did the C programming language come from?

C is an evolution of a sequence of languages intended for system programming—that is, writing programs like compilers, assemblers, editors, and ultimately operating systems. The Multics project at MIT, with Bell Labs as a partner, planned to write everything in a high-level language (a new idea at the time, roughly 1965). They were going to use IBM's PL/1, but it was very complicated, and the promised compilers didn't arrive in time.

After a brief flirtation with a subset called EPL (by Doug McIlroy of Bell Labs), Multics turned to BCPL, a much simpler and cleaner language designed and implemented by Martin Richards of Cambridge, who I think was visiting MIT at the time. When Ken Thompson started working on what became Unix, he created an even simpler language, based on BCPL, that he called B. He implemented it for the PDP-7 used for the first proto-Unix system in 1969.

BCPL and B were both "typeless" languages; that is, they had only one data type, integer. The DEC PDP-11, which arrived on the scene in about 1971 and was the computer for the first real Unix implementation, supported several data types, notably 8-bit bytes as well as 16-bit integers. For that, a language that also supported several data types was a better fit. That's the origin of C.

Programming and development Red Hat Developers Blog Programming cheat sheets Try for free: Red Hat Learning Subscription eBook: An introduction to programming with Bash Bash shell scripting cheat sheet eBook: Modernizing Enterprise Java

How was C used within Bell Labs and the early versions of Unix?

C was originally used only on Unix, though after a while, there were also C compilers for other machines and operating systems. Mostly it was used for system-programming applications, which covered quite a spectrum of interesting areas, along with a lot of systems for managing operations of AT&T's telephone network.

What was the most interesting project written in C at Bell Labs?

Arguably, the most interesting, memorable, and important C program was the Unix operating system itself. The first version of Unix in 1971 was in PDP-11 assembly language, but by the time of the fourth edition, around 1973, it was rewritten in C. That was truly crucial since it meant that the operating system (and all its supporting software) could be ported to a different kind of computer basically by recompiling everything. Not quite that simple in practice, but not far off.

You co-authored The C Programming Language book with Dennis Ritchie. How did that book come about, and how did you and Dennis collaborate on the book?

I had written a tutorial on Ken Thompson's B language to help people get started with it. I upgraded that to a tutorial on C when it became available. And after a while, I twisted Dennis's arm to write a C book with me. Basically, I wrote most of the tutorial material, except for the system call chapter, and Dennis had already written the reference manual, which was excellent. Then we worked back and forth to smooth out the tutorial parts; the reference manual stayed pretty much the same since it was so well done from the beginning. The book was formatted with the troff formatter, one of many tools on Unix, and I did most of the formatting work.

When did C become a thing that other programmers outside of Bell Labs used for their work?

I don't really remember well at this point, but I think C mostly followed along with Unix for the first half dozen years or so. With the development of compilers for other operating systems, it began to spread to other systems besides Unix. I don't recall when we realized that C and Unix were having a real effect, but it must have been in the mid to late 1970s.

Why did C become such an influential programming language?

The primary reason in the early days was its association with Unix, which spread rapidly. If you used Unix, you wrote in C. Later on, C spread to computers that might not necessarily run Unix, though many did because of the portable C compiler that Steve Johnson wrote. The workstation market, with companies like Sun Microsystems, MIPS (which became SGI), and others, was enabled by the combination of Unix and C. The IBM PC came somewhat later, about 1982, and C became one of the standard languages, under MS-DOS and then Windows. And today, most Internet of Things (IoT) devices will use C.

C remains a popular programming language today, some 50 years after its creation. Why has C remained so popular?

I think C hit a sweet spot with efficiency and expressiveness. In earlier times, efficiency really mattered since computers were slow and had limited memory compared to what we are used to today. C was very efficient, in the sense that it could be compiled into efficient machine code, and it was simple enough that it was easy to see how to compile it. At the same time, it was very expressive, easy to write, and compact. No other language has hit that kind of spot quite so well, at least in my humble but correct opinion.

How has the C programming language grown or changed over the years?

C has grown modestly, I guess, but I haven't paid much attention to the evolving C standards. There are enough changes that code written in the 1980s needs a bit of work before it will compile, but it's mostly related to being honest about types. Newer features like complex numbers are perhaps useful, but not to me, so I can't make an informed comment.

What programming problems can be solved most easily in C?

Well, it's a good language for anything, but today, with lots of memory and processing power, most programmers are well served by languages like Python that take care of memory management and other more high-level constructs. C remains a good choice for lower levels where squeezing cycles and bytes still matter.

C has influenced other programming languages, including C++, Java, Go, and Rust. What are your thoughts on these other programming languages?

Almost every language is in some ways a reaction to its predecessors. To over-simplify a fair amount, C++ adds mechanisms to control access to information, so it's better than C for really large programs. Java is a reaction to the perceived complexity of C++. Go is a reaction to the complexity of C++ and the restrictions of Java. Rust is an attempt to deal with memory management issues in C (and presumably C++) while coming close to C's efficiency.

They all have real positive attributes, but somehow no one is ever quite satisfied, so there will always be more languages that, in their turn, react to what has gone before. At the same time, the older languages, for the most part, will remain around because they do their job well, and there's an embedded base where they are perfectly fine, and it would be infeasible to reimplement in something newer.

Thanks to Brian for sharing this great history of the C programming language!

Would you like to learn C programming? Start with these popular C programming articles from the last year: 5 ways to learn the C programming language in 2022.

Here's my interview with Brian Kernighan, co-author (with Dennis Ritchie) of The C Programming Language book, to discuss the C programming language and its 50-year history.

Programming What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Mesa 22.1-rc1 Brings Radeon Vulkan Enhancements, Imagination Driver & Microsoft Dozen

Phoronix - Fri, 04/15/2022 - 02:20
Following yesterday's Mesa 22.1 code branching / feature freeze, Mesa 22.1-rc1 was released this afternoon as the first step towards releasing Mesa 22.1 next month. Mesa 22.1 is bringing improvements for old NVIDIA graphics on open-source, many Radeon "RADV" Vulkan enhancements, a lot of work as always on the Intel side, the new Imagination Rogue PowerVR driver, and much more...

Intel Raptor Lake P Linux Graphics Driver Support Being Prepared

Phoronix - Fri, 04/15/2022 - 01:40
With the Linux 5.19 kernel there is going to be the initial graphics driver support for Raptor Lake S with the initial batch of PCI IDs being added. Published today in patch form and still potentially making it to mainline in v5.19 is Raptor Lake P support...

Open Source Networks in Action: How leading telcos are harnessing the power of LF Networking

The Linux Foundation - Fri, 04/15/2022 - 00:55

This post originally appeared in LF Networking’s blog

Now in its fifth year as an umbrella organization, LF Networking (LFN) and its projects enable organizations across the globe to more quickly and effectively achieve digital transformation via the community’s shared development efforts. This includes companies of all sizes and types that rely on LFN’s breadth of commercially-ready ecosystem offerings, all based on open source innovation spearheaded within the LF Networking community.

As mature LFN projects, ONAP (Open Network Automation Platform) and OpenDaylight are currently deployed as critical components in networks around the globe. Below is a sampling of specific case studies currently implemented in the real-world that are allowing organizations to transform their networks. 

  • Spark automates disaggregated network in just 6 months using ONAP. As Spark New Zealand Limited (Spark) approached 5G deployment, they started analyzing the status of automation across network and infrastructure and realized they needed an automation suite that would support future use cases that 5G could enable, such as network slicing, and closed loop automation.  In partnership with Infosys, Spark took a relatively short six months to go from kickoff to implementation of ONAP. More details are available here.
  • Verizon leverages OpenDaylight as its directional SDN controller. After initial work exploring OpenDaylight (ODL), Verizon decided to pull the testing, packaging, support in-house and create their own optimized ODL distribution. ODL now serves as Verizon’s foundational and directional SDN controller with two use cases in production across the network. Verizon brings a strong developer team to the project with several employees directly participating in ODL on eleven projects. Currently, Verizon is using Yang model driven platform solutions and wants to integrate different types of data modeling technology, Open APIs, rest platforms, and more. More details are available here.
  • Deutsche Telekom deploys ONAP in O-RAN Town. In its O-RAN Town project, DT deployed in the city of Neubrandenburg a multi-vendor Open RAN trial network for 4G and 5G services with massive MIMO integrated into the live network — the first in Europe. To automate services on all network domains, DT introduced a vendor-independent Service Management and Orchestration (SMO) component based on ONAP open source. The SMO is to be at the heart of complete lifecycle management of all O-RAN components in this deployment. More details are available here.
  •  Orange deploys automation framework powered by ONAP. Realizing a long-pursued goal of using ONAP, Orange has deployed and trialed an automation framework powered by ONAP. The current use case, in production in Orange Egypt, includes automating network services, network connectivity and resource management inside IP/MPLS, and configuration changes such as provisioning virtual private networks. Through this initiative, Orange has demonstrated that ONAP has reached the maturity and modularity for network operators to take combinations of ONAP projects and components from proof of concept to production. More details are available here.
  • Bell automates a significant amount of manual configuration, recovery, and provision work by using ONAP in production across multiple use cases. Since 2017, the use of ONAP at Bell Canada has expanded to automating numerous key network services across all business units. Moving forward, ONAP is playing a major role in 5G and multi-access edge computing (MEC) rollouts. The key metric Bell uses to measure the success of ONAP is the number of recurring manual task hours saved per month. Each project that adopts ONAP for a specific service tracks this metric. In 2019 alone, Bell saved a significant amount of recurring manual work per month as a result of using ONAP. In 2020, the team will also measure the acceleration of new services on-boarded to the platform. Currently, the on-boarding process can range from a few weeks to six months. Learn more in this detailed case study.

These are just a few examples of what is possible with open networking. Stay tuned to LF Networking channels for more industry proof points across the ecosystem and follow the LFN community journey (visit our website and follow us on Twitter)  to witness the power of open collaboration on the future of networking.

The post Open Source Networks in Action: How leading telcos are harnessing the power of LF Networking appeared first on Linux Foundation.

Software for Open Networking in the Cloud (SONiC) Moves to the Linux Foundation

The Linux Foundation - Fri, 04/15/2022 - 00:00

Leading open source network operating system enabling dis-aggregation for data centers now hosted by the Linux Foundation to enable neutral governance in a software ecosystem

SAN FRANCISCOApril 14, 2021  Today, the Linux Foundation, the nonprofit organization enabling mass innovation through open source, announced the Software for Open Networking in the Cloud (SONiC, an open source networking operating system), is now part of the Linux Foundation. The Linux Foundation provides a venue for continued ecosystem, developer growth and diversity, as well as collaboration across the open source networking stack.  

“We are pleased to welcome SONiC to the Linux Foundation family of open networking projects,” said Arpit Joshipura, general manager, Networking, Edge, and IoT, the Linux Foundation. “SONiC is a  leader in open source data center NOS deployments, and we’re looking forward to growing its developer community.” 

The Linux Foundation will primarily focus on the software component of SONiC, and continue to partner with Open Compute Platform(OCP) on aligning hardware and specifications like SAI. 

“Microsoft founded SONiC to bring high reliability and fast innovation to the routers in Azure cloud data centers. We created it as open source so the entire networking ecosystem would grow stronger.  SONiC already runs on millions of ports in the networks of cloud scalers, enterprises, and fintechs.  The SONiC project is thrilled to be joining the Linux Foundation to take the community to its next jump in scale, participation, and usage,” said  Dave Maltz, Technical Fellow and Corporate Vice President, Microsoft Azure Networking.

About SONiC

Created by Microsoft for its Azure data centers, SONiC is an open source network operating system (NOS)  based on Linux that runs on over 100 different switches from multiple vendors and ASICs. It offers a full-suite of network functionality, like BGP and RDMA, that has been production-hardened in the data centers of some of the largest cloud-service providers. It offers teams the flexibility to create the network solutions they need while leveraging the collective strength of a large ecosystem and community. 

Existing Ecosystem

SONiC brings a strong existing ecosystem, with premier members including Alibaba, Broadcom, Dell, Google, Intel, Microsoft, NVIDIA and 50+ global partners. The SONiC community will host its first hackathon later this year. Stay tuned for details and registration information. More information about SONiC, including how to join, is available at SONiC (azure.github.io).

Support from Key Stakeholders & Customers

Alibaba

“This is a big milestone for the SONiC community. After joining the Linux Foundation, the SONiC community will play a much more important role in the networking ecosystem,” said Dennis Cai, Head of Network Infrastructure, Alibaba Cloud. “Congratulations!  As one of the pioneering SONiC users and contributors, Alibaba Cloud has widely deployed SONiC- based whitebox switches in our data centers, edge computing cloud, P4- based network gateways, and will extend the deployment to Wide Area Networks. With modern network OS design and operation- friendly features, we already gained tremendous value from the large-scale deployments. Alibaba is committed to the SONiC community, and will continue bringing our large-scale deployment best practices to the community, such as open hardware specs , network in-band telemetry, high performance networking, and network resiliency features, SRv6, etc.” 

Broadcom

“Large hyperscalers agree that merchant silicon, hardware independence, and open source protocol and management stack are essential for running their data center networks. Broadcom has wholeheartedly supported this vision with leading-edge, predictable silicon execution and contributions to the SONiC project. We are excited to see the SONiC initiative join the Linux Foundation and look forward to working with the streamlined ecosystem to drive the data center and hyperscale needs of the future,” said Mohammad Hanif, senior director of engineering, Core Switching Group, Broadcom.

Dell Technologies 

“We believe SONiC will continue its accelerated adoption into the modern data center, delivering the scale, flexibility and programmability needed to run enterprise-level networks,” said Dave Lincoln, vice president of product management at Dell Technologies. “As a leading SONiC contributor, we see the advantages it brings to the supporting open source community and customers. As we continue the drive to take open-source-based solutions mainstream, we look forward to working with the Linux Foundation and its supporting communities to drive SONIC’s development and adoption.”

EBay

“eBay operates a large-scale network infrastructure to support its growing global business. eBay cares about the openness and quality of NOS to operate its network infrastructure. eBay is an active participant in the SONiC community and deploys SONiC at scale in its infrastructure. eBay is excited to see this next step of growth of the SONiC community,” said Parantap Lahiri, vice president, Network and Datacenter Engineering at eBay. 

EPFL

“At EPFL, we have been looking for a vendor neutral and flexible NOS that can provide HaaS capabilities for our Private Cloud Environment. SONiC OS provides us the solution we have been looking for in our Data Centre, allowing us to migrate to a powerful and modern Data Centre network. We are looking forward to this next phase in the SONiC community,” said Julien Demierre, Network and System architect at EPFL.

Google

“We believe moving SONiC to the Linux Foundation is very important as it will further enhance collaboration across the open source network, community and ecosystem. Google has more than a decade of experience in SDN; our data centers and WAN are exclusively SDN controlled, and we are excited to have helped bring SDN capabilities to SONiC . We fully support the move to the LF and intend to continue making significant upstream contributions to drive feature velocity and make it easier for operators to realize the benefits of SDN with PINS/SONiC and P4,” said  Dan Lenoski, vice president, Engineering, Network Infrastructure, Google. 

Intel 

“Intel has a strong history of working with SONiC and the Linux Foundation to help to propel innovation in an open, cooperative environment where ideas are shared and iterated.  We continually promote open collaboration, encompassing open-source technologies such as the Infrastructure Programmer Developer Kit and P4 integrated networking stack (PINS), using Intel Xeon Scalable processors, Infrastructure Processing Units and Tofino Intelligent Fabric Processors as base hardware,” said Ed Doe, vice president and general manager, Switch and Fabric Group at Intel. “Joining the Linux Foundation will help SONiC to flourish, and in turn create greater benefit for cloud service providers, network operators and enterprises to create customized network solutions and transform data-intensive workloads from data center to the edge.”

NVIDIA

“This is an important milestone for SONiC and the community behind it,” said Amit Katz, vice president of Ethernet Switches at NVIDIA. “NVIDIA is committed to supporting the community version of SONiC that is 100 percent open source, enabling data center operators to control the code inside their cloud fabrics, accelerated by state-of-the-art platforms with SONiC support, such as NVIDIA’s Spectrum family of switches.” 

Open Compute Project 

“The Open Compute Project Foundation is pleased to continue its collaboration with SONIC as part of the OCP’s new hardware – software co-design strategy. The open source SONiC Network Operating System is enabling rapid innovation across the network ecosystem, and it began with the definition of the Switch Abstraction Interface (SAI) at OCP.   Hardware – software co-design focuses on software that requires intimate knowledge of the hardware to drive maximum hardware performance, and speed time-to-market for hardware where system performance and ecological footprint can be highly dependent on software and hardware interactions,” said George Tchaparian, CEO Open Compute Project Foundation.

About the Linux Foundation

The Linux Foundation is the organization of choice for the world’s top developers and companies to build ecosystems that accelerate open technology development and commercial adoption. Together with the worldwide open source community, it is solving the hardest technology problems by creating the largest shared technology investment in history. Founded in 2000, The Linux Foundation today provides tools, training and events to scale any open source project, which together deliver an economic impact not achievable by any one company. More information can be found at www.linuxfoundation.org.

# # #

The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our trademark usage page: https://www.linuxfoundation.org/trademark-usage. Linux is a registered trademark of Linus Torvalds.

The post Software for Open Networking in the Cloud (SONiC) Moves to the Linux Foundation appeared first on Linux Foundation.

Pages