news
Programming Leftovers
-
Raymond Camden ☛ Building a File-Based Router in BoxLang
Earlier this week I took a look at BoxLang's new rewriting feature (("URL Rewriting with BoxLang MiniServer")[https://www.raymondcamden.com/2025/08/11/url-rewriting-with-boxlang-miniserver]). It basically boils down to telling the miniserver app, "here is a file I want you to run on a 404", and given that you can write code for anything you would like, it's really flexible. I like this approach, but it got me thinking, what if BoxLang also supported a non-code based rewriting system, something where you can define paths, and rewrites, in a file? I took a stab at architecting such a feature and thought I'd share.
-
Python
-
The New Stack ☛ Stacks in Python — A Practical Guide to LIFO Data Structures
Now it’s time to eat. You peel off the pancake on top, then the one underneath, and so on. You’re not reaching into the middle or pulling out the one on the bottom; you’re taking them in the reverse order you placed them on the plate.
That’s the basic idea behind a stack. Making and eating pancakes follows the Last In First Out (LIFO) principle. LIFO simply means the last item added is the first one taken out.
-
Seth Michael Larson ☛ Transferring “UTF8.XYZ”
I'm transferring the UTF8.XYZ domain and service to Trey Hunner, a friend and beloved member of the Python community. Trey and I have talked about making this transfer many times at PyCon US's across the years, and now it's finally happening!
-
HowTo Geek ☛ Why I Prefer Python for Data Analysis
I've written a lot about data analysis with Python recently. I wanted to explain why it's been a language of choice. Here are some of the reasons I find Python so easy to use, yet powerful.
Python Offers Quick Interactive Calculations
Python lets me run statistical calculations much faster than I could ever do by hand. When I started on my statistics course back in college, I had to calculate basic descriptive statistics like mean, median, and standard deviation. The length of the datasets made this unwieldy, even with the scientific calculator I had. Was I entering the data correctly? I quickly switched over to the TI graphing calculator I had. The textbook I was using happened to show the statistical functions for that model.
I think I still have my graphing calculator somewhere. I don't need it with Python. The standard joke is that you can use it as a desk calculator. The interpreter on its own is easy to use for basic calculations. Upgrading to IPython gives it a lot of creature comforts that can make interactive Python much easier, such as history recall.
-
-
Golang
-
Daniel Lemire ☛ Predictable memory accesses are much faster
Loading data from memory often takes several nanoseconds. While the processor waits for the data, it may be forced to wait without performing useful work. Hardware prefetchers in modern processors anticipate memory accesses by loading data into the cache before it is requested, thereby optimizing performance. Their effectiveness varies depending on the access pattern: sequential reads benefit from efficient prefetching, unlike random accesses.
To test the impact of prefetchers, I wrote a Go program that uses a single array access function. The execution time is measured to compare performance. I start with a large array of 32-bit integers (64 MiB).
-