I quit my job recently because I wanted to start something new, jump into the unknown.
It can feel scary to start something new, how is it going to end, what are the next steps. I have been comfortable with not always knowing the way, I have multiple times had times where I worked on my own thing or did something else.
Read full postCompute is everywhere and companies like AWS and Google Cloud are some of the most profitable companies in the world and they keep growing. They make it really easy and affordable to get compute.
But getting GPU compute is still new and unsolved, GPU compute is expensive and we are very much tied to a single provider called Nvidia if you want to do something.
The easiest way to get started is definitely your own computer, but most times if not all the time your computer is simply not powerful enough, so many things are not even possible to run locally in relation to machine learning.
What is also easy is using Google Colab, it is a easy web interface that allows you to run Python through what is called a notebook, concretely a Jupyter notebook. It is really good for proving a point and visualising the output of your machine learning or data processing.
Read full postToday I want to show how streaming an AI prompt response from a CloudFlare worker. We have been used to know that ChatGPT streams the response of the large language model, it is pretty mesmerizing and adds to the fealing of a thinking mashine that you can see the dialog as it is coming.
We don't want to call an AI model during development just to simulate the LLM sending the events.
We can work with streams in Node.js by creating a TransformStream
, that will allow us to both write and read the stream.
let { readable, writable } = new TransformStream();
Read full postWhen I started building a server for handling forward_auth
requests, it was like stepping into uncharted territory. Googling this concept usually leads you to comprehensive but heavyweight solutions like Authelia or middleware examples in Traefik and Caddy. These are great for robust setups but overkill when you just need a simple, functional proof of concept.
Forward authentication is a mechanism where a reverse proxy delegates user authentication to an external server. The flow looks like this:
When developing software, decisions often come down to trade-offs between simplicity, readability, and maintainability. One recurring choice is whether to use a function or a class for a task. While both have their place, I often lean toward functions for many scenarios. Here’s why they can be a great option.
Functions tend to be straightforward: they take inputs, produce outputs, and avoid hidden states. This simplicity makes them easier to reason about and debug. If something breaks, you don’t have to untangle a web of interdependent attributes to locate the issue.
When testing, pure functions shine. They’re predictable: give them valid inputs, and they’ll always produce the same outputs. This predictability simplifies both writing and maintaining tests.
Read full post