The blog post "Hands-On Graphics Without X11" on blogsystem5.substack.com explores the landscape of graphics programming on NetBSD, specifically focusing on alternatives to the X Window System (X11). The author emphasizes a desire to move away from the perceived complexity and overhead of X11, seeking a simpler, more direct approach to graphics manipulation. They detail their experiences experimenting with several different libraries and frameworks that enable this.
The post begins by highlighting the historical dominance of X11 in Unix-like operating systems and its role as the de facto standard for graphical user interfaces. However, the author argues that X11's architecture, including its client-server model and network transparency, adds unnecessary complexity for applications that don't require these features. This complexity, they contend, contributes to a steeper learning curve and increased development time.
The exploration of alternatives begins with libdrm
, the Direct Rendering Manager, a kernel subsystem that provides userspace programs with direct access to graphics hardware. The author explains how libdrm
forms the foundation for many modern graphics systems and how it allows bypassing X11 for improved performance and simplified code.
The post then delves into specific libraries built on top of libdrm
. First among these is libggi
, the General Graphics Interface, an older library designed for cross-platform graphics programming. While acknowledging its age, the author appreciates its simplicity and lightweight nature, demonstrating its use with a basic example. However, the limited current development and documentation of libggi
are noted as potential drawbacks.
Next, the exploration turns to DirectFB, a graphics library targeted at embedded systems. The author describes DirectFB's focus on performance and its suitability for resource-constrained environments. They walk through setting up DirectFB on NetBSD and demonstrate its capabilities with a simple graphical application, showcasing its relative ease of use.
The author also examines the SDL library, Simple DirectMedia Layer, highlighting its popularity for game development and its cross-platform compatibility. They discuss how SDL can be used as a higher-level abstraction over libdrm
and demonstrate its usage for basic graphics rendering on NetBSD. The broader utility of SDL beyond just graphical output, including input handling and audio, is also mentioned.
Finally, the post briefly touches upon Wayland, a more modern display server protocol designed as a potential successor to X11. While acknowledging Wayland's increasing adoption, the author positions it as a less radical departure from X11's architecture than the other explored options, implying it might still retain some of the complexities they wish to avoid.
Throughout the post, the author emphasizes the benefits of working directly with libdrm
and related libraries, highlighting improved performance, reduced resource consumption, and simplified development as key advantages. The overall tone suggests a preference for these leaner approaches to graphics programming, particularly in contexts where X11’s full feature set is not required.
Chris Siebenmann's blog post, "The history and use of /etc/glob in early Unixes," delves into the historical context and functionality of the /etc/glob
file, a mechanism for global command aliases present in Version 6 Unix and its predecessors. Siebenmann begins by highlighting the limited disk space and memory constraints of these early Unix systems, which necessitated creative solutions for managing common commands and reducing redundancy. /etc/glob
addressed this by providing a centralized repository for text substitutions that would be applied system-wide.
The post meticulously explains the operation of /etc/glob
. Essentially, /etc/glob
contained a list of pairs of strings. Whenever a command was entered, the shell would consult this file. If the first string of any pair matched the beginning of the command, the matching portion of the command would be replaced with the second string of that pair. This allowed for abbreviation of frequently used commands, parameterization of commands with common arguments, and even the creation of entirely new commands built upon existing ones.
Siebenmann provides concrete examples gleaned from historical Unix sources, illustrating the practical application of /etc/glob
. One example demonstrates how ls -l
could be abbreviated to simply ll
, significantly reducing typing effort. Another shows how commands could be pre-configured with specific options, such as always listing directories in long format. The post also emphasizes the powerful, albeit potentially confusing, ability to chain multiple substitutions together, allowing complex transformations of commands based on the defined patterns.
The post further discusses the historical evolution of /etc/glob
. While initially existing as a standalone file, its functionality was eventually incorporated directly into the shell itself in later Unix versions. This integration streamlined the command parsing process and obviated the need for a separate file. The reasons for this transition likely stemmed from efficiency improvements and a desire for a more unified command interpretation approach.
Finally, Siebenmann draws a parallel between /etc/glob
and modern features like shell aliases and functions. While functionally similar in their ability to create shortcuts and customized commands, /etc/glob
differed in its global scope and its application prior to argument parsing. This distinction underlines the evolution of command processing in Unix systems, moving from a centralized, pre-parsing substitution mechanism to the more localized and flexible approaches prevalent today. The post concludes by noting the enduring influence of /etc/glob
on contemporary features, serving as a historical precursor to the powerful command manipulation capabilities we take for granted in modern shells.
The Hacker News post titled "The history and use of /etc./glob in early Unixes" has generated a moderate discussion with several interesting comments. The comments primarily focus on historical context, technical details related to globbing, and personal anecdotes about using or encountering this somewhat obscure Unix feature.
One commenter provides further historical context by mentioning that Version 6 Unix's shell did not support globbing, meaning the expansion of wildcard characters like *
and ?
, directly. Instead, /etc/glob
was used as an external program to perform this expansion. This detail highlights the evolution of the shell and its built-in capabilities over time.
Another commenter elaborates on the mechanics of how /etc/glob
interacted with the shell. They explain that the shell would identify commands starting with an unescaped wildcard, then execute /etc/glob
to expand the wildcards. The expanded argument list was then passed to the actual command being executed. This clarifies the role of /etc/glob
as an intermediary for handling wildcards in older Unix systems.
A subsequent comment thread discusses the use of set -f
(or noglob
) in modern shells to disable wildcard expansion. This connection is made to illustrate that while globbing is now integrated into the shell itself, mechanisms to disable it still exist, echoing the older behavior where globbing wasn't a default shell feature.
Someone shares a personal anecdote about encountering remnants of /etc/glob
in a much later version of Unix (4.3BSD). Although no longer functional, the presence of the /etc/glob
file serves as a historical artifact, reminding users of earlier Unix implementations.
Another comment explains the security implications of directly executing the output of programs in the shell. They highlight that directly substituting the output of /etc/glob
into the command line could lead to command injection vulnerabilities if filenames contained special characters. This observation points to the potential risks associated with early implementations of globbing.
A commenter also mentions the influence of Multics on early Unix, suggesting that some of these design choices might have been inherited or influenced by Multics' features. This provides a broader context by linking the development of Unix to its predecessors.
Finally, a few comments touch upon alternative globbing mechanisms like the use of backticks, further enriching the discussion by presenting different approaches to handling filename expansion in older shells.
Overall, the comments on the Hacker News post provide valuable insights into the historical context, technical details, and practical implications of /etc/glob
in early Unix systems. They offer a glimpse into the evolution of the shell and its features, as well as the challenges and considerations faced by early Unix developers.
The blog post "Right to Root Access" by Medhir explores the multifaceted concept of digital ownership and control, specifically focusing on the implications of restricting root access on devices. The author argues that limiting a user's ability to fully control their own hardware undermines the very notion of ownership, drawing parallels to physical property rights. They posit that if one truly owns a device, they should have the unfettered ability to modify, repair, and utilize it in any manner they see fit, including accessing and altering the root level of the operating system.
This comprehensive control, often symbolized by "root access," is presented as essential for several key reasons. First, it empowers users to truly personalize their devices, tailoring the software and functionality to precisely match their individual needs and preferences. This level of customization extends beyond superficial changes, enabling deep system modifications and the installation of alternative operating systems.
Secondly, the post highlights the crucial role of root access in maintaining and repairing devices. The author contends that restricting root access hinders troubleshooting efforts and forces users to rely on manufacturers or authorized service providers, potentially incurring unnecessary costs and delays. This dependency, they argue, further diminishes the sense of ownership and control.
Furthermore, the blog post emphasizes the significance of root access for security and privacy. While acknowledging potential risks associated with improper use of root privileges, the author argues that knowledgeable users can leverage root access to enhance security by implementing custom security measures, removing potentially unwanted software, and auditing system behavior more effectively. Restricting this access, conversely, can leave users vulnerable to pre-installed bloatware, undisclosed tracking mechanisms, and other potential security compromises.
The author also addresses the common counterarguments against granting universal root access, such as concerns about user error and potential security vulnerabilities. They acknowledge these risks but argue that they should not outweigh the fundamental right to control one's own property. Instead, they propose that education and responsible disclosure of information are more effective approaches than outright restriction. They suggest that fostering a culture of digital literacy and providing users with the knowledge and tools to safely utilize root access is a more sustainable and empowering solution than limiting their control.
In essence, the blog post champions the idea of digital self-determination, arguing that true ownership entails the right to fully control and modify one's digital devices, including accessing the root level of the system. This right, they argue, is essential for personalization, maintenance, security, and ultimately, for preserving the fundamental principles of ownership in the digital realm.
The Hacker News post "Right to root access" (https://news.ycombinator.com/item?id=42677835) sparked a discussion with a moderate number of comments, mostly focusing on the practicality and implications of the proposed "right to root access" on personal devices.
Several commenters questioned the feasibility and potential consequences of such a right. One commenter argued that allowing root access would necessitate a significant redesign of operating systems and applications, leading to increased complexity and potentially reduced security. They highlighted the current model where users choose between convenience and security, suggesting that mandated root access might force a compromise on one or the other.
The discussion also touched upon the potential for misuse and the difficulty of balancing user freedom with security concerns. One commenter expressed skepticism about the average user's ability to manage root access responsibly, suggesting it could lead to increased vulnerability to malware and other threats. Another raised concerns about the implications for digital rights management (DRM) and the potential conflict with copyright holders.
Some commenters drew parallels to the "right to repair" movement, arguing that root access is a similar concept applied to software. They emphasized the importance of user control over their own devices and the ability to modify or repair them as needed.
A more technical discussion emerged regarding the distinction between "root access" and "administrator access," with one commenter clarifying that the author likely meant administrator access. This highlighted a potential ambiguity in the original article's terminology.
The potential impact on software development was also discussed. One commenter speculated that granting users root access could lead to a shift in software development practices, potentially leading to more modular and customizable systems.
Finally, some comments expressed support for the general idea of greater user control, but acknowledged the significant challenges in implementing such a right in a practical and secure manner. The overall sentiment seemed to be one of cautious interest, with many acknowledging the theoretical appeal while also recognizing the potential downsides and complexities.
This comprehensive guide, titled "BCPL Programming on the Raspberry Pi," serves as an introduction to the BCPL programming language specifically tailored for use on the Raspberry Pi platform. It aims to provide novice programmers, particularly young individuals, with a foundational understanding of BCPL and equip them with the necessary skills to develop functional programs on their Raspberry Pi.
The document begins with a brief historical overview of BCPL, highlighting its influence as a precursor to the widely-used C programming language. This historical context establishes BCPL's significance in the evolution of programming languages. The guide then proceeds to detail the installation process of the Cintcode BCPL interpreter on a Raspberry Pi system, offering clear, step-by-step instructions to ensure a smooth setup.
Following the installation, the core concepts of BCPL programming are systematically introduced. This includes a detailed explanation of fundamental data types like integers and vectors (arrays), along with guidance on using operators for arithmetic and logical operations. Control flow mechanisms, crucial for directing program execution, are also covered comprehensively, encompassing conditional statements (IF, TEST), loops (WHILE, FOR), and switch statements (SWITCHON). The guide emphasizes the importance of structured programming techniques to promote clarity and maintainability in BCPL code.
The guide further delves into more advanced topics such as procedures (functions) and the concept of separate compilation. It elucidates how to define and call procedures, enabling modular program design and code reuse. The separate compilation feature allows developers to break down larger programs into smaller, manageable modules that can be compiled independently and then linked together. This promotes efficient development and simplifies debugging.
Input and output operations are also addressed, demonstrating how to interact with the user via the console and how to manipulate files. The guide provides examples of reading and writing data to files, enabling persistent storage of information.
Throughout the guide, numerous examples of BCPL code snippets are interspersed to illustrate the practical application of the concepts being discussed. These practical demonstrations reinforce the theoretical explanations and facilitate a deeper understanding of BCPL syntax and functionality. The document concludes with a series of suggested programming exercises designed to challenge the reader and encourage further exploration of BCPL's capabilities on the Raspberry Pi. These exercises provide hands-on experience and promote the development of practical programming skills. In essence, the document serves as a self-contained, accessible resource for anyone interested in learning BCPL programming in the context of the Raspberry Pi.
The Hacker News post titled "Young Persons Guide to BCPL Programming on the Raspberry Pi [pdf]" has several comments discussing the linked PDF and BCPL in general. A recurring theme is nostalgia and appreciation for the simplicity and elegance of BCPL.
One commenter recalls using BCPL on a Xerox Data Systems Sigma 9 in the early 1980s, highlighting its influence on C and emphasizing its small size and speed. They appreciate the document for its historical context and clear explanation of bootstrapping.
Another commenter focuses on the educational value of the document, suggesting that working through it provides valuable insight into how software works at a fundamental level, from bare metal up. They praise the clear writing style and the practical approach of using a Raspberry Pi.
A few comments delve into the history of BCPL, mentioning its relationship to CPL and C, and how it was a dominant language for systems programming before C took over. One user explains that BCPL was instrumental in the development of the original boot ROM for the Amiga. They also mention its continued use in some specialized areas due to its compact runtime.
Some comments express interest in trying BCPL on a modern platform like the Raspberry Pi. They discuss the potential benefits of learning such a foundational language and the practical experience it offers in understanding system architecture and bootstrapping.
Several commenters share personal anecdotes about their experiences with BCPL or related languages, giving the discussion a sense of historical perspective. One person talks about using BCPL in the 1970s and remembers the challenges of using paper tape. Another recounts learning C before BCPL and finding the differences fascinating.
The overall sentiment in the comments is positive, with many expressing admiration for BCPL's simplicity and power. The document is praised for being well-written, informative, and historically relevant. The discussion provides a glimpse into the enduring interest in older programming languages and the desire to understand the foundations of modern computing.
The blog post "DOS APPEND" from the OS/2 Museum meticulously details the functionality and nuances of the APPEND
command in various DOS versions, primarily focusing on its evolution and differences compared to the PATH
command. APPEND
, much like PATH
, allows programs to access data files located in directories other than their current working directory. However, while PATH
focuses on executable files, APPEND
extends this capability to data files, specified by various file extensions.
The article begins by explaining the initial purpose of APPEND
in DOS 3.3, highlighting its ability to search specified directories for data files when a program attempts to open a file not found in the current directory. This eliminates the need for programs to explicitly handle path information for data files. The post then traces the development of APPEND
through later DOS versions, including DOS 3.31, where a significant bug related to networked drives was addressed.
A key distinction between APPEND
and PATH
is elaborated upon: PATH
affects only the search for executable files (.COM, .EXE, and .BAT), while APPEND
pertains to data files with extensions specified by the user. This difference is crucial for understanding their respective roles within the DOS environment.
The blog post further delves into the various ways APPEND
can be used, outlining the command-line switches and their effects. These switches include /E
, which loads the appended directories into an environment variable, /PATH:ON
, which enables searching the appended directories even when a full path is provided for a file, and /PATH:OFF
, which disables this behavior. The post also explains the use of /X
, which extends the functionality of APPEND
to affect the EXEC
function calls, thus influencing child processes.
The evolution of APPEND
continues to be discussed, noting the removal of the problematic /X:ON
and /X:OFF
switches in later versions due to their instability. The article also touches upon the differences in behavior between APPEND
in MS-DOS/PC DOS and DR DOS, particularly concerning the handling of the ;
delimiter in the APPEND
list and the search order when multiple directories are specified.
Finally, the post concludes by briefly discussing the persistence of APPEND
in later Windows versions for compatibility, even though its utility diminishes in these more advanced operating systems with their more sophisticated file management capabilities. The article thoroughly explores the intricacies and historical context of the APPEND
command, offering a comprehensive understanding of its functionality and its place within the broader DOS ecosystem.
The Hacker News post titled "DOS APPEND" with the link https://www.os2museum.com/wp/dos-append/ has several comments discussing the utility of the APPEND
command in DOS and OS/2, as well as its quirks and comparisons to other operating systems.
One commenter recalls using APPEND
frequently and finding it incredibly useful, particularly for accessing data files located in different directories without having to constantly change directories or use full paths. They highlight the convenience it offered in a time before sophisticated development environments and integrated development environments (IDEs).
Another commenter draws a parallel between APPEND
and the modern concept of environment variables like $PATH
in Unix-like systems, which serve a similar purpose of specifying locations where the system should search for executables. They also touch on how APPEND
differed slightly in OS/2, specifically regarding the handling of data files versus executables.
Further discussion revolves around the intricacies of APPEND
's behavior. One comment explains how APPEND
didn't just search the appended directories but actually made them appear as if they were part of the current directory, creating a virtualized directory structure. This led to some confusion and unexpected behavior in certain situations, especially with programs that relied on obtaining the current working directory.
One user recounts experiences with the complexities of managing multiple directories and files in early versions of Turbo Pascal, illustrating the context where a tool like APPEND
would have been valuable. This comment also highlights the limited tooling available at the time, emphasizing the appeal of features like APPEND
for streamlining development workflows.
Someone points out the potential for conflicts and unexpected results when using APPEND
with programs that create files in the current directory. They suggest that APPEND
's behavior could lead to files being inadvertently created in a directory different from the intended one, depending on how the program handled relative paths.
The security implications of APPEND
are also addressed, with a comment mentioning the risks associated with accidentally executing programs from untrusted directories added to the APPEND
path. This highlights the potential security vulnerabilities that could arise from misuse or improper configuration of the command.
Finally, there's a mention of a similar feature called apppath
in the REXX language, further illustrating the cross-platform desire for this kind of directory management functionality.
Overall, the comments paint a picture of APPEND
as a powerful but somewhat quirky tool that provided a valuable solution to directory management challenges in the DOS/OS/2 era, while also introducing potential pitfalls that required careful consideration. The discussion showcases how APPEND
reflected the computing landscape of the time and how its functionality foreshadowed concepts that are commonplace in modern operating systems.
Summary of Comments ( 28 )
https://news.ycombinator.com/item?id=42741155
HN commenters largely praised the elegance and simplicity of NetBSD's native graphics stack, contrasting it favorably with the complexity of X11. Several pointed out the historical context, noting that this approach harkens back to simpler times and offers a refreshing alternative to the bloat of modern desktop environments. Some expressed interest in exploring NetBSD specifically because of this feature. A few commenters questioned the practicality for everyday use, citing the limited software ecosystem that supports it. Others discussed the performance implications, with some suggesting it could be faster than X11 in certain scenarios. There was also discussion of similar approaches in other operating systems, such as Framebuffer and Wayland.
The Hacker News post "Hands-On Graphics Without X11" discussing a blog post about NetBSD graphics without X11 sparked a lively discussion with several insightful comments.
One commenter pointed out the historical significance of framebuffer consoles and how they were commonplace before X11 became dominant. They highlighted the simplicity and directness of framebuffer access, contrasting it with the complexity of X11. This sparked further discussion about the evolution of graphics systems and the trade-offs between simplicity and features.
Another commenter expressed enthusiasm for the resurgence of framebuffer-based applications and saw it as a positive trend towards simpler, more robust systems. They specifically mentioned the appeal for embedded systems and specialized applications where the overhead of X11 isn't desirable.
The topic of Wayland was also raised, with some commenters discussing its potential as a modern alternative to both X11 and framebuffers. The conversation touched on Wayland's architectural differences and the challenges of transitioning from an X11-centric ecosystem.
Some users shared their personal experiences with framebuffer applications and libraries, mentioning specific tools and projects they had used. These anecdotes provided practical context to the broader discussion about the merits and drawbacks of different graphics approaches.
Several commenters expressed interest in exploring NetBSD and its framebuffer capabilities further, indicating the blog post had successfully piqued their curiosity. They inquired about specific hardware compatibility and the ease of setting up a framebuffer environment.
The performance benefits of bypassing X11 were also mentioned, with commenters suggesting it could lead to more responsive graphics and reduced resource consumption. This resonated with users interested in optimizing their systems for performance-sensitive tasks.
Finally, some comments focused on the security implications of different graphics architectures, highlighting the potential attack surface of complex systems like X11. The simplicity of framebuffers was seen as a potential advantage in this regard.