Ephes Blog

Miscellaneous things. Mostly Weeknotes and links I stumbled upon.


Weeknotes 2023-10-23

, Jochen
Open source AI models will soon become unbeatable. Period. --Yann LeCun

Home improvement is still going strong. Painting furniture is more time consuming and difficult than expected 🛠️ 🖌️🎨.

At work I used a combination of Alpine.js and htmx to make a chart drawn by apexcharts react smoothly to form change events (input change -> hx-trigger="change" on form -> get request -> swap html with chart data serialized by jsonscript tag -> response triggers htmx event after swap -> alpinejs component updates chart data on htmx event -> chart animation to new state). This is a lot of fun!

And somehow I also managed to do some open source stuff this week. My fastdeploy project is now Python 3.12 compatible thanks to the uvloop 0.18.0 release. There was a bug in the urljoin method of kptncook that is now fixed, and I got some information about additional kptncook api endpoints that may lead to new commands that can be used to search for recipes. There will be a new wagtail 5.2 release in November that adds proper picture and srcset_image template tags. Maybe my wagtail_srcset project will become obsolete? We'll see, I have to try out the new template tags next week. Then I released a new django-cast version, adding Python 3.12 support and dropping Python 3.9 support. And finally I started to dust off my old data science tutorial project because someone wanted to use it and had to realize that it did not work anymore. Maybe I can use this as an excuse to get back into that whole data science topic (LLM fine / instruction tuning, oh yeah?).

Articles

Videos

Weeknotes

Software

Books

Mastodon / Twitter

Podcasts


Weeknotes 2023-10-16

, Jochen
The challenge I'm doing this month is called October and it's where I just try to get through every day of October --Erin McGuire Olson

There's some kind of home improvement going on in our apartment, so I'm a little stressed at the moment. Released the podcast episode on Kubernetes. The increased podcast activity has led to some really nice feedback emails, which has been helpful. For example, there is this fluentcomments incompatibility with bootstrap 4 and 5 that I discovered. For django-cast, I added this CSS workaround.

Articles

Weeknotes

Mastodon / Twitter

Software

Videos

Podcasts


Weeknotes 2023-10-09

, Jochen

If you remember having to get off the internet because your parents or a sibling wanted to use the phone, now is a good time to schedule a colonoscopy. Michelle Catherine Marcó


Work week shortened by a little bit of vacation and a cold I caught. Released the podcast episode about environments and packaging tools in Python that we recorded the week before last. Recorded a new podcast episode on Kubernetes. Upgraded a second project to pydantic > 2, and again it was more trouble than expected. On the other hand, upgrading my projects to Python 3.12 went pretty smoothly. There was a minor issue where the configure script preferred openssl@1.1 instead of 3 when both were installed (on M1 based Macs). And the built-in venv module does not install setuptools by default, which broke some packages trying to import something from distutils (uh oh) or something like that.

Articles

  • Tailwind, and the death of web craftsmanship | Well, I probably fall into this "backend engineer forced to do frontend stuff" (I just paste my html into chatGPT and ask it to move the button a little bit to the right, which works), but maybe I should have a look at real CSS
  • Programming Sucks | Still valid even after ten years
  • Web server ‘hello world’ benchmark : Go vs Node.js vs Nim vs Bun | I don't know. Benchmarking is hard, and you have to be really careful about what you measure. For example: I would highly doubt any hello world benchmark that reports lower numbers for Python than for NodeJS, because you should be using exactly the same code in both cases (libuv). If you use something different, you measured something different against libuv, not NodeJS vs. Python (I got almost the same numbers in my own benchmarks...).

Books

Videos

Software

Mastodon / Twitter

Weeknotes

Podcasts

Out of Context Images


Weeknotes 2023-10-02

, Jochen
twitch streamer with 7 viewers: hey guys!! i bought this expensive microphone so you can hear me play minecraft in dolby atmos surround sound
long-distance train manager (speaking into a potato): please listen to the following announcements to find out how you’re going to get home --Ninji

Normal work week. Attended a meeting of the local Python user group, which was great. Finally managed to record a new Python podcast episode with Anna-Lena Popkes and Dominik which will be released soon. Spent a couple of days in Braunschweig.

Articles

Weeknotes

Mastodon / Twitter

Software

Podcasts

Out of Context Images


Weeknotes 2023-09-25

, Jochen
Anything worth doing is worth doing badly. — G. K. Chesterton

Worked on frontend stuff again last week. I think my favorite way to combine htmx with Alpine.js when you have to pass some parameters is to just use the htmx API like this:

<div
      {# fmt:off #}
      x-data="{
        value: false,
        toggle() {
          this.value = ! this.value;
          htmx.ajax(
            'GET',
            '{% url 'some-detail-url' pk=model.pk %}', {
              target: '#some_target_id',
              values: { toggle_state: this.value }
          });
        }
      }"
      {# fmt:on #}
    x-id="['toggle-label']"
>
    <!-- ... later on, you'll just have -->
    <button x-ref="toggle" @click="toggle()" type="button" role="switch" :aria-checked="value" :aria-labelledby="$id('toggle-label')">Toggle</button>
</div>

Didn't have much time for my own projects, but released django-cast 0.2.22 because I forgot to do this last week 😑. Then I noticed that I forgot to publish a TIL post about the new STORAGES setting in Django 4.2. Middle of the week I went to the Django Cologne meetup and had many interesting discussions with different people. Sarah talked a bit about the djangonaut.space project, which I'm also interested in, so it was a really nice evening.

Talking about doing things badly. I tried to upgrade an old project to pydantic > 2 and failed spectacularly. After upgrading I got this error message:

super().__init__(
File "../pydantic/main.py", line 165, in __init__
__pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pydantic_core._pydantic_core.ValidationError: 1 validation error for Settings
db_engine
Field required [type=missing, input_value={'database_url': 'postgre... 'services_development'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.3/v/missing

And somehow I misread this error message as being about the database_url field. But it was actually complaining that the db_engine field was missing. The problem was caused by a db_engine: typing.Any field that was None by default in pydantic < 2 and does not get a default value in pydantic > 2 as documented in the migration guide.

This took me far too long to fix, and it felt far too similar to the dread caused by updating old Javascript projects.

Articles

Weeknotes

Software

Videos

Podcasts