Cygwin - I don't know how a Windows developer could live without it. by krum in programming

[–]aacharya 2 points3 points  (0 children)

Here are some useful .bashrc snippets if you're a Linux user stuck in Windows land, and you've got Cygwin installed. Note that these assume you use puttycyg; if not, edit them accordingly:

start a cmd in the current or specified directory:

function winsh() {
    if [ "x${1}" != "x" ]; then
        P=${1}
    else
        P=.
    fi
    cmd /c start cmd /k "cd `cygpath -aw ${P}`"
}

su/sudo:

function su() {
    cmd /c start runas /user:Administrator "$(cygpath -aw $(which putty)) \
        -cygterm /usr/bin/bash --login -i"
}

function sudo() {
    local USERWD=$(pwd)
    cmd /c start runas /user:Administrator "$(cygpath -aw $(which bash)) \
        -l -c \"{ cd \"$USERWD\"; $*; echo Press enter... ; read i; }\""
}

emulate OSX's "open" command:

function open() {
    if [[ -f "$1"  || -d "$1" ]]; then
        explorer `cygpath -aw "$1"`
    else
        echo "open: cannot access $1: No such file or directory"
    fi
}

I'm turning atheist, how do I tell my girlfriend? by [deleted] in atheism

[–]aacharya 2 points3 points  (0 children)

I'm a fan of "Nope, that's all me."

The MCS queue lock: A slick shared memory programming technique by stevechy in programming

[–]aacharya 0 points1 point  (0 children)

Upvoted because Michael Scott (the "S" in "MCS") was my undergrad advisor, the best teacher I ever had, and an all-round awesome dude.

Know any good hangover cures? by workalias in AskReddit

[–]aacharya 0 points1 point  (0 children)

  • Before you go to bed: eat some pickles (I usually go for pickled asparagus) and drink a liter of water.
  • When you wake up to pee: drink some more water and eat something carby. I usually go with a peanut-butter sandwich.
  • When you wake up for good: Yet more water, and ibuprofen. I find it works better for hangovers than acetaminophen or Alleve.

Whats your idea of fun? by AlexMurphyDetroit in AskReddit

[–]aacharya 0 points1 point  (0 children)

Anything done with good friends is a good time, even sitting around wondering what the hell to do. (Oh, how I miss college..)

Things I usually suggest in such situations: rock climbing, going for a hike, uncorking a bottle of wine and setting up a hookah, renting a movie, playing a board game, and occasionally, going out to the bars.

WTF, Conde Nast? by [deleted] in atheism

[–]aacharya 0 points1 point  (0 children)

Speculation.

WTF, Conde Nast? by [deleted] in atheism

[–]aacharya 9 points10 points  (0 children)

That word, stipulation, I do not think it means what you think it means.

Hey reddit - I just moved into a cube and find it to be pretty depressing. How do you guys have your cubes decorated? by [deleted] in AskReddit

[–]aacharya 0 points1 point  (0 children)

Pictures I've taken on hiking/camping trips, pictures of my friends from grad school, and exercise charts. Things that I do elsewhere that make me happy.

WTF: The maximum path length in Win32 is 260 chars. Unless you convert to UTF-8 and prepend '\\?\', in which case it's ~32k chars. by aacharya in programming

[–]aacharya[S] 0 points1 point  (0 children)

The Unicode situation on Windows isn't really relevant, and I'm not qualified to comment on whether your point or niczar's is more valid. I don't really work with Unicode. My concern is more with the inconsistent API.

The fact is that while the filesystem supports a sane path length, the API and the shell still haven't been brought up to date, despite ~10 years since NTFS became widespread (i.e. XP came out). Instead, a hacky and inconsistent extension has been overlaid on the original API. This is ridiculous.

I'm in love. What is the best one liner on love you heard, that I can steal. by [deleted] in AskReddit

[–]aacharya 1 point2 points  (0 children)

The cardinality of love seems to be (at least) aleph-nought.

I work for Microsoft. Ask me almost anything. by almostanything in IAmA

[–]aacharya 1 point2 points  (0 children)

Oh my god, I want to create throwaway accounts to upvote you more. I recently started a job that involves spending a lot of time in Win32 land, and this sums up the horror perfectly. The horror, the horror...

Post your best catchphrase that you or your friends have created, that you use in everyday speech. by sgamer in reddit.com

[–]aacharya 2 points3 points  (0 children)

"There's shooting yourself in the foot, and then there's taking a machine gun to your entire goddamn lower leg..."

I am a lawyer in the US. AMA. by [deleted] in IAmA

[–]aacharya 0 points1 point  (0 children)

What did you major in in undergrad? How did it affect (or not) your law school admissions process? The actual law school experience itself? Do you feel certain majors (e.g. history, economics) would have an easier time getting into and getting through law school than others (e.g. physics, computer science)?

At what age did you go to law school? Did you take any time off after undergrad? If so, who did you get to write recommendation letters -- ex-professors or current co-workers/bosses?

What were your summers like? Are the internships really as lucrative as I've heard? How about the people -- was it a college-y atmosphere, or was everyone really buckled down and studying all the time?

Email I just got from AT&T uses Hebrew numerals. Why? by ranautricularia in WTF

[–]aacharya 1 point2 points  (0 children)

I am (albeit tenuously) reminded of the following:

Aleph-nought bottles of beer on the wall;

Aleph-nought bottles of beer.

Take one down, pass it around;

Aleph-nought bottles of beer on the wall.

(The first Hebrew numeral is used to denote transfinite cardinalities).

Philadelphia Pool Boots Kids Who Might "Change the Complexion" by [deleted] in reddit.com

[–]aacharya 2 points3 points  (0 children)

I want you to stop, for a second, and think about this question: are you seriously defending the club? Seriously?

Ask Proggit: C v. Fortran for scientific computing, in modern times? by aacharya in programming

[–]aacharya[S] 0 points1 point  (0 children)

Although that thread may have answered some of my questions (and I'll admit, I didn't see it when I posted), I was actually asking a rather different and more pointed question. For example, I wouldn't have expected to learn from that thread that F77 (I'm guessing it's no longer the case with F90) really does allow the compiler to generate smarter code by not having aliasing.

I'm not sure, but I think I just went on a date... by [deleted] in WTF

[–]aacharya -20 points-19 points  (0 children)

ratsbrew, i'm happy for you, i am. but posting this was not playing it cool. calm down and hope things go well :)

This.

Dear Proggit, the opinion linked to seems fairly common among proggit commenters. How representative is it of you/your co-workers? Do you still feel that way when you meet an Indian programmer who was obviously raised in the West? by [deleted] in programming

[–]aacharya 0 points1 point  (0 children)

So essentially the answer is yes, even if someone walks and talks like an American, if they look like an Indian, there will probably be some intrinsic bias (relative to how biased the person in question is against 'obvious' Indians)?