News for hackers. Stuff that matters.
Re:My Lisp Experiences and the Development of GNU Emacs by thurn on Sunday June 05, 2011 @04:43PM (#2622806)
Emacs is the first and probably best proof that you can write fast and responsive software without needing to stick close to machine code the whole time. It's a compelling counterexample to those who don't believe you can write "real" software in Python or Ruby.
Re:My Lisp Experiences and the Development of GNU Emacs by jedbrown on Sunday June 05, 2011 @06:08PM (#2622957)
My biggest problem with Emacs today is responsiveness. This is partly due to lack of threading, partly due to slow execution of Elisp code, and partly due to poor data structures/database use in the back end (e.g. for maintaining indexes). I have to throttle semantic analysis from CEDET just to have a usable system and I avoid other features because they just take too long to run.

My Emacs session has been running for two weeks and I have 560 open buffers, which amounts to a memory usage of 620 MB. I don't think it's unreasonable for most every interactive operation to be instant.

I don't blame Lisp for the slowness, except insofar as the language promotes the use of data structures like simple lists that eventually create bottlenecks, and that the Elisp implementation is not very fast compared to something like SBCL.

Re:My Lisp Experiences and the Development of GNU Emacs by technomancy on Monday June 06, 2011 @01:22AM (#2623783)
I use Emacs all day every day and have never experienced anything like this. I suspect the problem is specific to CEDET.
Re:My Lisp Experiences and the Development of GNU Emacs by copper on Monday June 06, 2011 @02:56AM (#2623948)
It's what happens if you use cedet/ecb on lots of code. I like the code completion and other features they give me, but it is just too slow to keep on always.
Re:My Lisp Experiences and the Development of GNU Emacs by winestock on Sunday June 05, 2011 @11:01PM (#2623526)
Agreed on the responsiveness issue. You don't even have to open hundreds of buffers, either. Emacs has given me embarrassing pauses while auto-saving a text file only a few kilobytes in size. Emacs will also make the text flicker as it redisplays the buffer every few minutes.
Re:My Lisp Experiences and the Development of GNU Emacs by Lozzer on Monday June 06, 2011 @08:18AM (#2624427)
It's probably irrelevant, but maybe http://www.method-combination.net/blog/archives/2011/03/11/s... will help
Re:My Lisp Experiences and the Development of GNU Emacs by winestock on Monday June 06, 2011 @09:56PM (#2627581)
Thank you, I'll try it.
Re:My Lisp Experiences and the Development of GNU Emacs by ssp on Sunday June 05, 2011 @05:23PM (#2622870)
Maybe I'm missing the joke, but Emacs was famous for bringing multi-megabyte machines to their knees and garbage collecting for minutes. The joke was that emacs stood for "eight megabytes and constantly swapping".
Re:My Lisp Experiences and the Development of GNU Emacs by pjscott on Sunday June 05, 2011 @08:56PM (#2623286)
According to the GNU Emacs docs, it can also stand for "Emacs Makes A Computer Slow", "Eventually Mallocs All Computer Storage", or (my favorite) "Escape Meta Alt Control Shift".
Re:My Lisp Experiences and the Development of GNU Emacs by thurn on Sunday June 05, 2011 @05:34PM (#2622891)
The joke was popular among the more elitist vi users, sure, but Emacs was a widely used and useful piece of software 20 years ago on processors a dozen times slower than today's. That's a success story in my books.
Re:My Lisp Experiences and the Development of GNU Emacs by abecedarius on Sunday June 05, 2011 @08:47PM (#2623272)
Yes, Emacs was bigger and sometimes slower than typical editors of the day, but no, I never saw anything like "garbage collecting for minutes". (I used it on a 486 with 8M; I think I also used it some on a 386 with 4M in console mode, but the old memory's getting fuzzy.)
Re:My Lisp Experiences and the Development of GNU Emacs by angus77 on Sunday June 05, 2011 @07:33PM (#2623112)
Which would've been funny when eight megabytes was a lot of memory. Just try and buy that little memory today.
Re:My Lisp Experiences and the Development of GNU Emacs by rbanffy on Sunday June 05, 2011 @08:43PM (#2623260)
If you manage to do it, it's ridiculously expensive. Believe me - I restore interesting computers from the 80's and early 90's
Re:My Lisp Experiences and the Development of GNU Emacs by rawsyntax on Sunday June 05, 2011 @06:58PM (#2623041)
I find that emacs ruby-mode slows to a crawl when editing a 6000 line ruby file. Now I realize the file is way too long ( these things take time to fix / refactor ), any tips on getting it to be more responsive?
Re:My Lisp Experiences and the Development of GNU Emacs by baddox on Sunday June 05, 2011 @05:01PM (#2622840)
Who doesn't believe that?
Re:My Lisp Experiences and the Development of GNU Emacs by zmanji on Sunday June 05, 2011 @05:15PM (#2622861)
Sadly, many people don't. Try bringing up the idea of writing a large program in Ruby or Python and they'll balk at you saying that the languages are too slow. They will insist on using C++ or Java.
Re:My Lisp Experiences and the Development of GNU Emacs by mquander on Sunday June 05, 2011 @05:35PM (#2622894)
I don't think this hypothetical person is going to be a big emacs fan either.
Re:My Lisp Experiences and the Development of GNU Emacs by Jach on Sunday June 05, 2011 @05:47PM (#2622925)
You'd be surprised. I think it's basically what they're raised on. I recently gave an info talk at my old high school CS class where they use Linux, emacs, and learn C++ and (in the AP class) Java. One student in particular was anti-Python due to speed issues but it wasn't too hard to talk him down after examples and explaining ways to speed it up.
Re:My Lisp Experiences and the Development of GNU Emacs by tjarratt on Sunday June 05, 2011 @06:17PM (#2622972)
I've found the "developer time is more important than machine time in 99% of cases" argument to be particular effective when preaching python to the C++ masses.
Re:My Lisp Experiences and the Development of GNU Emacs by Jach on Monday June 06, 2011 @11:45AM (#2625083)
It's effective, but less-so when the audience hasn't programmed anything Big before. If you've only done programming in school, and all of your C++ assignments take anywhere from 1 to 12 hours to complete, it's hard to see the dev time benefits.
Re:My Lisp Experiences and the Development of GNU Emacs by gaius on Monday June 06, 2011 @06:08AM (#2624228)
That is a very dangerous myth, IMHO. Sure, sometimes it's true. But when it's not, you're up the creek without a paddle.
Re:My Lisp Experiences and the Development of GNU Emacs by rbanffy on Sunday June 05, 2011 @09:35PM (#2623367)
Not only that, but, unless you are in that 1% , the money you'd spend on developers could buy a much beefier server.
Re:My Lisp Experiences and the Development of GNU Emacs by gaius on Monday June 06, 2011 @06:10AM (#2624230)
Well, if we're talking about scale, there is a significant difference between needing 100 servers and needing a 10,000. As in, you suddenly have far fewer choices as to where you can physically put them! At that point, suddenly, developers start to look very, very cheap next to hosting costs.

If you just need to buy 2 servers instead of 1 then sure, yeah, developer time is more expensive than hardware.

Re:My Lisp Experiences and the Development of GNU Emacs by rbanffy on Monday June 06, 2011 @07:49AM (#2624367)
How many applications you know that need 100 servers?

I know of only a few that need 10...

Re:My Lisp Experiences and the Development of GNU Emacs by gaius on Monday June 06, 2011 @08:13AM (#2624413)
The one I work on, for a start :-) A good deal more in fact...

But it's not just servers. You are up against physical availability of stuff, and stuff gets exponentially more expensive as you approach the limit. A programmer who is wasteful of memory on a single box will eventually reach a point where you simply can't buy more, you will have to rewrite the app to run on more machines, for example. At the small scale, sure, programmer time is expensive. But on an industrial scale, programmers are pretty cheap compared to say "building and operating an entire new datacentre".

Re:My Lisp Experiences and the Development of GNU Emacs by rbanffy on Monday June 06, 2011 @12:51PM (#2625370)
If you are in the 10+ server league, you already are in that 1% where code efficiency and performance become more important than iteration speed or ease of development. In fact, it would be interesting to map where this transition occurs ;-)

And computers are cheap, regardless of how many you have. You say a datacenter with 50K servers is expensive, but imagine how bad would it be to maintain a building with 50K programmers...

Re:My Lisp Experiences and the Development of GNU Emacs by prodigal_erik on Monday June 06, 2011 @12:25AM (#2623691)
Even if 90% of startups fail, surely more than 10% of the survivors will have Twitter-esque scaling problems if all their prototypes were on platforms with severe performance drawbacks.
Re:My Lisp Experiences and the Development of GNU Emacs by gaius on Monday June 06, 2011 @05:43AM (#2624192)
Real Python people are totally pragmatic about this - if you need performance, drop into C for critical routines and use Python to glue it all together. This is how NumPy works, you totally can do hard-core number crunching in Python and never need to actually know that it's C or FORTRAN under the hood!

Other language communities make a point of being self-contained and consider it a failure if you need to use a native method, but as ever, it's about the right tool for the job.

Re:My Lisp Experiences and the Development of GNU Emacs by rbanffy on Sunday June 05, 2011 @08:52PM (#2623282)
In my experience, most Java zealots use Eclipse. Emacs folks typically are more hands-on people. The C++ crowd I know is more or less split between Emacs and Visual C++.
Re:My Lisp Experiences and the Development of GNU Emacs by tjarratt on Sunday June 05, 2011 @06:16PM (#2622968)
In general a "hypothetical person" probably isn't going to be a big fan of any one technology, platform, language, etc.

There are too many choices and everything is fragmented to the point that it's hard to find any common ground between ruby developers, js / jquery developers, old school c++ hackers, bash-scripting sysadmins and even perl gurus.

Emacs definitely isn't the most popular editor I've ever used though. When someone asks me why I use it, I usually give a short one minute demo where I macro a bunch of changes, show git integration, multiple buffers, and use some pre/post save hooks. Few editors come close to matching Emacs feature set.

Re:My Lisp Experiences and the Development of GNU Emacs by bitsai on Monday June 06, 2011 @12:26AM (#2623697)
I'm really bewildered by all the options for emacs-git integration. Which one is your method of choice?
Re:My Lisp Experiences and the Development of GNU Emacs by technomancy on Monday June 06, 2011 @01:24AM (#2623789)
I can't imagine using git with anything other than magit (whether from Emacs or not).
Re:My Lisp Experiences and the Development of GNU Emacs by bitsai on Monday June 06, 2011 @11:02AM (#2624925)
I'll take a look. Thanks!
Re:My Lisp Experiences and the Development of GNU Emacs by tjarratt on Sunday June 05, 2011 @06:13PM (#2622965)
I'll see your emacs as "best proof" and raise you node.js - sure it's C++ underneath, but few people are going to argue that interpreted javascript is "close to machine code". For some tasks, elisp is a clunky and slower than writing a shell script or small python/ruby/javascript process to do the same work. I don't even want to mention the horror that is finding correct documentation for a given version of emacs lisp compared to any other software or language.

disclosure: I'm currently writing a small node server in emacs. I'm happy with both as they are very responsive, but emacs does chug occasionally like a bro at a frat house.

Re:My Lisp Experiences and the Development of GNU Emacs by swolchok on Sunday June 05, 2011 @06:51PM (#2623023)
node.js isn't interpreted; it uses V8, which is a JIT.
Re:My Lisp Experiences and the Development of GNU Emacs by dkarl on Sunday June 05, 2011 @10:16PM (#2623447)
No matter how the underlying implementation works, programming in neither Emacs Lisp nor Javascript could be described as "sticking close to machine code the whole time," as the original comment stated.
Re:My Lisp Experiences and the Development of GNU Emacs by technomancy on Sunday June 05, 2011 @07:27PM (#2623104)
Emacs Lisp is also typically byte-compiled.
Re:My Lisp Experiences and the Development of GNU Emacs by mahmud on Sunday June 05, 2011 @08:26PM (#2623228)
JIT != byte compilation.