Category: Programming

  • Swift to C++

    So having just watched a great webcast from O’Reilly on Swift (and certainly having plenty more to learn): Protocols == Pure Virtuals Generics == Templates Extensions == Class Derivation/Extension/Overloading on steroids Operator Overloading == Operator Overloading, again on steroids. Closures == well, nothing innate, but pretty much same thing as Python Closures Curiously, and I…

    Continue reading →

  • Python – some truth in this…

    I have to say even as a relative newcomer to Python, I find a fair bit of truth in this: https://medium.com/@deliciousrobots/5d2ad703365d/ Working in a non-homogenous (that is, heterogeneous OS) environment where Python 2.x vs. Python 3.x is not guaranteed, the lack of backwards (or forwards) compatibility is problematic. If nothing else it erodes trust in…

    Continue reading →

  • Using LDAP Paged Controls with Python

    Most LDAP servers can be set to return an unlimited number of entries on an LDAP search, however depending on the size of the LDAP database/directory this can possibly exceed your memory. Moreover if you want to write portable code, you probably should not depend on the LDAP server being able to return unlimited entries.…

    Continue reading →

  • Bash TCP programming hack!?

    I had never heard of this until I ran into working on a recent project. In “bash” you can open sockets: exec file-descriptor<>/dev/tcp/IP-or-hostname-here/port so for example: exec 3<>/dev/tcp/192.168.1.100/23 would open port 23 (telnet) to IP “192.168.1.100” for read and write (the “<>”) on file descriptor “3” (remember descriptors 0, 1, and 2 are used by…

    Continue reading →