Daniele Esposti's Blog

For loops in Windows command line

I’m working on a script on Windows to automatically install Python packages listed in a text file like pip does. Because easy_install doesn’t support a requirements.txt as a packages’ list I made a small Batch file to simulate the pip’s behavior, and I discovered the for loop of Windows’s command...


Distribution of wealth in a society of equals

In this blog I usually write posts related to information technology, but I stumble upon this post on NoiseFromAmerika (an italian blog about politics and economics) and I was surprised about how a concept backed by the common sense it’s so wrong when it’s analysed with scientific method. I made...


Multiple prefixes match

I’m not using often string manipulation (I usually handle SQLAlchemy’s queries and sometime XML/XHTML manipulation with the lxml library) but sometimes I need to analyse some paths expressed with a dotted notation comparing every path with a predefined list of path prefixes. The obvious solution is to compare in a...


Disassembly C code for fun – Part 5: if statement

Time to disassembly the if..then conditional statement. I’ll say in this post will be not exciting like the previous ones (except when we’ll disassembly the optimised code) but the if..then block is one of the base statements of every language so it’s important to know how it’s translate to assembly...


Disassembly C code for fun – Part 4: floats and SSE2

Today we look at the disassembly of a functions involving floats and SSE2 instructions. As I stated in the first post Disassembly C code for fun: part 1 the C code is compiled for a x86-64 architecture which means the CPU has the SSE/SSE2 instructions sets by default. The code...