Programming Leftovers
-
Erlang, the Unix way
With this as a guide, it should be easy to have a client module do any number of nasty work. I’m going to use this scaffolding to run some massively parallel file IO work so that I don’t have to attempt the same in C/Unix. No way.
-
The issue with control flow in interpreters using the 'eval' pattern
The ideal situation for an 'eval()' style interpreter is where you're evaluating expressions and you only have to return a simple result (a number, a boolean answer, or the like). Life gets a bit more complex if you need to return a multi-option result where there are rules for combining the options together; for example, you might have a DSL where the result of an expression could be 'yes', 'no', or 'we have to defer this because DNS isn't cooperating'. When you have such a multi-option situation, every non-terminal Eval() method may need to specifically handle the third option in some way that makes sense (and may be domain specific).
-
Building a CLI Application With Argparse
A Command-Line Interface (CLI) is a method of interacting with a computer program by entering text commands. It provides a way of controlling programs, executing tasks, and manipulating system resources through a terminal or command prompt. To build programs that accept input through the command line, the Python library offers the argparse module. The module simplifies the process of building command-line interfaces by providing the functionality to define command-line arguments, parse arguments, validate user input, and generate help messages.
In this tutorial, let’s explore using the argparse module by building a ToDo application that will be operated through the Command-Line. This project will serve as an example to introduce the various concepts of argparse and demonstrate their practical use. Therefore, throughout the tutorial, we will build the application incrementally while exploring the different features of the argparse module. The ToDo application will allow users to manage tasks by providing commands to add tasks, view the task list, mark tasks as done, and delete tasks.
-
Designing Extensible Software with Go Interfaces
In this article, you’ll learn how to use interfaces in Go to design extensible, modular software. Moreover, you’ll learn how to use interfaces to promote code reusability, flexible architecture, and an improved development experience.
-
No-GIL mode coming for Python
The Python Steering Council has announced its intent to accept PEP 703 (Making the Global Interpreter Lock Optional in CPython), with initial support possibly showing up in the 3.13 release. There are still some details to work out, though.
-
Security Developer-in-Residence – Weekly Report #5
I've continued working on having the Python Software Foundation registered as a CNA. We have at this point submitted our registration containing a list of contacts, a disclosure policy, location of advisories and an advisory database. We've received an onboarding meeting date (August 21st) where we'll meet with the CNA partner team to ask questions about the process and fill out some example CVE records.
The Python Steering Council have approved having Python scoped under the PSF CNA! 🥳