Radio Information Unavailable

Armagetron Servers

Turbo Teamplay: No players online
Brakes: No players online
Flynn's Arcade Network:
1 players online

Welcome!

Greetings, Programs! Welcome to Flynn's Arcade! Here you will find my random musings on life and technology, as well as various interesting computer projects of mine. The name of my site comes from the 1982 sci-fi classic TRON. I am a huge fan of the movie and of classic video gaming and computing. As such, the Flynn's Arcade Radio stream plays various original and remixed music from those bygone days, as well as some of the best newer video game and chiptune music. I also host quite a few Armagetron Advanced servers to help carry on the spirit of classic gaming and serve the TRON community.

C10ud


Google Voice as a home phone
Written by C10ud   
Thursday, 03 December 2009

If any of you follow me on twitter, you may remember that I successfully set up an Asterisk server at my home and used it in conjunction with Google Voice as a home phone system. I also promised that I would provide documentation on how I set it up. After much delay, I have finally completed the documentation. You can download it as a PDF here .

Be first to comment this article | Quote this article on your site | Print

 
Thanksgiving break is here!
Written by C10ud   
Wednesday, 25 November 2009

HAI

Ahh, after many months of anticipation, I am now officially on thanksgiving break. As is my custom, I am statying with relatives. Unfortunately, my good college/programming buddy that normally stays with me couldn't make it this year. Last year we had an awesome time programming our final project for the assembly language course we were taking-- a game of PONG!

Good times... in fact, I had so much fun developing a moderately-sized project over a few days, that I decided to make it a thanksgiving tradition. I had a few ideas spinning around in my head last week, and I am pleased to announce that I have finally decided on one-- an implementation of LOLCODE ! I am going to work on this for the next few days and post my code when I am done. It will be an interactive interpreter, written in Python, with the help of the PLY module for yacc/lex functionality. I have never implemented a language before and it is one of those things that every computer geek should do at some point, so I think this will be both a profitable and fun project.

I hope you all have an awesome thanksgiving :)

KTHXBYE

Be first to comment this article | Quote this article on your site | Print

 
Another Awesome way to Optimize Python
Written by C10ud   
Tuesday, 27 October 2009

This semester I am building an 8086 microprocessor simulator as a project for one of my computer science classes. We were given the freedom to choose whatever language and other programming tools we wanted so I chose Python. By using Python I have been able to come up with some absolutely beautiful, dense code. For example, I have one method that is called after an arithmetic instruction to determine the status of the various flags. One of the flags that can be set is the parity flag. It is set if the lower 8 bits of the result contain an even number of one bits. This can be accomplished in one line of Python via a construct borrowed from functional programming known as a list comprehension:

 

[extract_bits(value, i, 1) for i in range(8)].count(1) % 2 == 0

 

While many features of Python such as this are almost as efficient as the equivalent code in C, others are not. Upon profiling my code, I discovered that a large amount of time was spent in a function I had written to simulate primative integer datatypes (so that things such as integer overflow could be properly simulated since Python uses arbitrary precision integers). The slowdown was unacceptable so I sought for alternative ways to speed things up while still writing the bulk of my code in Python. After many days of experimentation and searching, I found an excellent solution: Cython.

 

Cython allows you to keep almost all of your Python code (except for lambdas... grrr...) and optimize it using several techniques such as static typing, and then compile it to a C module. I was able to make most of my code use static types (such as C integers) where appropriate by adding Cython declarations. As a benchmark of performance, I used an object file that causes the simulator to run about 450,000 simple 8086 instructions. By the time I was done with my optimizations (and I'm sure there is still room for more), my simulator was able to finish in about 13 seconds on average. This is a tremendous improvement over the 34 seconds that it took the pure Python version, and my code didn't have to change very much at all. I highly recommend it if you are considering writing a Python C module and don't have a whole lot of time. It will not generate code that is as optimized as a human writing in C (at least not yet), but it sure saves a whole whackload of dev time.

Be first to comment this article | Quote this article on your site | Print

Last Updated ( Tuesday, 27 October 2009 )
 
Oops, I Just Deleted the Wrong Partition!
Written by C10ud   
Sunday, 18 October 2009

First off, let me say, I am not dead. I just happened to let this site stagnate over the summer :( I'll try to post something once a week for the rest of the semester.

 

Anyways, so the other night I was in the computer lab and one of my buddies' laptop's USB ports was acting funny so he asked me if I could format an external hard drive for him. It sounded simple enough so I just plugged in the drive, fired up gparted, and hit delete a couple of times and sent it off to work. I noticed that it never deleted the last 2 partitions and showed them as locked as if they were mounted or something. I was puzzled for a few seconds and then noticed a popup informing me that "Macintosh HD" had been unplugged (I dual-boot kubuntu on my MacBook). Then I realized what I had just done. I erased the entry for my MacOS partition! ack!

 

Fortunately I'm a geek though. I may have been stupid enough to erase my partitions, but I was also smart enough to get them back. After a bit of research I discovered that parted has a nice rescue option! So, I printed out the partition table (using the "print" command), and then typed rescue and supplied the beginning of the unallocated space and the end of the unallocated space as the bounds for the search and parted was able to recover my partitions! In retrospect, I am extremely thankful I didn't blindly continue to format the drive :) I hope this information ends up being useful to someone someday. Thanks for reading.

Be first to comment this article | Quote this article on your site | Print

Last Updated ( Tuesday, 27 October 2009 )
 
Python Vorbis Comment Parser
Written by C10ud   
Tuesday, 07 April 2009

So, I was working on a re-write of icesDJ, a DJ interface to ices (allows for playlist manipulation and such), and I decided to do it in Python. The basic idea is that ices will call one of my scripts, songpicker.py, which will spit out the next song to play based on 1) DJ Requests (highest priority), 2) User requests (second priority), and finally 3) Random selection based on user ratings. My dilemma was that the ratings and requests are stored in a database, but I didn't have a way of mapping between song titles and the file names they correspond to. What I wanted to do was to go through the media directory periodically and populate the database with the tag data from the files, but was extremely disappointed to find that there were very few Python vorbis libraries of any sort and the ones that existed depended on multiple other libraries. Once I finally got one to build, it crashed upon importing the module.

 

So, what do I do when I'm fed up with existing software (or lack thereof) and not feeling like doing my (boring) schoolwork? I go write some code! After deeply meditating on the Vorbis file specification's header section for a very long time I finally realized how simply the header was setup. Armed with my trusty (not so) dusty hex editor, I opened up an ogg file, played around with my ideas in the Python interpreter, and soon came up with a working function that will read any ogg/vorbis file and extract the comment header information as a dictionary. The code is pasted below for the benefit of whoever may need it. (Yes, I realize it is somewhat inefficient and I will add stuff later to only read in the necessary header info).

def getVorbisComments(filename):
  '''
    Parses the given input file and returns the vorbis comments as a dictionary
  '''
  comments = {}
 
  fp = open(filename)
 
  # Read in the file
  data = fp.read().split('vorbis')[2]
 
  fp.close()
 
  # Read in the length of the first field (vendor string)
  fieldLen = int(''.join([str(ord(c)) for c in data[3::-1]]))
 
  # Remove the first field (vendor string)
  data = data[fieldLen+4:]
 
  # Read in the length of the comment fields
  numComments = int(''.join([str(ord(c)) for c in data[3::-1]]))
 
  # Remove the comment field length data
  data = data[4:]
 
  # Read in the comment fields
  for i in range(numComments):
    fieldLen = int(''.join([str(ord(c)) for c in data[3::-1]]))
    fieldData = data[4:fieldLen+4].split('=')
   
    comments[fieldData[0]] = fieldData[1]
   
    data = data[fieldLen+4:]
 
  return comments

Be first to comment this article | Quote this article on your site | Print

Last Updated ( Tuesday, 27 October 2009 )
 

Radio Top 20 Tracks

1. Anamanaguchi - Video Challenge

2. Aurasil - Yie ar kung fu

3. Bit Shifter - Hexadecimal Genome

4. Bit Shifter - The Information Chase

5. DJ Mitch - Noisy Pillars (Ibiza Sunset Mix - Remastered)

6. FFmusicDJ - HiddenPalaceFuture

7. Final Fantasy 7 A World of Piano OC ReMix

8. Final Fantasy 8 EyesOnMe(NotFayWong) OC ReMix

9. Hadyn - PartyInTheEmeraldHills

10. Lagerfeldt - Angel (Merry X-Max)

11. Lagerfeldt - Sweet (My Sun Shines On)

12. Random - Spontaneous Devotion

13. Rayza - Sonic the Hedgehog Green Hill Zone (Euroclub '95 Mix) OC ReMix

14. Saberpulse - Hey Kate

15. She - Nebula

16. She - Pioneer

17. Sonic 3D Blast Snow OC ReMix

18. Trance-Canada - Sonic the Hedgehog 3 Ice Attack OC ReMix

19. USK - Little Sound Disko04

20. USK - Little Sound Disko05

FreeBSD Logo
up 155 days
(C) 2007 - 2013 Flynn's Arcade
Joomla! is Free Software released under the GNU/GPL License.