Do you start with a struct or a class?
When creating a new compound data type in Common Lisp, do you make it a struct or a class? Especially if you are still exploring things, and do not know how it will evolve.
Essays on programming, technology and other things
When creating a new compound data type in Common Lisp, do you make it a struct or a class? Especially if you are still exploring things, and do not know how it will evolve.
Yesterday I read a post that rejects the conventional wisdom on fork() vs vfork() and asserts that fork() is evil and vfork() is good.
Introduction Time zone conversions Naive Date Basic Usage Time zone conversions the right way Conclusion Introduction The thing with the Javascript Date object is that, what it prints is misleading. new Date () // => Date Mon Jan 31 2022 02:32:37 GMT+0530 (India Standard Time) If you think a Date contains all the things it prints, you are wrong. A Date does not contain any year, month or day A…
fork Am I inside the parent or the child? Waiting for children to exit Memory Files Inter-process communication Exec fork fork() can magically make your program do things twice. Don’t believe me? Let’s run this small program and see for ourselves. Create a file called fork.py and save the following code in it. import sys import os import time sys . stdout . write ( 'Ready to fork? (Press enter to…
While working on qbase64, I stumbled over a peculiar problem: I wanted it to work as fast as possible when optimized array types (SIMPLE-ARRAY, SIMLPE-BASE-STRING, etc.) were passed to the encoding/decoding routines, but I also wanted to support the more general types.
Over the years, I’ve been somewhat dismayed by various reports of tampering of EVMs after polls have closed. Especially in this year’s Lok Sabha polls the issue received a lot of coverage.
The Common Lisp library Postmodern defines a macro called PREPARE that creates prepared statements for a PostgreSQL connection. It takes a SQL query with placeholders ($1, $2, etc.) as input and returns a function which takes one argument for every placeholder and executes the query.
I started working on Python recently and we need a dependency manager that gives us reproducible builds, similar to bundler or npm.
In the deftask blog I described how it lets users search for tasks easily by using natural language date queries. It accomplishes this by using a natural language date and time parser I wrote a long time ago called Chronicity.
(Updated Nov 1, 2018)