Migrating and remerging perforce histories into git with git grafts
I recently migrated a perforce project to git. The perforce project had some branches, but the git-p4 script sucks with branches. (Well, it's really perforce, but I digress.) Anyway, as a first step I got all the branches from p4 in to the git repo as totally separated branches.
$ git-p4 clone //open/dev/@all project
# 'open/dev/' becomes the new 'master'
$ cd project
$ git-p4 sync --branch=dy //open/dy/dev/@all
I repeated the sync command for the rest of the branches. So now I had everything, but if you looked at a graph of the git commit history you would see four "swim lanes" for the four branches, each completely separated from the other. Naturally we made integrations on the perforce side to merge things together, but git-p4 sucks at detecting that. After some trial I finally got most of those integrations back. (Some integrations were from branches we're not migrating into git so they sort of just pop into existence.)
See Full Post and Comments
Removing crap from a git repository's history
When I google "git remove from history" (because I frequently forget the exact sequence of commands as I don't have to remove history very often), this is the first result. It almost works. Don't use it, use the second result. (To further be in favor of the second link, the first is from 2009, the second is from github itself and they're pretty good at keeping their material up-to-date with recent gits.)My current git version is 1.7.3.4; not the bleeding edge, but if you're using 1.7 at the end of 2011 you're generally in good shape. Anyway, the "I don't know, I don't wanna know" version to getting rid of crap you don't want with some commentary in between:
$ du -sh .git
946M .git
See Full Post and Comments
Is this really going down? God is not great?
So this is trending on Twitter:(Reactions from confused theists are hilarious.) Apparently it's due to the recently deceased Christopher Hitchens' book of the same title. I wonder how long this trending topic will last...
See Full Post and Comments
Thoughts On Immortality, Cryonics
"Remembering that I’ll live forever is the most important tool I’ve ever encountered to help me make the big choices in life. Because almost everything – all external expectations, all pride, all fear of embarrassment or failure – these things just fall away in face of endless time, leaving only what is truly important."--The immortal Steve Mobs
People say a lot of nice things about death. Even atheists who should know better. It's depressing. An immortalist can often counter those things directly, trying to argue why in fact they're not nice, but there are other roads one can take.
An elevator pitch against them all is: "suppose there was a civilization much like ours, only no one died from old age or sickness because their medical technology was pretty advanced. (Some still died from suicide or catastrophic accidents but those were rare and decreasing every year.) Do you think they would want death around ages 70-90 forced upon them like we currently have?"
See Full Post and Comments
A basic application of logarithms
You may have noticed I finally made my tag cloud an actual cloud with different font sizes based on how many posts per tag. This has been on my todo list for over a year. Why did it take so long for me to get around to it? Probably because it was so simply boring. Boring work gets put off.Anyway, the "secret" of my implementation is just taking the natural log of the total posts for each tag, then rounding to the nearest integer. I then subtracted that number from 5, and made the resulting number the <hX> number for a header. (With <h1> being the largest size.) (I also used the number 4 as a max for the rounded log result in case it was bigger.)
The log approach was the first idea I had over a year ago for how to implement it, and the results don't look too bad. One downside is that as tag counts approach 33 (about e^3.5), suddenly they'll all start receiving the biggest size of text. To counteract that, one solution is to increase the log base from e to 3 (needing 47 posts to get the biggest font) or even 4 (needing 128). A tiny bit of manual work every so often, it's not bad. There was another solution I thought of but didn't try, but it would keep me from needing to do manual work.
See Full Post and Comments
Knowledge Basilisks
I've been somewhat curious about knowledge basilisks for the past year or so. They're downright scary. The idea is that there are some pieces of knowledge, true or false, that hurt or even kill you and/or others around you just by learning them. I almost discovered one a year ago and fortunately had the sense to turn back before it was too late. I didn't look the basilisk in the eye but I could feel it in the room.Naturally, this is at odds with my tendency to view acquiring true beliefs and knowledge as a good thing.
Basilisks are a strict subset of knowledge that has unintended consequences. Sometimes you learn something that ends up making you better. Sometimes it has an effect that's hard to judge on the good or bad scale, but is nevertheless there. The whole field of psychological priming is an example of that.
See Full Post and Comments
Some grounding for protests
I happened to catch a radio interview several days ago with the 84-year-old lady who got maced by the police in Seattle. Her responses were alright, surprisingly lucid for her age, but she fumbled on one issue and eventually hung up. The question was along the lines of "What gives you the right to block these main roads and cause people sometimes really emotional inconveniences?" The example was a caller who called in earlier complaining that he missed his daughter's piano recital because he couldn't go anywhere in his car.The woman first responded "Well what else are we supposed to do? How else are we going to get attention but by blocking a main street or two or three?" This is close to the right answer, but she didn't carry it through, and under pressure later went on to say that anyone with a car or a job is implicitly backing Capitalism and is part of the problem and deserves any inconveniences. Well that's great, you just disassociated yourself from 90% of the 99% assuming 10% of them are unemployed. Capitalism isn't the problem here.
A few days earlier I heard a prediction that the Right Wing Media will paint the old woman as a Commie from older times. Remember that was a geek-chic trend back in the day she's from, and the Right Wing won't publicly distinguish between Communism and Socialism as economic policies (or as distinct from government systems for that matter). Well when she makes statements like she did, the media won't be that far off. However, I'd be surprised if most of the protesters thought the same, but I wouldn't be surprised if most of them can't come up with a philosophical or moral grounding for their protests to exist.
See Full Post and Comments
Recent Posts
2024-10-04
2024-09-25
2024-09-23
2024-09-22
2024-09-02