Programming Leftovers
-
Jonathan Dowland ☛ Jonathan Dowland: equivalence problems with StreamGraph
I've been tackling an equivalence problem with rewritten programs in StrIoT, our proof-of-concept stream-processing system.
The StrIoT Logical Optimiser applies a set of rewrite rules to a stream-processing program, generating a set of variants that can be reasoned about, ranked, and deployed. The problem I've been tackling is that a variant may appear to be semantically equivalent to another, but compare (with
==
) as distinct. -
Peter Czanik: The syslog-ng Insider 2023-12: compressed HTTP; packages; OpenObserve; duplicates;
Dear syslog-ng users,
This is the 115th issue of syslog-ng Insider, a monthly newsletter that brings you syslog-ng-related news.
-
University of Toronto ☛ Partially emulating #ifdef in Go with build tags and consts
Thanks to modern compiler technology in the Go toolchain, we can sort of emulate #ifdef through the use of build tags combined with some other tricks. How well the emulation works depends on what you want to do; for some things it's almost perfect and for other things it's going to be at best awkward.
-
Rlang ☛ New R/Insurance Webinar Series: The Journey from Excel to High-Performance Programming in R [Ed: Excel does not even get the maths right; don't use Excel, just use R instead, maybe with LibreOffice Calc]
The actuarial profession is on the cusp of a transformation spearheaded by integrating programming into the traditional spreadsheet-based workflow.
-
Dirk Eddelbuettel ☛ Dirk Eddelbuettel: RProtoBuf 0.4.21 on CRAN: Updated Upstream Support!
An exciting new release 0.4.21 of RProtoBuf arrived on CRAN earlier today. RProtoBuf provides R with bindings for the Google Protocol Buffers (“ProtoBuf”) data encoding and serialization library used and released by Google, and deployed very widely in numerous projects as a language and operating-system agnostic protocol.
-
Perl / Raku
-
Perl ☛ Perl Advent Calendar 2023: Santa's New Dispatcher
To that end, at this critical hour he's decided to write a Perl script that will automatically assign a toy to a child based on the starting letter of their first name and the random flip of a coin.
-
Perl ☛ Perl Advent Calendar 2023: Introduction to class feature
Following the release of Perl v5.36, the discussion of new object system Corinna took the limelight as it was one of the main features to be introduced with Perl v5.38. Then finally on 2023-07-02, we had Perl v5.38 released.
After the release, I wanted to try new class feature but never got the opportunity to play with it.
-
Perl ☛ Perl Advent Calendar 2023: Santa’s Workshop Secrets: The Magical Test2 Suite (Part 1)
Well, not anymore. This year we updated all our test code to use the magical Test2-Suite. A single distribution that updates and replaces not just Test::More, but many other testing modules. And the best part? It will be a core distribution in Perl 5.40 onwards! Talk about a Christmas Miracle <3
-
Rakulang ☛ Day 13 – Networks Roasting on an Open Fire, Part 3: Feeling Warm and Looking Cool
In parts 1 and 2 of these blog posts, I roughed out a simple ping chart program and then began to refactor and add features to improve the overall experience.
It’s functional, but there’s a lot to improve upon — it doesn’t use the screen real estate particularly well, there are some common network problems it can’t visualize, and frankly it just doesn’t look all that cool.
So let’s fix all that!
-
Rakulang ☛ Day 14 – The Magic Of Q (Part 2)
There are two other adverbs that haven’t been covered yet, and there’s a new one if you’re feeling brave. Let’s start with the two already existing ones: [...]
-
-
Python
-
James Bennett ☛ Database views in Django
Most databases support creating and working with views, which, if you’ve never encountered them before, are like a virtual table — instead of being defined by the CREATE TABLE statement, they’re created by the CREATE VIEW statement, and instead of defining their own set of columns they’re defined as a query against one or more other tables. You can query against a view the way you’d query against a table, and your queries will be applied on top of the base query that backs the view.
For example, a few years ago I gave a DjangoCon tutorial on the Django ORM, and gave an example of several models — Widget, Factory, and Production — and aggregation queries to track things like production statistics of widgets per factory, etc. I showed how to do this both by writing raw SQL and by using the ORM’s annotation and aggregation features.
-
James Bennett ☛ Database functions in Django
On top of the basic query syntax we’re all used to, SQL databases tend to have a large number of built-in functions — some of which are standardized, some of which are unique to a particular database — and often the ability to write your own custom ones as well.
And Django’s ORM supports a lot of standard functions, making it easy to use them in ORM query expressions. But you can also write your own.
-
Seth Michael Larson ☛ Python listed as memory-safe language in latest CISA recommendations
More support will be needed to migrate Python's extensive packaging ecosystem from memory-unsafe languages to memory-safe languages. I've made recommendations on how best the US government can aid in that effort in the PSF's RFI response. My recommendations included: [...]
-
-
Java
-
Frank Delporte ☛ A JavaFX Game Application in a Single Java File with JBang and FXGL
FXGL is a framework to easily create JavaFX-based game applications. In this blog post, I want to show you how this can be done within a single Java-file which doesn’t need a full Maven or Gradle project but can be executed directly with JBang without compilation. This approach can be used as an easy way to get new Java(FX) developers started or create your first experiments with FXGL.
-