Sapper vanderzwaan.dev

Blog

Import fun with Parcel

Today I was having fun with Parcel and generating a bundle for NodeJS. Very convenient, only importing seemed weird. Some imports were 'successful' in the sense that both Parcel and NodeJS could resolve it, but the import was {default: {}}. Hmmm.

I also write my thoughts on bundlers I used. Depending on your standards it might or might not be a review.

— October 28, 2019

Blog with Sapper

This blog now runs on Sapper. The experiment succeeded but I do miss some quality of life functionality of Hugo.

— October 13, 2019

Starlette: A tale that was silently swallowed by uvicorns.

Imagine the following bugreport of your Starlette application:

Calling your API results 30% of the time in an error and 70% in correct behaviour.

and you know that these calls are time independent and should either always work or never work.

— August 13, 2019

HTTP Redirects and Funny behaviour

Recently I had a weird problem reported of an application I made:

When I submit a form it sometimes fails and I get an empty form again. But only sometimes.

— June 13, 2019

Starlette and Socketio Improvements

This is a followup of the previous article on using Starlette together with Python-SocketIO and background processes

I've made some improvements, especially to handle SIGINT (ctrl+c) properly. Additionally, I wanted to start background processes without waiting for a client to connect (this is a solution I saw online).

— June 13, 2019

Decimals and DynamoDB

A short note on DynamoDB of AWS and how it suprisingly gives Decimals when you extract records. And forced me to write ducktape-code.

— May 2, 2019

Flask Pdf Download

This is a short note on getting PDF downloads working on Flask.

The goal is a button with 'Download as PDF':

  • Generate an HTML page
  • Convert his page to a PDF
  • Download the PDF while staying on the same page

— April 24, 2019

Python Partial

This is a short note on the Python function partial.

— April 16, 2019

Starlette and Socketio

A short note on how to use Starlette together with Python-SocketIO. For a DIY project I want to run a single thread process to control a wake-up light (among other things).

— April 13, 2019

Posture of cats: machine learning with fast.ai

During a spare hour I decided to see how fast I could prototype something with the fast.ai library. The library is impressive, I can't say otherwise. Very quickly I got a working prototype. The result was a fairly decent model to recognize the posture of a cat.

— April 10, 2019