I — I don’t even see the code. All I see is blonde, brunette, redhead…

I was holding up on posting until I can say more about PythonForAll (it’s not that I didn’t get out of the building, just that it’s becoming a bit more serious so I can’t publish things before they are final) but I just have to write about this:

matrix-code

For a long time I’ve wanted to code a screensaver showing matrix code, just like the gajillion clones you can already find on the internet, but instead of showing random characters, this one would capture (“sniff”) network packets and show them in encoded form.

The theory is that if you watch this long enough, you’ll begin to “see through the code” – at first, you’ll learn to decode the characters into numbers, and at more advanced stages you’ll learn to parse the network protocols intuitively. I have many reasons to believe this:

  • I’ve seen people learning languages and musical instruments (and experienced it myself)
  • I’ve heard that one of the Samba developers can decode raw NBNS packets in his head (one of the most horrible encodings I’ve seen, see here 1.3.1)
  • I knew someone who could synchronize a dial-up modem with his voice

All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don’t do bad things, we have lawyers.

 

Announcing Wirematrix

Today I saw this HN thread and was reminded of this idea. I decided that the time had come. A night of work later, an alpha version exists and the main feature works well:

If you'll look closely, you'll see that some patterns can be noticed immediately even from one static screenshot

If you’ll look closely, you’ll see that some patterns can be noticed immediately even from one static screenshot

You can get it on github. If you are not experienced with compiling linux software, I advise you to wait for a more user friendly release. Drop a comment saying you’re interested, it will motivate me to create one.

There’s work to do on friendliness of installation and on shininess of visualization. Other than that it’s complete. Python and Cairo rock!

Advertisements

12 thoughts on “I — I don’t even see the code. All I see is blonde, brunette, redhead…

  1. I just had a Geekasm/Nerdgasm! damn this is cool! Sadly, while I am running LInux, I don’t know much about compiling 😦 I don’t suppose you hang out on an IRC channel because I just might dive into giving it a shot any ways!

  2. Thanks for the info. I think I got everything but being the newbie that I am, I’m a loss as to what to do next. 😦 I suspect that I have to run “python3 setup.py install’ or the like to utilize pypcap but after that….hmmm, just noticed you did mention 2.6 or 2.7. I tried the install again (after 3.3 failed) and the install also failed on my 2.6. Yeah….I need a bit of work 😀

    • Hello, just me again. This work has helped inspire me to keep at my learning 🙂 Currently on my 3rd attempt to follow a resource to learn Python (sometimes finding the right learning method is almost as much work as learning to code itself!). So I’ll wait till you have an update that will hopefully make things easier for me to understand/follow along with my new learning too. Heh…yeah….I’m a geek….going to be a good year I think 🙂

      • Great to hear that you’re learning to program. I’ve written here that I consider it a superpower.

        I’d love to hear what you think of different learning resources – I am asked a lot to recommend one and since I’ve lost my ability to be a newbie I cannot judge the options very well.

      • I decided to blog about my Geek experiences, particularly this new programming endeavour. (cosmopolitangeek.wordpress.com). I mention some of the resources I tried and the one I finally settled on (for now). It’s just as much work on HOW to learn as is WHAT to learn 🙂

    • You may need a package called libpcap-dev: http://packages.debian.org/squeeze/libpcap-dev.

      Unpack pypcap.tar.gz, cd into the directory, edit setup.py, replace line 131:
      cPickle.dump(self._pcap_config([self.with_pcap]),
      with:
      cPickle.dump(self.pcap_config([self.with_pcap]),
      run:
      $ setup.py config
      $ setup.py build
      $ setup.py install
      (the last one may need to be sudo setup.py install)

      If there’s still trouble, paste the error here or in a pastebin.

  3. Greetings,

    Ok, so trying to install everything, let’s go down the list to see if I am doing anything out of order.

    – pyopengl: I have glxgears installed and it runs fine so I know regular OpenGL works. Python-opengl is installed. “python-opengl is already the newest version.”

    – py2cairo: “python-cairo is already the newest version.”

    – pyhack: when I run ‘python setup.py build’, I get the following massive amount of error messages: http://pastebin.com/kfGL5Vt8

    – libpcap: I don’t know how to get this. I went to http://sourceforge.net/projects/libpcap/files/?source=navbar, under the files it says “This project has no files.”. Finally ended up on http://www.tcpdump.org/release/libpcap-1.3.0.tar.gz. Unpacked and ran configure, got booted out of it because my ‘lex’ was not good enough. Installed ‘flex’ and tried again. Success. When I ran ‘make’ I got error messages that are beyond my ability to currently understand. http://pastebin.com/QFCmNCiC

    – pypcap: According to the instructions “Just try ‘make'” doesn’t work, I get “make: *** No targets specified and no makefile found. Stop.” but that’s ok(sorta) because I in the next paragraph I saw “If your libpcap installation is…” and considering that libpcap isn’t installed yet, this error message can wait 🙂

    Whew….as the saying goes “I know enough to be dangerous” but not enough to get things truly done on my own just yet 🙂

  4. libpcap: just apt-get install libpcap or the equivalent in your other distro. I guess you’ll also need apt-get install libpcap-dev, see below on how to figure it out when the time to compile and install pypcap comes.

    pypcap: that instruction is a mistake, I gave correct instructions in my April 8, 2013 at 8:13 am comment.

    pyhack: try installing http://packages.debian.org/squeeze/python-dev first (apt-get install python-dev), and also http://packages.debian.org/squeeze/libx11-dev (apt-get install libx11-dev) and http://packages.debian.org/squeeze/mesa-common-dev (apt-get install mesa-common-dev). I figured this based on the errors: I saw lines saying error: HEADHER.h: No such file or directory, so I knew you were missing development headers for something (which are a package whose name ends with “-dev” that contains .h files needed to compile programs based on a library or program, in this case X and Python). Then I googled for debian HEADER.h and found which headers package it was in each case. This is applicable most times you get such an error.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s