In web development and deployment, most software engineers are familiar with either: Separating the built SPA and the backend (Client-Side Rendering), or Return HTML directly from the backend (Server-Side Rendering) I recently (re)discovered 1 that there is a third way: embedding the built SPA into the backend’s binary file, and serving it directly. I think this is an elegant approach, as the pros are: Simpler deployment as we only have one binary file in the end Simpler code where we don...| nguyenhuythanh.com
I’ve gone mouseless, or using the computer without a physical mouse, for around 2 months. The supporting tools I used are: Vimium: a browser extension for interaction (mainly navigation/links following) while browsing the web warpd: a program to control the mouse in other cases A drawing tablet: the last resort if warpd cannot make it To be honest, I don’t think there is a huge boost in productivity, but it helps with concentration as I don’t have to move my hands that often anymore.| Posts on Thanh's Islet 🏝️
I recently took in a freelancing project, and one particularly interesting task is to convert unstructured-ish DOCX files to structured data, let’s say JSON. Intially, I estimated that it should only take me around 2 days for the implementation. I know what are you thinking. You are right that: […] overconfidence is a slow and insidious killer. 1 In the end, the task took me more than 5 days to complete.| Posts on Thanh's Islet 🏝️
I find the problem strikes a balance between tricky (needing specific knowledge of data structure and algorithm) and interesting (solvable with first-principle thinking). However, after understanding the tricky part, and working through the thinking, and implementing working code, I still could not really explain the intuition concisely. Hence this writing. Let’s hope that it helps you as much as it helped me. Problem Description You can find the problem description on Leetcode yourself.| Posts on Thanh's Islet 🏝️
My career began in Natural Language Processing, and I’ve studied the mathematics and theories behind AI extensively. So when ChatGPT took the world by storm, I approached it with skepticism. I viewed Large Language Models (LLMs) as sophisticated “next word predictors” – black boxes that ingest vast amounts of data and generate plausible word sequences from initial prompts, and felt that The hype surrounding LLMs seemed overblown. I struggled to see how these “predictors” could rev...| Posts on Thanh's Islet 🏝️
I think everyone who uses NixOS should have encountered this dreaded error (I’m using a “random” binary file that comes from Codeium, which is an code completion extension powered by AI): ./language_server_linux_x64 # zsh: no such file or directory: ./language_server_linux_x64 It is quite elusive on why does this happen. After taking a while searching and reading, I “sort of” understood the problem, but can only put it to my terms like this: in other OSes (Ubuntu for example), C lib...| Posts on Thanh's Islet 🏝️
Description The compile-and-go interface implemented in this section is akward, since the compiler can be called only once (when the evaluator machine is started). Augment the compiler-interpreter interface by providing a compile-and-run primitive that can be called from within the explicit-control evaluator as follows: ;;; EC-Eval input: (compile-and-run '(define (factorial n) (if (= n 1) 1 (* (factorial (- n 1)) n)))) ;;; EC-Eval value: ok ;;; EC-Eval input: (factorial 5) ;;; EC-Eval value:...| Posts on Thanh's Islet 🏝️
My birthday came a few days ago. On the day’s morning, I received a few good wishes from my close ones, and it felt pretty great. A not-so-fancy birthday party was thrown by them also made me feel happy. One part of me thought that a birthday is just another day, while another part wanted to write something which makes the day more special. The latter part won, and I guess I am going to write about some discoveries that I had for the year (only on writing this that I realize every year I ha...| Posts on Thanh's Islet 🏝️
Overview Generally, there are two ways of web rendering: the first is SSR, stands for Server-Side Rendering; the second is CSR, stands for Client-Side Rendering. Both come with different trade-offs. Someone has compared that to a cycle, where we first started with SSR, then moved to CSR/SPA as the client-side application state became complex. Because CSR has its problems, we (re)discovered SSR 1 with HTMX, or even NextJS SSR. There were many writing about issues of CSR and SPA 2 3, but I woul...| nguyenhuythanh.com