Declartion

And/Oh welcome to this world, have as much fun as you would like while helping others have as much fun as you are having. Be kind to those you love, and be kind to those you don't. But for Gods sake you gotta be kind, and respectful because we're all one soul. Be the best fucking human you could be!
Today, I the author am declaring my intention to live. I'm tired of my jello-y existence. I am going to love freely. Lavish compliments. Help everyone.

I will shine these words on my mind forcing negativity and criticism to crumble at conception. Let the waves of cynicism surrounding me go no further; sink them, squish them, and combust them into midnight bike rides, shouts of exuberance, impassioned fucking, and tottering piles of chopped vegetables!

When I find my resolve threatened I will turn to my own ingenuity and rummage through the junk drawer of my existence determined to find the improvised implements necessary to carry out these words.

I am strong; but I will need your help.

Sunday, February 21, 2010

Instant Feedback for C Programming in Nano

I learned to program using python. Therefore the method I follow for learning is very experimental, I type in a bit of code, see what happens, tweak until its right then incorporate it into the larger program. With the interactive interpreter, this is easy, and can be accomplished in quite the rapid fire fashion. When I started learning C I wanted something similar, so I figured out a fine little one-liner that I was running in a split of a screen session that I had my editor running in.
gcc -x c - < hello.c; ./a.out
I came to notice that gedit has an 'External Tools' plugin which lets you execute commands in a window within the editor. So I created a tool that with one keypress will compile and execute whatever is currently on screen (saved or not). This works well for my purposes on testing non-interactive code.

To set that up in gedit;
Edit>Preferences>Plugins, Enable 'External Tools'
Tools>External Tools>New
Commands:
#!/bin/sh
gcc -x c - -o $HOME/.tempc;
$HOME/.tempc
rm .tempc
Input: Current Document

Fun!

0 comments: