-- Leo's gemini proxy

-- Connecting to gemini.tuxmachines.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

Tux Machines


Programming Leftovers


Posted by Roy Schestowitz on Aug 08, 2023,

updated Aug 08, 2023


today's leftovers

Open HardwaESP32, RISC-V, and More



Name before type: why ‘age int’ is better than ‘int age’


↺ Name before type: why ‘age int’ is better than ‘int age’


> There’s a nice answer in the Go FAQ about why Go chose this order: “Why are declarations backwards?”. It starts with “they’re only backwards if you’re used to C”, which is a good point – name-before-type has a long history in languages like Pascal. In fact, Go’s type declaration syntax (and packages) were directly inspired by Pascal.



[Old] 5 Things I’ve Learned in 20 Years of Programming


↺ 5 Things I’ve Learned in 20 Years of Programming


> Do you know what correlates more than anything else with undesirable codebase properties? The size of the codebase.


> Almost everything bad about codebases has a significant relationship with the size of a codebase, measured in logical lines of code.


> I love code.


> I love writing it, studying it, analyzing it, and building things with it. But make no mistake – it’s a massive liability. Always strive to do everything using as little code as humanly possible.



A few weird ways of displaying git hashes


↺ A few weird ways of displaying git hashes


> Well... at what point do we run out of human-readable characters, and what if we used things beyond ASCII?



Coding in C++ like it's Golang (Part 1)


↺ Coding in C++ like it's Golang (Part 1)


> Golang has some mechanisms which are helpful for developing software in Cloud Computing environments. These mechanisms address challenges that are ubiquitous in cloud computing environments, such as handling concurrency scenarios or deploying programs in distributed execution contexts. Some of these mechanisms are useful for real-time scenarios as well. When porting them to C++, care must be taken to follow the principles of real-time programming. Despite these extra challenges (e.g. handling memory allocations) it is absolutely possible to achieve our goal. In the first part of this article series we will show how to return multiple values from functions/methods.



Enhance Your Plots with the text() Function in R


↺ Enhance Your Plots with the text() Function in R


> As a programmer, you’re well aware of the importance of data visualization. A well-crafted plot can convey complex information with clarity and impact. In R, creating stunning plots is a breeze, especially when you’re armed with the versatile text() function. This little gem allows you to add custom text to your plots, enabling you to annotate and highlight essential details. Let’s dive into the world of text() and uncover its syntax and potential through some hands-on examples.



Tails 5.16


↺ Tails 5.16


> Automatic upgrades are available from Tails 5.0 or later to 5.16.



[Old] Designing Pythonic library APIs


↺ Designing Pythonic library APIs


> Summary: This article describes some principles I’ve found useful for designing good Python library APIs, including structure, naming, error handling, type annotations, and more. It’s a written version of a talk I gave in June 2023 at the Christchurch Python meetup.



Python cocktail: mix a context manager and an iterator in equal parts


↺ Python cocktail: mix a context manager and an iterator in equal parts


> I had to take a detour about context managers and iteration so that as many people as possible will be able to understand this article, but we are finally here.


> The goal of all this: learning about this new pattern mixing a custom context managers and a tailor-made iterator.



Raku: A Language for Gremlins


↺ Raku: A Language for Gremlins


> So instead of working I've been learning Raku.1 It originally got on my radar after I ranted about dynamic languages and a couple of users told me I'd like Raku. I finally checked it out last week to see if it'd make a good "calculator language". I use a hodgepodge of Python, J, Frink, and Excel to do math and they all have their own big drawbacks, so it'd be nice if Raku could round them out.


> After several days of experiments, I'm at a loss of how to describe Raku. The best I can come up with is that the language was designed by a bunch of really intelligent gremlins. Gremlins who spent a lot of time gathering feedback from other gremlins.




gemini.tuxmachines.org

-- Response ended

-- Page fetched on Thu Jun 13 07:16:52 2024