[Daniel's week] August 25, 2023

Daniel Stenberg daniel at haxx.se
Fri Aug 25 15:52:53 CEST 2023


Hello friends.

Another week ends. Another week full of curl.

## present tense

I fell over a curl man page this week and figured it was phrased a little 
quirky. It was one of the functions in the URL API. So I edited it a bit, and 
then went through the other URL API functions to polish them as well while 
there.

That then triggered me. Why have I written so much documentation in future 
tense instead of present? "libcurl will set this to..." instead of the simpler 
and more direct "libcurl sets this to...". Many hours and 339 edited files 
later, the curl docs no longer speaks in future tense like that.

A benefit with editing hundreds of man pages is that I got to read and update 
hundreds of paragraphs. In some cases the content or wording was outdated or 
downright wrong, but in more cases there were just details that after many 
years simply could be written in better ways.

With over 1800 lines of documentation changed [3], I think it made the docs a 
tad bit better.

## blank URL

Doing consistent and solid APIs is really hard. As a circumstantial proof,
someone figured out that if you ask libcurl to parse a zero-length URL (just a
blank string) it would return OK, as if it was fine. Of course that is not a
fine URL and I have now fixed it with an added test case.

It took almost five years for someone to notice and report [4].

## curl.dev

It was reported to me via email that https://curl.dev does not work very
nicely on smaller screens due some CSS mistake. I made me realize that I had
not actually put the minuscule website contents up on GitHub before. I went
ahead and did that, asked for help on Mastodon and almost immediately someone
filed the same issue on GitHub [5] that I got emailed.

## command line options

Continuing from last week, I tweaked the stats script we use to generate the
"command line options over time" graph [6] to now also include a few amounts
and dates from before curl was named curl. I noticed that httpget 1.3 only had
two options. The 8.3.0 release that will be released in a few weeks will have
257 command line options.

I made the graph start with the httpget 1.3 data (June 1997) primarily because
I don't have earlier code left around.

## mastering the curl command line

This presentation [7] is due next week. I have continued to work slowly on the
slides, polished them further, expanded them in some places and generally been
doing through them to make sure they say what they need to say and to make
myself familiar with them to an enough degree that my presentation can be
performed smooth enough on Thursday.

Currently it is at 153 slides, and I doubt I will add many or even any more
before Thursday. I feels complete.

I will live-stream the presentation. I will record it locally and make it
available on YouTube after the fact in whole. I might make smaller snippets
available as well later on if I think I manage to explain specific areas good
enough to work when taken out of context. I will also make the entire slide
set available, just in case someone wants to dwell over them on their own time
and pace.

Since it is a live-stream on Twitch, the way to accept and do questions is in
the provided chat. It will provide somewhat of a challenge to me to do the
presentation and at the same time monitor the chat for (good) questions. It
will also require that I have a few friends present who can monitor and keep
the chat clean from the occasional spammers and troublemakers that always show
up when you do these things.

I will not show the chat in the stream itself though. To make the presentation
cleaner and allow chatters to say whatever they want without it getting saved
in my recording.

I hope we can reach a new record amount of people in the audience for this
stream and watchers of the following recording, for curl events I mean.

## test conditionals

We have a fairly elaborate test case file format. In late 2020 I added support
for embedded conditionals in them, using %if, %else and %endif. It then
introduced the ability for us to use the same test case and yet have it work a
little differently depending on specific features built into curl.

I made the function pretty basic and it did not support nested conditions.

Fast-forward to August 2023 and we got this new PR that uses the %if condition
to make it work for several different build conditions. Awesome. But this also
brought an immediate need to have it work with nested conditions as otherwise
it would become much less clean and many more repeated lines in a way that I
did not really feel good about.

So this week I have worked on making the %if/%else/%endif handling of curl
test cases work with nested use [8], and based on this work we can immediately
have new and updated test cases take advantage of the new powers.

## talk

On Wednesday next week I have been invited to talk curl at Elastx, in
Stockholm [1]. As always when I do a presentation on a topic I have spoken
about before, I still make sure all the slides are updated, match the current
reality and otherwise polish it up. No talk of mine will thus ever be the
exact duplicate of a previous one, even if the topic may sound identical.

## podcast

I have been invited to guest a podcast on Tuesday. I will let you know all
about it once it becomes available. In the mean time, you can always tune in
one of the many other appearances I have done in podcast episodes over the
years [2].

## tiny-curl

It is long due I put together a new release of tiny-curl [9]. I brought all
the work over on top of the 8.2.1 release and I intend to ship a tiny version
of 8.2.1 in the coming week.

For most users using tiny-curl, there have not been many important changes
recently to warrant upgrades since tiny-curl users very often stick to doing
simple HTTPS/1.1 GET transfers and not much else. Often also in rather
constrained environments where they also control the servers they communicate
with.

## coasters

A particularly amazing and creative person has been working on a "curl cheat
sheet" coaster that I hope soon will become available for purchase. This week
I got to see a preview version and had some feedback but they look awesome and
I can't wait to be able to share pictures and links to these babies with you.
And get me a few myself of course.

They are not cheap, but I hope you will understand why and still get to
appreciate them. Coming soon.

## 100 subscribers

This week we surpassed 100 subscribers of my weekly email. Welcome new
readers. I promise to keep things casual, techy and curl focused.

## Coming up

- tiny-curl release
- Tue: podcast recording
- Wed: talk at elastx
- Thu: mastering the curl command line presentation

## Links

[1] = https://elastx.confetti.events/tech-fika-curl-fritidsprojektet-som-tog-sig-till-mars
[2] = https://daniel.haxx.se/podcasts.html
[3] = https://github.com/curl/curl/pull/11713
[4] = https://github.com/curl/curl/issues/11714
[5] = https://github.com/curl/curl.dev/issues/1
[6] = https://curl.se/dashboard1.html#cmdline-options-over-time
[7] = https://daniel.haxx.se/blog/2023/08/08/mastering-the-curl-command-line/
[8] = https://github.com/curl/curl/pull/11731
[9] = https://curl.se/tiny/

-- 

  / daniel.haxx.se


More information about the daniel mailing list