HN user

Oatmeat

44 karma
Posts1
Comments11
View on HN

I was able to do it with my jeans, so I expect it's possible with any trousers. You should note that the inversion is not symmetrical. You are basically pulling one pant leg into the other one. In the end you are left with one pant leg which is inside-out and straight and the other pant leg is inside of the first.

The inversion of the parameters is now noticeable. You started with basically a donut with a very wide hole (formed by the pant legs -- I'm ignoring the hole where your waist goes). After the inversion, the pant legs form a donut which is very narrow (just the width of the inside of the pant leg) and is very tall (the height of the pant leg).

The program is drawing on a grid 9 wide by 10 high. The loop is going over each space in this grid. It puts a * in each cell that falls within the equations described by the four inequalities. Here's a slightly more simplified version.

    int putchar ( int ) ;
    
    int main ( void )
    {
        int z;
        int width = 9;
        int height = 10;
    
        for (z = 0; z < width * height; z++)
        {
            int x = z % width;
            int y = z / width;
    
            putchar (
                x + y > 3 &&   /* top left */
                x + y < 14 &&  /* bottom right */
                y < x + 6 &&   /* bottom left */
                y > x - 5      /* top right */
                 ? '*' : ' ' );
    
            if (x == width - 1)
                putchar ( '\n' );
        };
        putchar ( '\n' ) ;
    
        return 0;
    }
It would be clearer to separate the main loop into nested loops for x and y, but I've left it as is to show a closer resemblance to the previous version.

The fun part is that you can now play with the various settings. Try increasing the height and width and scaling the equations appropriately. Replace x by 2 * x or x * x for more interesting shapes. You can bound the picture by any equations you like. Example: http://ideone.com/53Qh3

Just exercise 3 times a week and eat more or less than your calorie needs according to what you're trying to do.

Right, eat less if trying to lose weight and eat more if trying to bulk up. But what if you are trying to lose fat and gain muscle?

From the article it appears that in "rechtub klat" the letters in a word are reversed, but the words have the same order in the sentence. So it would be:

  "gniog ot yrt siht tuo txen keew"

Thanks for the reply.

Regarding the push command, it currently does not allow both the --all and --tags options to be used together (very strange).

Regarding not pushing temporary branches, this seems contrary to one of the reasons I started using git: it makes branches cheap and easy to throw away when you are done with them.

I can understand the way git works regarding each developer using only the branches they are interested in, but I can't seem scale this philosophy down to a single developer. I want all my working copies to be the same. I want new branches to propagate. I want branch deletions to propagate.

I've thought about scripting some of this, but for some pieces I am not sure how to proceed. Consider branch deletion. The problem here is that I can delete the branch from the main repository, but that doesn't force deletion for each of the clients. Instead, I would need to write a custom "git pull" style command that I run in a working directory before I start my work. Should this command delete all remote branches so that actual deletions are propagated, and then "git pull" restores the remote branches which still exist?

[edit: I've discovered that "git remote prune" will delete remote tracking branches that are no longer in the repo]

Don't other git users have this issue? Presumably there are others who work from more than one location and want a consistent view from each, yet I can't seem to google for any help on these issues.

I'm a single developer who has recently switched from subversion to git and I'm having a few problems adjusting. My setup is that I work on my code from various places (home, laptop, school) and I want to a consistent view of my code from each place. That is, if I create a git branch at home and write some code in it, I want to see that branch right away when I start working from school.

Right now, I have a main server set up where I push my changes to after finishing work for the day. But now suppose I create some new tags and branches. I need to do

  git push --all
  git push --tags
Then when I start working from a different location next time, I do
  git pull
  git checkout --track -b <new-branch> origin/<new-branch>
Where I have to do the last command for each new branch that I want to see in my working copy. Things are even worse when I want to delete a branch (after having merged it into the mainline). I do
  git branch -d <branch-name>
  git push origin :<branch-name>
And this will remove the branch from the local repository and my main repo, but at each of the other repositories I still need to delete the remote tracking branch.

Does anybody know a way to simplify this workflow with git?