Tuesday, April 3, 2012

Installing Subversion 1.7 on CentOS 5.5

Installing Subversion 1.7 on CentOS 5.5

Let me start by saying the least rewarding part of my job is sysadmin. While I remember hacking out makefiles for c and c++ programs back in college, much of what glues a system together is total black box to me. After nerd raging for a while I finalllllyyyy got my CentOS 5 VM to do what I want, and since I hate for this knowledge to go to waste...

First, I followed superlinuxadmin's tutorial which I will recap only the commands of. For the full article check here:


svn --version #Lets check which version we have now
yum remove subversion cd /usr/local/src/
wget http://apache.tradebit.com/pub/subversion/subversion-1.7.2.tar.gz #got this from http://subversion.apache.org/download/ on the recomended download section
tar zxf subversion-1.7.2.tar.gz # Make sure you use the same filename from the previous step
cd subversion-1.7.2
wget http://rahulsoni.me/files/apr-util-1.3.12.tar.gz
wget http://rahulsoni.me/files/apr-1.4.5.tar.gz
tar zxf apr-util-1.3.12.tar.gz
mv apr-util-1.3.12 apr-util # When using ./configure it will look for these files by default on a folder without version number
tar zxf apr-1.4.5.tar.gz
mv apr-1.4.5 apr # When using ./configure it will look for these files by default on a folder without version number
./configure

Got the same error he did

checking sqlite library version (via header)... unsupported SQLite version checking sqlite library version (via pkg-config)... none or unsupported 3.3 no An appropriate version of sqlite could not be found. We recommmend 3.7.6.3, but require at least 3.6.18.

Applied same fix:

sqlite3 -version #check current version
wget -q -O - http://www.atomicorp.com/installers/atomic | sh # To install Atomic repository
yum --enablerepo=atomic upgrade sqlite
sqlite3 -version #you should get the 3.7 version listed now

Tried to reconfigure as he did...

./configure make make install svn --version # Now you should see the latest version

But got...
checking zlib.h usability ... no
checking zlib.h presence ... no
checking zlib.h... no
configure: error: subversion requires zlib

Bummer. Thank god for helpful hackers over at the svnforum, this post from vumaravi helped:


Slightly modified from that, from the subversion source directory...

wget http://zlib.net/zlib-1.2.6.tar.gz #version may have changed, check site
tar xvf zlib-1.2.6.tar.gz
mv zlib-1.2.6 zlib
cd zlib
./configure --shared
make
make install
cd ..
./configure CPPFLAGS="-Izlib/ -Lzlib/"

Finally made it through the configure with only a warning! Hallelujah!

make
make install
svn -version

1.7.4! Happy :)

Now after an hour detour, back to real work....

Thursday, September 1, 2011

Developing HTML5 games with ImpactJS

Recently I landed a gig to make 38 minigames in HTML5/javascript. Despite the impossibility of the timeline and the paltry pay, I took it on because... well, I love games and HTML5 is the hotness right now. Plus it finally gives me something to talk about in my blog. Here begins the chronicles of a lowly programmer's journey into the unknown. There will be frustrations, triumphs, tears and lots and lots and lots of debugging. So let's begin.

My first task was to choose a base. I looked over every js game engine out there and even dabbled a bit in WebGL. In the end I chose ImpactJS for several reasons. First, at the time of this writing it's the only javascript game engine in stable release. The Aves engine and Rocket Pack got bought out, Isogenic is too expensive, and none of the rest seem to have solid communities. So I saw ImpactJS reviewed in Game Developer Magazine and jumped on it. I must say, it's been very impressive for prototyping. My only two concerns at this point is that not much has been done with it and there's no scene graph. Most of the games in the engine's forums are clones or very simplistic. None of them come close to what my client has envisioned for these 38 minigames, which will have a top down view with controllable sprites. But, I played with ImpactJS for about 3 hours and had a little warrior running around, crashing into stuff and collecting treasure, so I think I made a good bet.

The other thing ImpactJS offers over other html5/javascript engines is that it has a framework. There's no guessing about where this or that file should go, Impact is simple and tells you exactly where you need to put everything. Entities go in the entities folders. Assets go in the media folder. Levels go in the levels folder. Easy. Plus Impact has been proven to run on mobile devices and a couple of developers, including Dominic, the creator and steward of the project, have converted their games to native iPhone apps!

The short of it: I begin my journey with a solid footing. Next time I'll talk about the games as much as my NDA will allow and some of the challenges/solutions that only a coder would think about when taking direction from creative types.

Friday, December 3, 2010

Of spoken words

"He had had such things said to him so many times that none of them had any freshness for him. Emma was like all his other mistresses; and as the charm of novelty gradually slipped from her like a piece of her clothing, he saw revealed in all its nakedness the eternal monotony of passion, which always assumes the same forms and always speaks the same language. He had no perception - this man of such vast experience - of the dissimilarity of feeling that might underlie similarities of expression. Since he had heard those same words uttered by loose women or prostitutes, he had little belief in their sincerity when he heard them now: the more flowery a person's speech, he thought, the more suspect the feelings, or lack of feelings, it concealed. Whereas the truth is that fullness of soul can sometimes overflow in utter vapidity of language, for none of us can ever express the exact measure of his needs or his thoughts or his sorrows; and human speech is like a cracked kettle on which we tap crude rhythms for bears to dance to, while we long to make music that will melt the stars."

- Gustave Flaubert, Madame Bovary

Thursday, December 2, 2010

Art

"Habitualization devours work, clothes, furniture, one's wife, and the fear of war. "If the whole complex lives of many people go on unconsciously, then such lives are as if they had never been." And art exists that one may recover the sensation of life; it exists to make one feel things, to make the stone stony . The purpose of art is to impart the sensation of things as they are perceived and not as they are known. The technique of art is to make objects "unfamiliar," to make forms difficult, to increase the difficulty and length of perception because the process of perception is an aesthetic end in itself and must be prolonged. Art is a way of experiencing the artfulness of an object; the object is not important."

- Viktor Shklovsky, Art as Technique

Wednesday, November 17, 2010

Debugging

"The word bug has been used to describe an 'object of terror' ever since the fourteenth century. Rear Admiral Dr. Grace Hopper, the inventor of COBOL, is credited with observing the first computer bug - literally a moth caught in a relay in an early computer system. When asked to explain why the machine wasn't behaving as intended, a technician reported that there was a 'bug in the system,' and dutifully taped it - wings and all - into the log book." -Hunt, Thomas, The Pragmatic Programmer

Sunday, November 7, 2010

Non Language

"Two people are talking together. They understand each other, and they fall silent - a long silence. This silence is language; it may speak more eloquently than any words. In their mood they are attuned to each other; they may even reach down into that understanding which ... lies below the level of articulation. The three - mood, understanding, and speech (a speech here that is silence) - thus interweave and are one. This significant, speaking silence shows us that sounds or marks do not constitute the essence of language. Nor is this silence merely a gap in our chatter; it is, rather, the primordial attunement of one existent to another, out of which all language - as sounds, marks, and counters - comes. It is only because man is capable of such silence that he is capable of authentic speech. If he ceases to be rooted in that silence all his talk becomes chatter."

-William Barret, Irrational Man

Thursday, September 2, 2010

The birth of the internet

Well, not really, but still pretty cool is this old recording from Stanford. This isn't quite the internet as we know it, but it's the first public announcement of a number of technologies that birthed what I'm using right now to type, upload and publish this blog to you. Some highlights are

Clip 11 - Doug talks about why an online system is useful.. I can't think of any reasons..
Clip 12 - The introduction of the Mouse and his pointer friend 'bug'
Clip 15 - The hardware running the NLS and generating the performance for the audience. This isn't quite the dawn of personal computers... that comes in the mid-80s.
Clip 25 - Two mouse pointers collaborating, reminds me of the recent mouse demo of node.js
Clip 30 - Doug describes two systems being used. One - the hardware system that runs everything - and two - the logical system that is used to organize and relate data in human terms.

The NLS online system project at Stanford

Big thanks to @d33rheart who came across this gem in her digital art class and saw instantly that it was in my taste.

Thursday, August 12, 2010

Web Comics



Above, a strip from Married to the Sea.

Web Comics. Bite sized entertainment. Sometimes witty, occasionally insightful, always ridiculous. Need there more be said?

Favorites:

Wondermark
Married to the Sea
XKCD
MS Paint Adventures

and the daddy of all, Ryan North's magnum opus:

Dinosaur Comics

(if you Google his name and stalk him via image search you come across ROFLCon, best Con evar)

Wednesday, August 4, 2010

Mini game demo with jQuery and HTML(5)

I was inspired by Dextrose's Aves engine and a Google Tech Talk by Paul Bakaus to play around with HTML5/javascript to build a little game. Paul is spot on when he says the technology is ready for it, and because HTML was built to be visual and javascript is event oriented, the wedding of the two is surprisingly efficient for game creation.

Here's a little mini-game I whipped up over the course of a few hours.

To play, click the board to move your defender. Stop the 'invader' balls from reaching the yellow ball (the mothership) by running into them. Reload the page to play again.

http://www.clumsyfingers.net/projects/game/tableit/index2.php

This will not work on non-HTML5 capable browsers. You will need the latest Firefox, Safari or Chrome. As of this writing IE does not support HTML5.

I'm hoping to take this idea further and possibly build a light-weight engine around it (using my limited game programming knowledge from college). It doesn't work well on the iPhone 3G (which the game board was sized for), so optimization and usability are still significant (and interesting) challenges to deal with in making js/html5/css a viable option for multi-platform development.

Monday, August 2, 2010

jQuick Note

$('#idofdiv').function();

is the same as

var obj = document.getElementById('idofdiv');
$(obj).function();

Monday, July 26, 2010

RT @futilitycloset "Do-Gooders"

From the Futility Closet:

In 1978, as part of an initiative to adopt gender-neutral language, the city council of Woonsocket, R.I., dubbed its manholes “personholes.”

After two weeks of national derision, they changed their minds.

Time reported, “The council members voted to go back to manholes, indicating that it will be a long time before a person-person delivers Woonsocket’s mail.”

Monday, July 12, 2010

Firefox's Tab On Top Delimma

An interesting video was recently posted on Surfstation that explores whether Firefox should leave tabs as they are or move them to the top of the window as in Chrome or Opera. The video also gives sneak peaks at some of the new features planned for Firefox 4. Looks impressive!

Click here for the video

It doesn't matter to me whether tabs are on top or bottom, though with the shift from larger screen size to more portability, anything that saves head room is a plus.

Saturday, July 10, 2010

Merging folders on a Mac

If you're uninitiated in the Mac world, folder moving or copying on OS X doesn't work quite the same as it does on Windows. Since everything in a Mac is treated as an object, you can't, via Mac's native file manager, Finder, merge two folders as one. This presents a real problem when you're using a framework that involves, say, plugins. You've got to go to each folder's bottom and copy files in one by one... tedious?

The way around this isn't too bad, though if you've never been exposed to Linux/Unix it can be tricky. Since Mac's are built on top of Unix you can use the Terminal's cp or mv command to get the desired result (you can find the Terminal in your Applications folder). The syntax looks something like this:

cp -R [path of folder to copy] [path of destination folder]

In the above the -R stands for "recursive" and is needed for folder copying. The move command is similar, just replace 'cp' with 'mv' and remove the '-R', optionally replacing with with '-v' which will display all the files names as they are moved:

mv -v [path of folder to move] [path of destination folder]

If you're not sure how paths work, navigate to your folder and Command+click, choose the "Get Info" from the pull down and look for the text beside the "Where:" label.

Windows 7 now gives three options on a folder move: replace the folder altogether, merge the files, or cancel the action. C'mon Apple, pick up the slack? How hard can it be to tie the Finder's folder move/copy operations to the Unix commands?

Thursday, July 8, 2010

Transformice

At GDC this past year I saw a presentation about how a collection of simple physics objects could be connected to create an entertaining game. At the time the presenter had some great pieces but nothing to put them together with. Well, it looks like he figured it out, because Transformice, a French game in which players compete (or sometimes cooperate) as mice to bring cheese to a hole, blends this mechanic with a multiplayer element that makes it a strong candidate for the 2010 Game Developer's Choice Awards. The controls are a little wonky at times, but the unpredictability of the game ensures a level of fun that's near perfect. A strange behavior emerges when you put a bunch of humans in the bodies of rodents and present them with obstacles - they begin to behave like mice. More than a game, Transformice is an experiment that gives insight into just how much we share in common with our little furry friends.

Warning, this is NSFW - you might not get anything done for a while after checking out this highly addictive game.

http://www.transformice.com/en

Tuesday, March 9, 2010

Rapid Prototyping with RevRun

In San Francisco for GDC '10 and taking a break from sessions after Microsoft gave me flashbacks of graphics class in a talk on block compression methods in texturing. Ouch. So far this GDC has been a significant improvement over the last. Not sure if the economy's pickup, better planning, or the free Google Androids are to blame, but the whole sphere is teeming with eagerness, the air electric in anticipation.

While on the plane I fiddled around for about 3 hours with a new language called Revolution (the IDE is called RunRev). It's a GUI prototyping language that boasts a more "human" syntax. My conclusion: RunRev is a cross between Visual Basic and Python that's good for prototyping but not yet ready for the mainstream. As always, the good before the bad.

A list of stuff Revolution is good at:

  • it's really fast to get a handle on

  • it has a pretty GUI system with an intuitive script flow

  • it can toggle between build and run-time mode fluidly

  • it has plans to launch a Mobile converter that will address Android, Blackberry and iPhone



Why Revolution isn't ready:

  • It doesn't have a very robust or complete API. For example, it has a datatype called "point" which is any two numbers in a certain context separated by a ,. While there were a lot of functions built around the manipulation of the point, I could not for the entire 3 hours find some way to extract the x or y coordinate specifically from this basic datatype. If I wanted to do that I'd have to create and maintain custom Point object.

  • The language itself was a headache to learn because it intentionally tried to break a lot of the conventions programmers are used to. This was to give it a more "human" syntax, but it really just frustrated things in a lot of places.

  • The IDE itself failed more than expected.. often I couldn't open windows and had to restart.



So, here's the little sample game I built(you'll need the plugin). To play click "restart". A ball will enter the screen. Click the screen near the ball and it will change the ball's direction. Your objective is to get the ball into the hole.

The original idea was to have the ball bounce to a direction depending on the angle it hits the pointer at (the pointer representing a finger on the iPhone), but because I couldn't extract the necessary information it just bounces in a random direction.

Verdict: Revolution is a decent prototyping language, but there are better ones out there, and it's not yet ready for full scale production usage. I'll stick with Flash for iPhone and C++/Java for Blackberry/Android, perhaps visiting Revolution from time to time.

Saturday, March 6, 2010

Math

Mathematics is the science of drawing relationships between quantifiable entities. i.e., x^2 + y^2 = h^2 is a discovered formula for finding the width of sides in a triangle (or triangular object, such as a wedge or ramp). It does not necessarily mean it is the only formula, but in theory, any formula intent on finding the width of 3 sides of a triangle using the other sides as components could, through mathematical operations, derive the above formula.

Now, if someone can explain to me the usefulness of integrals, I would really appreciate that.

Thursday, March 4, 2010

Morning Roast

So, a webcam, as we all know, is that thing that sits on top of your computer that records your pretty face and sends it shooting across the interwebs to various chosen (and some unchosen) destinations. In our office it's used as a mirror that peaks over our head to let us know who's walking around behind us (we live in cubes), necessary as it's good feng shui to always have your entrances visible.

As with many things in the early tech world, the webcam started as an in-house tool for computer engineers. A regular camera's feed was sent over the local network at the University of Cambridge and provided a little 128x128 live update to monitor a coffee pot in what was deemed the "Trojan Room". The Trojan Room was far away (probably two doors down or so) from some programmers and the web cam provided a quick way to see if the pot had coffee or not to determine if a trip would be worthwhile. Read some more about it here.

Wednesday, February 24, 2010

Settling Catan

The other night a friend invited me over to play Settlers of Catan, a game recently heralded by the Wall Street Journal as the new golf of Silicon Valley.

The game started out simply enough - place some settlements, roll some die, get some resources, build some roads, etc. etc. - but by the end it was a cut-throat race to the last "victory point" and key goals were as varied as the ways Google sucks. The stages of play are ingenious. At the start of the game everyone was hot and bothered to expand with roads. In the middle of the game there was a widespread sheep shortage, so much so that whenever someone rolled a 3 "Sheep!" was called and a hearty swig of beer was enjoyed by all. By the end of the game only one player could even hope to expand his road system (and 20 sheep wouldn't fetch 1 resource in any market) and we were all working on different strategies to get that one last victory point.

I won't continue to praise how well thought out Catan is because there are num er ous sour ces +1 that do this already and I am too far behind the trend to claim foundership. All I will say is that it will soon have a place on my shelf for any friends who are looking for an hour or so of mind stretch and a good time. I'm thinking of going with the more God fearing, Settlers of Canaan, version.

As an aside and nod, the game was invented by a German dentist, Klaus_Teuber who also invented a slew of other award winning german-style board games.

Sunday, February 21, 2010