On setenv() and Explosions

Skim over this abbreviated and badly-formatted function definition, from glibpacrunner.c: static void handle_method_call (GDBusConnection *connection, /* … */) { /* … */ if (/* … */) { gchar *libproxy_url = g_strdup_printf (“pac+%s”, pac_url); g_setenv (“http_proxy”, libproxy_url, TRUE); g_free (libproxy_url); } else g_setenv (“http_proxy”, “wpad://”, TRUE); g_proxy_resolver_lookup_async (/* … */); } Note: This is a GDBus …

On Compiling WebKit (now twice as fast!)

Are you tired of waiting for ages to build large C++ projects like WebKit? Slow headers are generally the problem. Your C++ source code file #includes a few headers, all those headers #include more, and those headers #include more, and more, and more, and since it’s C++ a bunch of these headers contain lots of …

On Python Shebangs

So, how do you write a shebang for a Python program? Let’s first set aside the python2/python3 issue and focus on whether to use env. Which of the following is correct? #!/usr/bin/env python #!/usr/bin/python The first option seems to work in all environments, but it is banned in popular distros like Fedora (and I believe …