This also works wonders with a lightly-held pencil when you're falling asleep in class. Kept me awake through many early-morning lectures.
HN user
fallintothis
Because that is what they said.
In so many words. I trust their second sentence is relevant and makes more sense to investors, but I imagined it being their slogan. "Gamador: We launch faster, iterate faster, and use metrics better" just sounds humorous (hence the giggling). To me, as a Joe-average user, it sounds more like That Guy from Futurama than "we make a lot of really addicting games".
I was giggling at Gamador's summary.
We make social games. We launch faster, iterate faster, and use metrics better.
"Use metrics better"? I guess that one wasn't crafted with consumers in mind.
Agreed.
I find martial arts discussions funny. More often than not it's a bunch of people arguing over which one is the "best" in a "real-world fight", which usually degrades into arguments over what "real-world fights" are like, because none of them has ever actually been in one. But it's pretty silly: I know I'd have fun in any martial art right now. If I wanted to know how to fight someone for real, I'd study some form of military combat.
I actually pronounce it "tree-eye", even though that's all sorts of incorrect.
I think the syntax cards were pretty bogus anyways. If you really wanted to compare syntax, you'd do better to compare grammars (e.g., Scheme's: http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z...) than to decide what's important enough to include in some gif. It's hand-wavy at best (cf. the explanations of why things like eql were on the card) and straw-man at worst.
Provably safe at compile time
Is this true? I was under the impression that the Haskell standard didn't formally specify its type semantics. Do works like http://web.cecs.pdx.edu/~mpj/thih/ "count" (i.e., is it the canonical reason we presume Haskell's type system is provably sound)? Honest question.
I'm surprised there seems to be so much LaTeX hatred floating around the comments. I don't really know anything about typography, but typesetting my documents using markup is a pleasure. While I often fall into the trap of designing as I type, as soon as I get the styling right, it's consistent. Once I get BibTeX references to compile correctly, I can just \cite (even \possessivecite or \citeasnoun) and not have to worry about dangling bibliography sources that aren't used anywhere in the paper, citation style inconsistencies (where does the volume number go again?), making typos in separate references to the identical source, and so on. Did I change the order of some figures? \ref will still refer to the correct number. I could highlight some word and chord a shortcut to italicize something, then have the processor try to be smarter than me about what should and should not be italicized after that, etc. But I'd rather \emph a word and be done with it (and be able to do things like \usepackage{ulem} to change emphasis to underlines instead). Rather than tabbing back and forth to try to get the proper list structure when the processor gets confused about line breaks, I can textually mark where I want the list to begin/end, where it should nest, etc. Instead of wading through menus and searching for a picture of an A with an umlaut, I can just type H\"{a}agen-Dazs directly. I can do all of this in Vim, where I have productive text-editing commands and even spell-checking. Not to mention typesetting math!
The post's tone is objectionable, I suppose. I'm sure LaTeX is not for everyone. The learning curve's too high for your standard high-school kid writing an English paper, and the payoff is minimal in such cases since word processors have many of the same features for managing bibliographies, header formats, etc. But compared to just typing it in plain text, using a word processor feels horrifically obtuse to me.
But I am certain (=believe) that practical applications will come out of this.
As any deeper understanding of the universe inevitably leads to practical applications, I should think.
Physicists hope that the LHC will help answer the most fundamental questions in
physics, questions concerning the basic laws governing the interactions and
forces among the elementary objects, the deep structure of space and time,
especially regarding the intersection of quantum mechanics and general
relativity, where current theories and knowledge are unclear or break down
altogether.
http://en.wikipedia.org/wiki/LHC#PurposeAlso, why does the URL need to be human-readable? URLs are for computers. The content is for the human.
Disagreed. I can't stand sites with ugly, incomprehensible URLs: even if they're just appending parameters ad infinitum, it's unnecessary drag on the process of editing, sharing, and typing the URL. E.g., something like
http://www.amazon.com/Kindle-Books/b/ref=sa_menu_kbo0/187-1539918-5044028?_enc
oding=UTF8&node=1286228011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=left-nav-1&pf_rd_r=05
F7VG5R8T4MBDH7QQ6N&pf_rd_t=101&pf_rd_p=328655101&pf_rd_i=507846
is, near as I can tell, mostly equivalent to http://www.amazon.com/Kindle-Books/b/ref=sa_menu_kbo0/187-1539918-5044028?node
=1286228011
and could probably be made even simpler. Of course sites need to carry some amount of incomprehensible information (YouTube's video IDs, reddit's story IDs, marco.org's blog post numbers, etc.), but shoving as much as you can into the URL isn't the way to do it. I type specific URLs like en.wikipedia.org/wiki/Topic and news.ycombinator.com/newest all the time. If the site author neglects to even have this sort of basic functionality, I tend to consider it a bad interface.Wow, I'm really liking Songite. Great work keeping it simple -- not enough of that these days.
Edit: Just noticed something playing around with it. Is there a way to correct its results if it doesn't happen to get them right? For example, I searched for All That You Are by Mudvayne, and the only result that gets queued is an 8-second intro.
I like the "I'm Feeling Lucky" simplicity, but there should probably be a way to fix the choice -- e.g., a button on the song for "not the right one" that expands a list of search results.
You don't know anyone who's seen Who Framed Roger Rabbit?
No toon can resist the ol' "Shave and a Haircut" trick!
If you own a domain that's an OpenID provider, you won't be able to use that.
Aren't there OpenID users who host their own identities exclusively for themselves? Is there danger in letting people do this? (I seriously don't know much about OpenID practices.)
I must be out of the loop, but I was surprised to read that Guillermo del Toro was going to be directing this one. Peter Jackson is still closely involved, it seems: http://derhobbit-film.de/facts.shtml
I wonder how much the different director will influence the movie.
Somebody's used to reddit's markdown syntax. :)
Never something I thought to read about, but definitely entertaining.
Now somebody needs to do a writeup on the history of Nerf guns!
Interesting. I wonder how technical you could get by taking a Socratic sort of approach. Perhaps you could get people to understand basic first-order logic, or at least that logic can be codified. When I start off by trying to define first-principles like implication and Boolean algebra, eyes start glazing over. But in my head, the conversation could be steered by acting like a human REPL while talking about a hypothetical first-person shooter or something:
"When does the player die?"
"When their health is 0."
"When do you decrease their health?"
"When they get hit by bullets."
"So, you tell the computer: if the player gets hit by a bullet, then you should decrease the health. If the health is 0, then the player's dead. How much damage should they receive from a bullet? What if it hits their head?"
etc., descending into further complexity until they get the idea of how much they take algorithmic thinking for granted (which I think is probably the most essential thing to realize about programming).
Of course, actual conversations consist of me yakking about over-the-top technical details, amounting to the usual response: "Magic. Got it."
As a competitor (albeit one who's none too serious or good), it's remarkable how precisely you've reflected my attitude about programming contests.
Here's a written sample of my numerous (or just repetitive) rants from an old reddit discussion (http://www.reddit.com/r/programming/comments/6xrpc):
I participate in the ICPC, my school's local programming contests, and, in a minimal way, this year's ICFP (I had midterms to study for and was fed up with their buggy sample server). They're very fun, and that's pretty much all you should expect. The contests are a lot more social than people give them credit for. Hanging out in the computer lab, kicking over chairs as you miss the deadline for a problem, getting friends to participate for the first time, the exhaustion of failure, the thrill of finally getting that message about passing all the tests, post-game pizza party, high-fiving each other for solving 0 problems each, going over solutions, reading each others' hilariously frustrated code ("Fine! Let's brute-force this fucker!"), exchanging tales of respective challenges on each puzzle, stories about cranking out solutions to a problem while sitting with your laptop in class, intermittent bantering about using conversation as a desperate distraction mechanism, breaking out the Binky (http://video.google.com/videoplay?docid=3796146278554348828&...) for help with pointers, offering Emergency High Fives (tm) to the crowd of fellow ICPC competitors as they shuffle out of the building, golfing down the solutions for days after the end of the contest, last-minute submission races, weighing whether to use the scant prize money to get a Scrolling LED Belt Buckle (http://www.thinkgeek.com/gadgets/electronic/7c60/) set to display a well-intentioned insult to the person who normally wins the contest, ... the list goes on.
The rankings are incidental, though most people don't seem to think so. At times it felt like our group was the only one at the ICPC that wasn't taking the contest so fucking seriously. Certainly good programmers can win contests, but winning contests doesn't make one a good programmer. The problems are short, artificial, and moreover a lot of fun! I don't quite understand the hyper-competitive students who make it their life to win the contest, as little as it counts for anything. I'm just happy to kill an afternoon messing around with puzzles and a group of friends; plus, free pizza.
How is it any different than Digg/Reddit/HN?
Here's an obvious one: TechCrunch items get posted on Hacker News. Digg/Reddit/aggregator items, not so much.
would have taken the time to register to comment
Didn't think of it that way. If you think the post would help people, I could cross-post. Or you could post a link and/or copy & paste the text, if you'd like.
Hi,
I wanted to give you my ideas for the Social Skydiving challenge without the hassle of signing up for the comment systems. So, I hope you see this here.
I have a lot of ideas, most of which are probably junk. But, your blog struck a chord in me, so I've written them out. I've not proofread much, so hopefully most of it makes sense.
PROLOGUE:
I think the most stressfully embarrassing social situation I've ever faced was one time at a Renaissance Faire. If you're not privy, a Ren Faire basically consists of hordes of hippies pretending they're from the 15th century with questionable accuracy. For patrons, it's a campy carnival of perverts with pathetic cockney accents. For workers, drunken weekend parties ensue betwixt the adults (armed with the usual hippie supplies, if you know what I mean (drugs!!)) while the children are left to wallow weekend after shower-less weekend. Your imagination probably does a pretty good job of filling in the holes.
As such a child of some Ren Faire workers, I spent my weekends of each Faire Season dressing like a serf, playing with wooden weapons, watching the stage shows again & again, and occasionally pausing to help run my family's booth (a historically inaccurate but fun game).
At some point in the season, we attended a seminar about hawking our booths to the passerby, taught by a long-time Fair veteran. He was of a kind; I don't expect just saying "suave Ren Faire guy" suffices, so I'll try to expound. He was one of those charming guys, not old enough for it to be creepy and not young enough for it to be cliché. A magician, which in Ren Faire terms translated as "cool", for whatever reason. Clean-looking, talented, and effortlessly proceeded with the charmingly light-aired social interaction of the Faire. It's kind of weird to explain. It's as though Ren Faire gave guys carte blanche to be womanizers.
But he made his lessons in attracting people towards you seem effortless. Of particular note was his observation that people came to the Ren Faire to be immersed in the campy sort of atmosphere. That a powerful selling device was merely sexual appeal: the women certainly knew it, since they wore bodices that prominently created cleavage no one knew they had, and the guys knew it because so many got away with being perverts. Chicks worked the ale stand, goading drunken men into tips, and guys invited 14-year-old girls in small white summertime shirts to the water-dunking game. So, an underlying tool of the seminar was that you could "woo the women". That was the exact phrase; it stuck in my head.
He demonstrated how coolly he could proceed to flatter a woman, gently offering his hand, with a bow, to the accepting lady. She passes her hand into his that he may raise it to his lips and deliver a simple kiss. He locks his eyes on hers, giving a gentle squeeze to the hand, tempting a reciprocal squeeze. "Oh, you have a nice grip, m'lady. Surely you could [throw a dart | ring the bell | something vaguely related to the booth he was advertising]."
Just like that, he had his customer, and they both had fun being a part of the situation. It struck a chord in me somehow: that's easy! And so, the first of the embarrassments start as I confidently assert -- aloud to my family -- how I can apply the lesson in helping get customers. When I get my clothes wet and look frumpy, I start lamenting how I won't be able to "woo the women". etc.
Predictably, I sat on my laurels, watching female after female pass our game while I did nothing. My dad asks if I'm ever going to do it. I assure him that I will -- that I just hadn't worked up the gall yet. He tells me to just go out there. Still, I wait.
Sick of waiting. Swallow my fear. First group of appropriately-aged women pass by, and I pounce. In a slur of awkward grabbing-at-the-words, I realize how I should have thought of something to fucking say. From what I remember, it went something like:
"Aye, but for the...you are surely the l-loveliest lady to, uh, grace our...beloved Faire."
As if it was not enough that I had just jumped out in front of these moving people, causing them to halt abruptly, I was now fumbling over some half-assed attempt at flattery.
Not just flattery. I was kneeling before her, my head bowed and my hand outreached in the traditional gesture. ...And she wouldn't reciprocate. Not out of disgust or anything (I'm fairly sure), but out of sheer confusion. The utter bozo that I am, I take it upon myself to grab her hand from her side -- with a little too much resistance for it to be comfortable -- and plant an awkward kiss upon it. I remember how hot my face and chest ran from the pangs of humiliation that shot throughout the empty cavity that was my body (for you see, it was empty after my stomach plummeted straight out of existence).
Still, I battle through it. Confidently look forward, lock eyes, and squeeze whatever I was holding -- only to find her limp, lifeless hand not responding.
To describe the momentary silence as an "awkward pause" fails to do it justice. I was looking up at her, and to this day, whenever I picture it I can only remember seeing her looking like Lydia from the movie Beetlejuice. And I have no idea why I remember her looking like that. I'm almost 100% certain she must have looked drastically different from that black-garbed character. But that's the image that lodges in my mind for some reason. The sheer awkwardness is only punctuated by (what I assume to be) the girl's mother:
"What do you say, dear?"
"Um...thank you?", she forces.
And the 3-person group (or at least I remember it being that large) continues walking away. As her hand slips out of mine, all I'm left with is an aghast fumbling for more words. Everything about the "wooing" had failed; hard.
"Uh, um, w-would you like to play our game?!", my stupefied voice calls all-too-loudly to their backs in a perplexingly transparent fashion.
The mother turns her head back. "Oh? No, not today, sorry."
The arm I had just done the deed with falls lifeless by my side. I'm left with nothing but my hideous resentment, humiliation, and shame. I quickly about-face back to my dad, collapsing in his lap, where I cry. A lot. It must have taken me hours to calm down (I don't actually know how long). To be fair, I must've been about 10 or 11 years old at the time...
Wow, that was painful to write about. And not even because the vast amount of failure made a fuck's bit of difference in my life (though I've never since tried a stunt like that!); if ever there was a time to get away with it, being a little kid certainly helped.
So, this isn't an idea for your challenge; it's a guideline: if you can face something as embarrassing to you now as this was to my 11-year-old self, yet walk away learning something, I'd call it a success. If taken in objective terms, you've probably faced situations in this 30-day adventure that sum to more total embarrassment than my 1 fleeting pre-adolescent encounter. Taken in all its context, however, it was probably the most embarrassing thing I've ever done.
IDEAS:
Note that these are mostly social experiments I've always wanted to try but never got myself to do (excuses!). They're a bit far-fetched, because they're designed with an eye towards just seeing what results you get, rather than engaging in conversation or bettering yourself socially.
Games:
A theme you address is the restoration of child-like wonder. One thing I think we all lose as we grow up is our sense of simple, spontaneous pleasures. Things you can engage total strangers in. The problem here being that if you fail to get the event rolling, it all works out boringly -- you've hardly failed at all if you fail to do this, but if you succeed, you have an awesome time. So, I don't think these are very good challenges. But, I've entertained these thoughts.
In her routine The Beginning, Ellen DeGeneres suggests that you "just go up to a total stranger tomorrow on the street, just go up to him and just touch and go 'YOU'RE IT!' and just run away. Have a giant game of tag going on on the street all the time."
Similar ideas that are more prone to Big Failure involve dialog, because at least you have to say something aloud. Maybe you could get a bunch of strangers to join you in singing some classic song. Something everyone's comfortable singing -- something they'd know at least some of the words to. I've done this with songs from The Lion King, for instance. Maybe a dramatic scene from a well-known movie people would know the dialog to. These might be easier with some seed set of people instead of just you, though; at least n > 1 could finish out the song or scene in a way that's less likely to get you kicked off the bus.
Persuasion:
Other people have had ideas along these lines, and I think it makes for a great class of challenges: convincing strangers to do something with you. It not only helps build a common ground a bit more solid than smalltalk, but if you fail you get to have people think you're some sort of weirdo!
Elevator patrons make for an interesting random sample of people. They're usually looking to get away to somewhere, so most of them won't give you the time of day. I've long pondered experiments you could carry out in elevators, though:
- I once rode an elevator in a college dorm where 3 or 4 residents were sitting on the floor playing cards. This is probably easier to get away with in a dorm, because you aren't strictly going to interrupt business with a weird/cramped elevator trip -- versus, say, your workplace. These kids were doing it just to be weird, but you could use it to invite strangers to play cards with you. See how big a group you could get going. Engage in conversations over some cards. If they decline, they just have a story about some weirdo in an elevator playing solitaire. Now, if you're in an elevator that serves to traffic people with business purposes -- somewhere to go on a schedule -- you probably won't get many people to come along with you, due to the sudden nature of engaging in a card game. You could tweak this to a different, more conducive environment: in the halls outside of a classroom? In the classroom before the lecture starts?
- An experiment I thought of with goals similar to Social Skydiving was to hang out in an elevator. People are surprised when there's someone in the elevator already, just riding. It is kind of weird, after all. It's sparked conversations for me before. My idea was then: if I saw any attractive women, bluntly ask them if they'd be interested in dating me (phrased with various layers of "hypothetically, of course!", if need be). The aim was not to actually get any dates, but to convince myself that it was easy to ask and that it'd get more comfortable with time. (Of course, I've always made excuses, so I've never actually done this.) If anyone gets too weirded out, you can use the excuse that you're performing a random survey. Then, even after social side-effects (self-improvement, yadda), you would have some interesting data. See what range of reactions you get! While it probably wouldn't make you seem any less of a geek, it might deflect animosity.
Okay, enough about my weird fascination with elevators...
- Growing more overtly sexual, you could pull off a stunt like in A Complete History of My Sexual Failures (http://www.imdb.com/title/tt1037033/), a documentary wherein the maker barges outside and proceeds to parade around the streets, begging various women to have sex with him. He was threatened, some ran away from him, hilarity ensued, but not only did it take awhile for the cops to interject, (SPOILER ALERT!) he got one positive response. I don't know how much the camera following him helped the entire situation. With "oh, I'm doing a documentary and I'm drunk and took way too much Viagra", it's easy to write someone off as a harmless lunatic.
- More harmless (still creepy), you could give a pretense to go out and do something with someone. "I have some tickets to [Disneyland Seattle | Six Flags | minigolf | whatever it is you guys have], but no one to go with. You in?" Such abruptness would probably make people distrustful. I know I wouldn't agree to go somewhere with a random stranger; he'd probably just try to kill me in the parking lot. So, you can lead into it. Strike up a conversation, and if it's going particularly well, try to edge in something to convince them to go with you. Probably shouldn't press the issue if they decline, of course. If the outing is sufficiently innocent, you shouldn't come off like you're trying to get into their pants.
- Ask people what you should do for your challenge. Strike up a conversation and work towards divulging that you've been doing the Social Skydiving experiment (Smile! You're on Candid Camera!). If they're interested, discuss the results, the finer points of social awkwardness, and ultimately ask them what you should do as your Mega Capstone. Ask them how they could be involved in carrying out a plan. Maybe that could blend well with the other ideas -- "I was thinking of going to [do something] with someone I just met".
This, of course, presumes an ideal conversation. If you've learned anything from this, you'd be at least a little bit equipped to steer the conversation into the area you want it. And it probably helps having this clear-cut goal of the conversation. In disclosing information about yourself, it's much less phatic than standard smalltalk and has potentially more lasting effects.
- In some cases of certain social anxiety, doctors will have patients publicly declare something. e.g., Have someone who's embarrassed to admit they have a stutter announce it to a bus full of people. This isn't a specific challenge, but something worth considering: something very public where you disclose some personal info. Not unlike your blog, but doing it face-to-face instead of written-down can be intimidating, hence proving your increased bravery. Something as short as "I'm Justin, and I stutter" isn't going to be worth it as a challenge, but I wouldn't know what else you could announce to a large group of people. Maybe you could see if they'd listen to you talk about your Social Skydiving experiment?
- In an effort to heighten the level of discourse with strangers, instead of discussing the weather you could debate them. Of course, debate about certain issues becomes just as phatic: "I LOVE BLAH!" "BUT I DON'T!".
At my school, every so often there'd be these guys with giant banners listing Satan's Children, including groups such as "Mouthy Women". This would often encourage little islands of conversation. I mean, sure it's part of his business plan (seek out high-traffic areas, piss people off, then magically they're talking about religion instead of just ignoring him), but the conversations are so much fun. My friend and I went down to yell at these dudes once. I got to creep out the Campus Crusade for Christ kids by asserting that I wasn't actually there to argue that Mouthy-Women-man should spread the Word of God in a nicer way. Stuff like that. Play the Devil's Advocate. Automatic conversation & debate starter. And more interesting than the weather!
It's harder to debate someone spontaneously, though, without resorting to the same tactics (which wouldn't necessarily be a bad challenge...).
- If you're like me, you have some old friends that you don't talk to anymore. Sure, you guys used to know each other & talk during high school or whenever, but it's been 5 or 10 years, and it all just kind of...died off instead of being any deliberate sever. If you're even more like me, you have social anxiety about even starting conversations with those old friends (who you can easily track down). "What if the conversation doesn't go right? That was a long time ago that we did such & such. We won't have anything to talk about, because we don't have any context for each others' lives." etc. If you could reconnect, it'd be interesting, but thinking about them is like remembering a ghost.
But, instead of paralyzing yourself with these fears, try it out. See what they're up to. Reminisce. If you can carry a conversation, you succeed. Try it with something like the phone or face-to-face, if possible, so that you can't hide behind switching your IM client to "Away". It has chances of being more meaningful than talking to strangers, even though you might discover that they are strangers after so long.
You could be even crazier and contact the people you had a bad time with, like the maker of A Complete History of My Sexual Failures contacting all of his ex-girlfriends.
If you don't have any old friends / acquaintances you'd want to talk to like this, then the idea's a bit of a lost cause. But I think it'd be cool if you did.
I've enjoyed following your blog. Best of luck!
Reddit had a good list awhile back: http://www.reddit.com/r/programming/comments/8ji9m/
Includes ones for Scheme, Python, Factor, Cat, OCaml, Forth, and Brainfuck. And, of course, all of the many languages covered by Codepad.
You're doing two filters with list comprehensions which you could switch with one span:
quicksort (x:xs) = let (a, b) = span (< x) xs in (quicksort a) ++ [x] ++ (quicksort b)
Actually, this is incorrect. span will split the list as soon as it finds the predicate to be false on an item, instead of finding the smaller elements of the whole list. So, for instance, if we try your function as in the following, we get improper results: > quicksort [1, 2, 3, 2, 1]
[1,2,1,2,3]
> quicksort [1, 2, 3, -2, -1]
[1,2,-2,-1,3]
> quicksort [1, 2, 3, -2, 0, -1]
[1,2,-2,-1,0,3]This was not published in Artificial Intelligence, but in AI Expert
Ah. So it was. Thanks, though!
ci" deletes the inside of parentheses
I think you mean inside quotes, by the way.
I find the idea that there are 100 vim commands every programmer should know a but ludicrous though.
Especially considering that the "100" commands were all compositions of simpler vim commands anyways. I don't think this is actually that great a submission, for this reason. How many ways are there to rehash some really specific example -- say, counting both ":set syntax [on|off]"? Vim is so much more general than that. It seems inaccurate -- even discourteous -- to treat this as some laundry list of commands in your bag of tricks (except in the case of, say, muscle memory). From my experience, you don't memorize some long string of letters as a command; you think of what each tiny bit does in and of itself, then compose that into whatever you want to accomplish. Rather than commit the string "ggguG" to your brain, vim users think of it as "go to the beginning of the file (gg), then uppercase (gu) to the end of the the file (G)". Granted, vim gets more complicated as you delve into the realm of motions, .vimrc level configurations, ex command line, etc.
Also, it seems that vim users would be the real ones who need to know such things, not every programmer altogether. The title feels cheap / sensationalized that way.
If there were some REAL list of vim commands "every programmer should know" (well, vim-user), I'd at least start by recommending the alphabet...
On a recently-became-related note: http://news.ycombinator.com/formatdoc
Text surrounded by asterisks is italicized, if the character after the first asterisk isn't whitespace.
If either were optimal in every case, this debate would be settled by now. Yet what matters here, more so than tiny idiosyncrasies in each, is the overarching philosophy each editor has, and whether that maps to your mode of thinking. I admit this is a dubious answer: our thinking can be restricted by choices we made early on and got used to, but never attempted to improve upon. If you do attempt to explore beyond what you have tried, by definition you run the chance of regretting lost time in the case where you find a better way of doing something. But this is a blessing in disguise anyways. I try not to let such fear (or even complacency, as the case may be) keep me from trying further things unless -- and this is a big, subjective caveat -- I feel as though I stand nothing to gain from pursuing it. The choice of text editor seems about on par with the choice of any other programming tool, such as a language or version control system. Not all of them are created equally, except in the technical sense (as in, e.g., Turing equivalence) that, at least in the limit, you can achieve the same things with one tool as another. Any may be more productive than another, but this is per person, situation, and preference. The only way to know for certain is to invest time (a precious resource) into learning all that you can.
I feel weird making such claims. For instance, I have very strong opinions over programming languages (though I do try to learn as many different modes of thinking -- in this context, languages -- as I can), yet with text editors I don't feel like I've been stuck with vim as an accident of history. I genuinely prefer its mode of thinking, despite not becoming an expert in Emacs before making a decision (since doing so is quite impractical). I also feel the flimsiness of the reply "depends; try both and see". To cut to the chase, luckily we have decades of flamewars to draw upon -- or, at least, the general consensus of the philosophy of either editor. Choose wisely:
Vim: modal editing; small, orthogonal commands that can be composed into more elaborate forms; "do one thing and do it well" philosophy, so the main function is as a text editor and there is less concern (except via plugins in its admittedly esoteric extension language) about performing other programmatic tasks not directly related to editing text.
Emacs: "Everything at reach" philosophy, be it text-editing or access to a REPL, browser, email client, Tetris, etc.; larger set of commands (it's like a CISC to vim's RISC); elisp is a much better extension language; no mode switching, which then requires more key-chording.
Whichever sounds nicer, you should probably go with, unless you have the time to dedicate to both -- even a little bit of working in either can help you get a feel for them. If you don't, they honestly accomplish so much of the same sort of tasks in their respective ways that neither is clearly better than the other (except to their proponents -- did I mention vim is better? ;) ). Which is encouraging, I think, because it buys you a degree of freedom to use their general philosophies as a grounds for a decision, rather than having to teach yourself every detail about each editor. You won't be at a terrible loss, whichever you choose.
Not to troll -- indeed, I am attempting to be constructive -- but in case anyone was interested in (what I know of) vim's equivalent functionality, here's what I have so far:
1) Several options:
:help <something>
:h <something>
Shift-K to run a program to lookup the keyword currently under the cursor (the program defaults to man). On that note, you could just :! man <whatever>
if so compelled.2) qq = record macro to register q. @q = replay macro at register q. 100@q = repeat macro q 100 times. @@ = repeat the previous @<whatever>.
The author notes that you can tell Emacs to "please repeat this macro until it would cause Emacs to start beeping", which I found interesting. I'm not sure if there's a specific way to do this in vim; I often just go with, e.g., 1000@q (or whatever arbitrarily large number you want. You can check how many lines are in a file, among other statistics, with g<ctrl-g>). So long as the macro ended with a j (or whatever motion you wanted, technically) it would continue carrying down the lines. It seems as though you could be able to execute macros on some chunk of text, perhaps with visual line select. Hm...
Another interesting feature the author notes is "counters let you insert a different number every time a macro is run." I've had some annoying experiences bending over backwards for this, so I'd like to know an easier way, but it's certainly possible using the C-A and C-X keys, which increment and decrement a number under the cursor, respectively.
3) Ctrl-v for visual block mode (remapped to Ctrl-q for :behave mswin, since Windows captures this as Paste); then, simply move around with the regular keys and perform fancy editing to your heart's content. I use this often, for instance, to insert comment marks in a chunk of text. Go to the first column & line of the block, ctrl-v, hold down j till the region reaches the last line you'd like, then shift-I, type your comment characters (e.g., "//" or ";" or "#"), then <esc> and the insert takes effect on all lines of the previous region.
Also useful during the many adventures in the different visual-select modes, use gv to re-select the previous visual area, should it happen to become deselected. For instance, when I am holding down j in the previous example and prematurely hit Shift before letting go of j, it joins the lines up. Argh! u (undo) then gv to continue on my way.
4) When I first read about this, I was immediately interested. For similar functionality (couldn't claim whether or not it was the SAME, strictly, as I don't actually use Emacs), there's the extension that I now adore: YankRing. http://www.vim.org/scripts/script.php?script_id=1234
5) I tend to use :diffsplit, though there are other ways to work with this. As per item 1, :help diff.
6) Sad to say I'm at a loss here -- not to say vim couldn't do this, but rather I've never needed to do this in my range of experiences (clearly limited compared to that of the author's). If anyone could fill this in, I'd be interested.
7) The few times I work with a language that doesn't have a shell:
:make
Though there are parameters and options to tweak with. For instance, which program to use by default, whether or not to create a temp file for the errors, jumping to the first line containing an error, etc. As stated, I do most of my work in languages with shells anyways, so I'm not an expert with this command. :help make, for more info.8) Admittedly not built-in (being against vim's Do One Thing Right philosophy, I suppose), but the plugin I use for this is vcscommand: http://www.vim.org/scripts/script.php?script_id=90 with a Mercurial backend, since the base plugin is for CVS, SVN, SVK and git: http://www.vim.org/scripts/script.php?script_id=1898 Then, it's a matter of :VCSVimDiff, :VCSCommit, :VCSAdd, which you can remap to whatever keystrokes you like by editing your .vimrc (see item 10).
9) Again, I've never done such things, so if anyone could step in for our fellow vimmers, that'd be great.
10) You can edit your .vimrc to remap keys as you'd like -- including binding them differently per mode you're in.
Taking some silly examples from my .vimrc:
"Maps ctrl-enter in insert mode to open a line below your current line:
imap <C-CR> <esc>o
"Maps ctrl-enter in normal mode to simply o, in case my muscle memory goofs and
"doesn't notice I'm in normal mode:
nmap <C-CR> o
You can also set abbreviations, which will expand as you type: "Fix typo
abbr teh the
"automatically expand {{ into a curly-brace block, the idea being to hit Enter
"after typing the {{
ab {{ {<cr>}<esc>kAfor people who already use OpenID
That's one thing I never got about OpenID and its ilk, though. "We'll fix the way logins work! Just sign up for one more thing and then sites that support this will be accessible." Why is this the cure for sign-ups? Yet one more service to fill out some credentials for when sites do not universally accept it? If the latter part were true, then sure, but in the meantime I don't really see the point.
I am ignorant of the major benefits of OpenID, so if anyone could enlighten me, I'd be happy.
Edit: this post helps http://news.ycombinator.com/item?id=151376