briancarper
I find that feature useful enough that I've never needed indent guides. If you jump the cursor to the beginning of a line, you can easily see which other lines are indented equally with that line.
Java is a harsh mistress. This is why dynamic languages on the JVM are nice, so I never have to write code like this myself.
In my brief experience, the idea of a cross-database SQL DSL is a lost cause unless you want to limit yourself to a very small subset of SQL. Funny, for a language that supposedly has a standard.
For Vim, there are a lot of plugins to deal with source trees, but I get along fine with Vim's built-in wildmenu and tab completion. Both options are nicely configurable. For emacs, I like ido-mode. I find it much faster to browse a directory and open a file with the keyboard and tab-completed filenames than to use a mouse.
There are also commands to jump to other files to find the definitions of functions and such. It depends which programming language you're using. Vim has `gd` and friends to do the same. And then there's ctags, which integrates with Vim wonderfully. Editing Lisp code in Emacs with SLIME (for example), `M-.` will jump you to a function definition in another file.
For comparing files, it'd be hard to beat vimdiff, which provides built-in, cross-platform colored diffs of buffers. Emacs has a diff mode as well.
For source control, Vim and Emacs both integrate well with Git and others. You can stage and commit files and such via a keystroke or two. But personally I use the command line for git. (Of course you can embed a shell right in Emacs too.)
Vim and Emacs let you use "windows" (panes) instead of tabs for editing multiple files; don't overlook how awesome this is. You can view files side-by-side without having to close or hide one to open another. It frees short-term memory for other things. Once you set up keybindings for opening, closing, resizing and moving between windows, you're set. I haven't found anything faster or easier to use. Finding and viewing a buffer that isn't currently visible again uses tab-completion and is very fast.
So yes, a lot of typing. But typing is more efficient than mousing, I find. That's part of the point of Vim and Emacs to begin with.
I often work on Ruby on Rails projects in Vim with 2 dozen files open, or more, and have a very easy time.
And then sometimes people have written Clojure wrappers around Java frameworks. Ring/Compojure as a thin layer over Java servlets is a good example. clojure.contrib.sql is a thin wrapper around JDBC, so that Clojure can already talk to a wide variety of databases.
In that case you get the benefit of a solid codebase as well as the benefit of a clean Lispy interface. Not sure how much more you could ask for. It would likely take years to reproduce all of that work in pure Clojure.
`java -cp clojure.jar clojure.main` is the preferred method of starting Clojure rather than using -jar, I think.
Sure, academic institutions reward cheating. What institution doesn't? Shoplifting has lots of rewards too. There are rewards to cheating at almost everything. The only things keeping people from doing it are conscience and integrity, and it's not news that many people (intelligent or not) have small supplies of both.
Cheating was rampant in my "honors" classes in high school and all through college as well, and more novel forms of cheating appear to be no less rampant in the business world. It bothers me, but I don't think we need to hunt for justifications for it. It seems easy to understand from where I'm sitting. Just be thankful we don't all have Rings of Gyges.
I think it is a good reason. The community benefits when everyone uses a consistent style. Readability isn't just about being able to read your own code, it's about helping other people read your code.
The accepted style of the community will make sense up to a point; no one wants to make things really hard on themselves, and people gravitate toward things that are comfortable. But it'll also be partly arbitrary and probably not optimal in every way. Part of learning a programming language is learning the idioms and dialects of other programmers.
Using a style no one else in the community uses is like making up your own words in spoken language. People will be able to understand you given some effort, but are they going to bother? If they do bother, they're probably going to be annoyed. Even if your new words are "better".
If you're the only one reading your code, knock yourself out. Otherwise you should probably suck it up and adapt, in my opinion.
"No other language that I'm aware of stacks scope delimiters or has a community where the standard indentation width is two spaces wide, and where sometimes even a single space is considered acceptable."
Idiomatic Ruby uses two space indentation. Maybe because Ruby is often so deeply nested, like Lisp.
But I couldn't justify using either for a project for work. I generally choose Ruby instead nowadays. In Clojure I still end up rolling my own libraries for a lot of things, which is really quite fun in my spare time, but not justifiable if I'm billing by the hour and there are a dozen Ruby gems already written to do it.
We have seemingly constant threads on HN saying "I can't hire a good programmer!" What are the chances of my non-programmer boss hiring a good Lisp programmer? At the small non-profit at which I work? Good freaking luck.
I'm still using some PHP scripts at work today, and I still cringe to see the code, and I whine a little (to myself) whenever I have to edit it, and my boss still loves the end result, and it's done its job well for 2 years. What else matters? I believe in "Worse is Better" in this case.
I do sneakily use Clojure at work for small data-munging tasks. But not for code anyone else ever needs to see.
(I do also wonder why this blog post from 2008 made it to HN.)
Again, not sure why any of this is important enough to talk about on HN. I'm hoping this thread dies before my server bursts into flames.
I agree, this post shouldn't influence anyone. Not sure why it was submitted to HN.
As for why it's on the homepage, I don't think it belongs here either. The intended audience was rather more narrow than HN.
1. Windows opening and closing seemingly at random when using SLIME 2. Horrible default fonts 3. Unfamiliar keybindings, some of which are awfully long keystrokes to do very common actions, e.g. C-x C-f to visit a file, C-x C-s to save a file. 4. Struggling with Emacs jargon and navigating the help system
There was a lot more. Part of the problem is that none of these things bother me any more, because I've drilled them into my brain over the past two years. So I don't remember everything I struggled with. I just remember being extremely frustrated.
For the most part I never found solutions other than getting used to the Emacs way of doing things, and changing my habits.
On a higher level, in Clojure itself, there's not much OO going on (depending how you define OO), and that's not changing much either. In the new defrecords: 1) Everything is immutable, 2) There's no encapsulation of methods inside objects, 3) There's no inheritance of method implementations from "parent classes", 4) There's no data-hiding, and all fields are public. Uncontrolled thread-unsafe mutation of "objects" is still not kosher. Defrecords are kind-of-OO in the sense that there are named types that you can instantiate, the resulting things have named fields, and there's some polymorphism going on when you use protocols. But it's not really very OO in my opinion.
http://clojure.org/datatypes and http://clojure.org/protocols are the official docs, if you want to know exactly what you're getting.
"Object oriented" and "functional" are so loosely-defined that it's almost best to avoid using the terms entirely, in my opinion. See http://clojure-log.n01se.net/date/2010-04-21.html for some of Rich Hickey's opinions on how OO Clojure is nowadays. Rich uses the term "abstraction-oriented" to describe Clojure.
Some people can overcome these things without help, of course, and more power to them. Just another option to consider.
I expect some people will agree and some disagree with what I wrote. I enjoy the discussion, but I don't get anything else out of it. I didn't have any notion that I'd convince anyone of anything. It was not an attempt to manipulate anyone. Not a conscious attempt anyways. Certainly not an attempt to manipulate people into giving me money, so I think the analogy doesn't hold.
However I may be wrong about this, it may be that my language is overboard in the way you say. Thanks for some food for thought.
Likewise, ad-blocking isn't really "devastating" the internet, is it?
Are you OK with a bunch of marketing guys sitting in an office thinking "How can we manipulate people's sex drives to maximize profit this week?" Razor commercials: Hunky guy shaves; heavily-airbrushed, scantily-clad woman looks on longingly. Implication: Buy our razors, get laid. Flashing lights and "power words". Repeat over and over until you can't forget it. What's the difference between commercials and any other form of propaganda? Commercials are more mundane, but use the same principles.
Sorry, but I feel mildly insulted by this. I feel like I'm being treated like an animal. After the ten thousandth attempt to have such a thing drilled into my brain, I start to become annoyed. I'm amazed so many people happily imbibe and internalize these things without any complaint.
I have no problem with sites that have subscription models. I have no problem with sites making money.
I looked at the ads on Ars briefly, both animated Flash ads, one for razor blades and the other I couldn't even tell what it was selling. I admit to being very emotional about this, and I can understand how some people can tolerate these, but I can't.
I'm uncertain I see your point about books. Are you asking why I can ignore the ads in the back of books, but not ignore the ones on websites? Because it's possible to read the book start to finish without any knowledge whatsoever that the ads exist. It's trivial to ignore them. If the ads on websites were all relegated to some page I had to deliberately navigate to, that'd be similar.
I think in some ways the Internet and its vast anonymity feeds into a culture where many people do not think about the people, the families, the careers that go into producing a website.
And:
And anyway, my point still stands: if you like this site you shouldn't block ads.
These sound like ethical statements to me. I may be reading more into the language of the article than is warranted, but that's how I read it: "Don't block ads because it hurts people, hurts businesses, and is therefore wrong to do."
Loud noises, cute kittens, catchy songs, scary consequences, status symbols, repetition until you can't forget the company's name if you tried. That's not any information I need.
I wouldn't extrapolate beyond that. I don't know what languages are good for writing super-programs since I never wrote one. Super-programs are a small subset of all programs.