the blatherings of forivall

stories of code, DIY, music, and (hopefully) geeky romance

The fallacy of “scripted” vs “compiled” languages

Note: adapted from one of my forum posts.

The distinction between compiled and scripted languages should be killed.

My first concern is that the term scripting usually connotes that the task is small. But when entire web frameworks are written in a “scripting” language, one can no longer make that assumption.

In the same vein, people usually compare performance. But when you look at the V8 javascript engine, running what is typically called a scripting language at speeds that are comparable to C#, Java and C++, that comparison is flat out wrong. (1) (2)

Another distinction between compiled and scripted languages is that scripted languages have dynamic typing and compiled languages have static typing. If you want to make that distinction, then say dynamic and static, not compiled and scripted. A programming language is just a way of expressing a certain set of instructions.

And finally, the difference between actually compiling code and interpreting code. Is Java compiled or interpreted? It’s compiled to bytecode, but then that bytecode is interpreted by the JVM. Python (CPython) also uses its own bytecode, and there’s even Jython, which uses JVM bytecode instead of Python’s own. There exists an interpreter for C. There’s a language very similar to Python called Cython that can compile to C code. There’s even a (restricted) Python to C++ compiler.

So, don’t classify languages between compiled and interpreted languages; classify language implementations as compilers or interpreters. (3)

(1) There was a project to get a similar engine running Python, but it ran into some roadblocks, none of which were Python’s problems.
(2) See also on performance: Comparison of calculating the Mandelbrot setfallacy of “It’s Faster Because It’s C” .
(3) Or JIT compilers or whatever.

My collection of zombie power supplies

Here’s my collection of modified power supplies for my laptop.  I lost my original one, so I collected a number of third party power supplies.  The one in the middle was $15 from hong kong and the one on the right was $45 from a local supplier I found on craigslist.  The one on the left is my sister’s.

Basically, what I did was mount 3 pin connectors inside the power supplies (red) and I connected the cable to the other side of the connector (blue), so that I could easily swap cables and fix cables if they’re not working. They tend to break anyways, so I figured I would make it easy to fix.

With my sister’s power supply, since it was an OEM adapter, there wasn’t a lot of empty space inside, so I made a custom part and got it 3D printed in order to mount the socket elegantly (green). Plus, I wanted a more professional job for her.

I got the sockets/connectors from Lee’s Electronics.  I used electrical tape and sometimes heat shrink tubing for insulation. Also, if you need to take apart one of these power adaptors, the easiest way to split it is to take a flathead or chisel, put it in the seam, and tap it with a hammer, all the way around, to loosen the glue on the seam. It should pull apart easily. Better than using a saw.  Also, rather than disconnecting the solder joints on the circuit board, I just soldered together the wires. Since I’m lazy.