HomeBlogCategory: “emacs”

Showing only posts in category “emacs”.

Show all

Dec
19
2009
18:32

The greatest programmer in the universe

Want to know who that is?  It's me. ;-)

I submitted my Ymacs project to Ohloh (Ymacs project page at Ohloh).  They have a nice feature that gives some statistics, based on the source code (they can understand some source control repositories, including Mercurial, which is what I use).  The Ymacs statistics say the following (the whole source taken into consideration):

  • estimated effort: 4 person-years
  • project cost: $210,926 (for a $55000/year salary)

    Counting only the JavaScript files, which is the main programming language, we have:

    • estimated effort: 1 person-years
    • project cost: $61,739 (same $55000/year salary)

    The fact is: I did this myself in a bit more than 2 months (work on the website and infrastructure included).

    It's true that Ymacs includes a build of DynarchLIB in it's source repository, and DynarchLIB started in 2005 (I didn't work on it full-time, though, far from it).  However, Ohloh counts DynarchLIB as a single line of code, because the code is minified, so it probably doesn't add much in the 1 person-years estimation.

    Once I put up a public code repository for DynarchLIB, it will be interesting to see how much Ohloh underestimates me. :-)

        Nov
        10
        2009
        23:00

        Ymacs — AJAX source code editor

        I just released a new project that I've been working on for about a month: Ymacs is an AJAX text editor, suitable for editing source code (currently there is support for JavaScript and XML, but more modes could be easily implemented).

        Ymacs is a DynarchLIB widget, which makes it easily embeddable into any DynarchLIB application.  This doesn't sound impressive, isn't it, but here's the real good news: I've decided to open source DynarchLIB and release it under a BSD-style license.  Some folks might believe this project is already dead, but this isn't so; it is true that there was no new release in almost two years, but the thing kept being improved and there are people using it in successful commercial applications.

        Well..  This should happen any minute, but I'm running out of time, as usual.  So it could take a few more days to push a new DL release.  In the mean time, go check Ymacs, it's pretty cool.  It has Emacs key bindings too. ;-)

        Aug
        09
        2009
        11:51

        Editing JavaScript with Emacs — js2-mode

        I wrote about this topic before.  My small hackish mode attracted a few people for its good indentation, but it still had some issues that were hard to track down.  In short, it's quite impossible to use c-mode's indentation.

        In the last few days I played with Steve Yegge's excellent js2-mode and I'll write about my setup here.  js2-mode is different from most other programming modes that you can find in Emacs (and in any other editor for that matter), because it employs a full, solid parser of the language.  Instead of guessing the syntax with buggy regexps, js2-mode actually parses your code into an abstract syntax tree (AST) and can therefore provide complex information about it, not to mention very good syntax highlighting.  For example, js2-mode can and does warn you about syntax errors such as misplaced parens, or missing semicolon, or trailing comma.  Or about undeclared variables — a ”must have” with JavaScript, since it's usually the source of many subtle bugs.

        I noticed this excellent mode about an year ago, but indentation was simply unbearable so this is why I didn't use it.  But now I decided to give it a second try.  Indentation can be fixed.

        [ read full story... ]

        Aug
        09
        2009
        11:51

        js2-highlight-vars-mode

        This is a minor mode that I wrote on top of js2-mode which automatically highlights all occurrences of the variable under the cursor within its defining scope.  I once saw this at a friend who was using Eclipse, and I thought it's pretty cool.  With the powerful API that js2-mode exposes, it was pretty easy to write it, even despite my limited (E)Lisp experience.

        [ read more... ]

        Nov
        06
        2008
        23:39

        Emacs, my Wife and my Muse

        Wait a minute...  Emacs is not my wife.  I'm spending too much time with Emacs.  If you used Emacs (or VIM for that matter, same thing) for more than a few years, then you know how frustrating it is to try to convince other people about the true genious that rests in your editor.  In 10 years of using Emacs I convinced many frieds to try it and some were quite successful and agreed that Emacs is "The Shit".  However, half a year later, they kept telling me how Emacs sucks and .Net studio rules.  Oh well.

        This story is about Emacs and about my wife.  My wife knows so little about computers, that to her, the difference between Emacs and Notepad is not obvious.  You see, she has to write a few papers for her university degree (God I'm so glad for I never finished one).  She did these with OpenOffice.

        [ read more ]


        Filed in: emacs, life, rants5 comments
        May
        25
        2008
        12:33

        Emacs JavaScript mode

        Here's my update to an old javascript-mode (authors Steven Champeon and Ville Skyttä).  In essence, I was unhappy with indentation, but I also removed some stuff that I don't need and fixed various small things, such as highlighting literal regexps.

        The indentation is based on CC Mode, which is almost Good Enough for JavaScript; the original javascript-mode.el (note that I'm talking about the version I had back in 2004; they might have fixed it in between, but I don't think so) had some indentation problems, for examples in cases like this:

        [ go to project page ]

        Filed in: emacs, programming11 comments
        Feb
        16
        2008
        15:50

        A movie Subtitle Editor

        A few days ago I wanted to create Romanian subtitles for a movie that I want to watch with my friends.  After Googling around I found 4 projects that claim to do this in Linux.  These are:

        • gnome-subtitles
        • ksubtile
        • subtitleeditor
        • gaupol

        All of them seemed very disappointing.

        ( go to project page... )

        Filed in: emacs, programming14 comments
        Nov
        22
        2007
        22:40

        Close last XML tag (Emacs)

        I'm using Emacs for almost 10 years, but still I never wrote too much about it.  Partly, the reason is that I'm not an Emacs guru (although I'm using it for 10 years, imagine that).  Emacs is so functional in itself that you don't have to become a “guru” to like it (by “guru” here I mean someone who can bring substantial improvements by writing Lisp code, such as writing a major mode).

        I'm using Emacs for most my editing needs.  These include, sometimes, typing text in a <textarea> in Firefox (there is a nifty extension called “it's all text” which allows you to use a decent editor to type in those rough boxes).  I also frequently use Emacs for typing email (check Wanderlust if you haven't already, one of the best email clients I ever used).  And obviously for writing source code of any kind—XML, JavaScript, Java, C, Perl, Python, Ruby—you name it, we have it.  I remember a great saying by Paul Graham: “all other things being equal, it's a bad decision not to chose the best programming language for your problem” (that's not ad literam what he said, but you get the point).

        ( read more... )

        Filed in: emacs, programmingNo comments
        See also