Are there technical reasons why Emacs is better than an IDE?

P

Philippe Faes

It is no secret that Sigasi wants to take on Emacs and the Emacs VHDL
mode. I have posted several articles about the fundamental differences
between Emacs and Sigasi: http://www.sigasi.com/emacs
It usually boils down to the limitations of regular expressions and
pattern matching. There are just certain things that require a parser
rather than a simple pattern matcher.

To end my series of blog posts about Emacs vs. Eclipse/Sigasi, I am
interested to hear what you think: are there any _technical_ reasons
why Emacs is still better than an IDE solution? Or is it just a matter
of "I love this tool and nobody is going to deny me my rights?"

http://www.sigasi.com/content/room-improvement

thanks

Philippe
 
A

Alan Mackenzie

In comp.emacs Philippe Faes said:
It is no secret that Sigasi ....

Who? What?
.... wants to take on Emacs and the Emacs VHDL mode.

Emacs is free software. Anybody may take it on.
I have posted several articles about the fundamental differences
between Emacs and Sigasi: http://www.sigasi.com/emacs It usually boils
down to the limitations of regular expressions and pattern matching.

"It"? Differences come down to limitations? Sir, you are not expressing
yourself at all clearly.
There are just certain things that require a parser rather than a
simple pattern matcher.

Of course there are. What's new? Arbitrarily nested structures (think
program source) cannot be parsed by regexps. Try using a push-down
automaton.
To end my series of blog posts about Emacs vs. Eclipse/Sigasi, I am
interested to hear what you think: are there any _technical_ reasons
why Emacs is still better than an IDE solution?
Yes.

Or is it just a matter of "I love this tool and nobody is going to deny
me my rights?"

Hmmm. On comp.emacs. You wouldn't happen to be trolling, now, would
you?
 
M

Mike Treseler

It is no secret that Sigasi wants to take on Emacs and the Emacs VHDL
mode. I have posted several articles about the fundamental differences
between Emacs and Sigasi: http://www.sigasi.com/emacs
It usually boils down to the limitations of regular expressions and
pattern matching. There are just certain things that require a parser
rather than a simple pattern matcher.

The full language is hard for a parser as well,
but all you need to cover are the parts
that my simulator can't feed back.

I am most interested in clean sim interfaces
and makefile generation because my simulator
is already good and fast at marking errors in
syntax (vcom -c a_unit) and
elaboration (vsim -c a_unit).

Getting these errors fed back to emacs vhdl-mode
requires careful configuration and a few custom
elisp functions. This seems to be an area where
you might have an advantage.

To end my series of blog posts about Emacs vs. Eclipse/Sigasi, I am
interested to hear what you think: are there any _technical_ reasons
why Emacs is still better than an IDE solution? Or is it just a matter
of "I love this tool and nobody is going to deny me my rights?"

In any case, there are many fewer emacs users than non-users,
so you have a good chance.

-- Mike Treseler
 
N

NeedCleverHandle

It is no secret that Sigasi wants to take on Emacs and the Emacs VHDL
mode. I have posted several articles about the fundamental differences
between Emacs and Sigasi:http://www.sigasi.com/emacs
It usually boils down to the limitations of regular expressions and
pattern matching. There are just certain things that require a parser
rather than a simple pattern matcher.

To end my series of blog posts about Emacs vs. Eclipse/Sigasi, I am
interested to hear what you think: are there any _technical_ reasons
why Emacs is still better than an IDE solution? Or is it just a matter
of "I love this tool and nobody is going to deny me my rights?"

http://www.sigasi.com/content/room-improvement

thanks

Philippe

Just a few off the top:
1) emacs can be run in batch mode, so all of the 'AUTOs' can be
updated at once.
2) emacs is a much more powerful editor. There are times you NEED
rectangle cut/paste.
3) emacs developers don't spam usenet.

I prefer less volatile discussions than editor choices - religion and
politics are typically less incendiary.
 
N

Nicolas Matringe

Le 27/06/2011 13:06, Philippe Faes a écrit :
To end my series of blog posts about Emacs vs. Eclipse/Sigasi, I am
interested to hear what you think: are there any _technical_ reasons
why Emacs is still better than an IDE solution? Or is it just a matter
of "I love this tool and nobody is going to deny me my rights?"

Emacs can do soooooo many more things than VHDL editing.
Why use a different IDE for each language ?

Nicolas
 
J

Jan Decaluwe

Le 27/06/2011 13:06, Philippe Faes a écrit :


Emacs can do soooooo many more things than VHDL editing.
Why use a different IDE for each language ?

That is not the proposal, quite the opposite. The proposal is
to use Eclipse as the IDE, and Sigasi HDT as its "VHDL mode".

Jan
 
J

Jan Decaluwe

Just a few off the top:
1) emacs can be run in batch mode, so all of the 'AUTOs' can be
updated at once.

The fact that you actually need 'AUTOs' (?) and batch mode shows that
a more powerful IDE may be quite useful.
2) emacs is a much more powerful editor. There are times you NEED
rectangle cut/paste.

Whatever it is in emacs, this is certainly not easier than
'Toggle Block Selection' (Shift+Alt+A).
3) emacs developers don't spam usenet.

This is on-topic content, written on a specific occasion by real
people. Calling it spam just because you thoroughly dislike the
message is a little cheap.

Jan
 
T

Thomas Stanka

To end my series of blog posts about Emacs vs. Eclipse/Sigasi, I am
interested to hear what you think: are there any _technical_ reasons
why Emacs is still better than an IDE solution? Or is it just a matter
of "I love this tool and nobody is going to deny me my rights?"

Maybe it is just the fact that emacs is for free and good enough, so
why bother about Sigasi?
I assume you already included open script interface in your sigasi
tool to be at least on the obvious parts on-pair with emacs, but as
long as I'm fine with gnu tool, I see no reason to check alternatives
every 6 months.
 
P

Philippe Faes

Thank you all for your input.

The technical arguments I hear are:

Mike said:
The full language is hard for a parser as well,
but all you need to cover are the parts
that my simulator can't feed back.
Some editor features require a full parser (and: yes, it is hard),
including correct navigation and refactoring.
I am most interested in clean sim interfaces
and makefile generation […]
Duly noted. Sigasi offers some of this, but we know we still need to
improve on this.
1) emacs can be run in batch mode, so all of the 'AUTOs' can be
updated at once.
Note that you are bringing up Verilog as opposed to VHDL now.
This particular use case (automatic template expansion in Verilog)
would be a good argument for interactive tools rather than batch
processing. Checking and updating sensitivity list is something that
can easily be done interactively.

If you want to discuss any specific other use cases for batch mode,
I'll be happy to dig deeper into this subject.
2) emacs is a much more powerful editor. There are times you NEED
rectangle cut/paste.
As Jan Decaluwe points out, Eclipse supports block editing. I am
interested to learn of other features that make Emacs a much more
powerful editor.

Nicolas said:
Emacs can do soooooo many more things than VHDL editing.
Why use a different IDE for each language ?
Again as Jan points out: that is exactly my point. The Eclipse
platform will offer a wide range of language-specific plug-ins to
choose from.
Emacs has very capable parsers built-in.  Whether VHDL editing needs
them is not clear; [...]
Emacs has a very capable regex matcher, but not a VHDL parser.
A built-in parser enables several things such as semantic highlighting
and correct navigation. As I pointed out in my original post, I have
discussed this at length elsewhere.

I'll throw in one myself:
Sorting lines alphabetically is a pain in Eclipse. There are some not-
so-stable or not-so-recent plugins that support this feature, but
people usually don't install a new plugin just to get one simple
operation.

Any other thoughts are still more than welcome.

-- Philippe
 
L

Lieven Lemiengre

Read "Beautiful Architecture" [1] chapter on emacs for a good look at
how and why emacs is great, and how it compares to other architectures,
namely Eclipse and Firefox.

[1]http://oreilly.com/catalog/9780596517984
    Chapter 11 GNU Emacs: Creeping Featurism Is a Strength

I looked it up and I quote:
"As a development environment, Eclipse provides valuable features that
Emacs lacks. For example, the Java Development Tools plug-ins provide
extensive support for refactoring and code analysis. In comparison,
Emacs has only a limited understanding of the semantic structure of
the programs it edit and can't offer comparable support."
 
B

Benjamin Couillard

Hi everyone,

One thing I have trouble understanding is the following. Designers
typically spend way more time debugging VHDL code, running
simulations, debugging "real" hardware than writing actual code.
Therefore, I have trouble understanding why comparing Sigasi to Emacs
is so important? A lot of the Emacs feature are basically tools to
write code faster (code completion, sensitivity list updating, etc.).
Even If I write code 10% faster, this is probably the equivalent of a
driver speeding up only to being forced to stop because the light is
red. The analogy is imperfect, but basically in real life I'm limited
by the simulation speed of my simulator, I'm limited by the synthesis/
p&r of Xilinx/Altera/etc. I'm limited by real-life issues like a
faulty board, unclear specifications, project management, etc. Rarely
have I felt limited by notepad++ even though it is a simple code
editor with syntax highlighting.

I agree than Sigasi looks interesting from a code refactoring, project
management and code comprehension perspective but less so from a
"writing code faster point of view". What would be important for me,
is good integration with Xilinx (or Altera) and good integration with
Modelsim (or Aldec).

Just my 2 cents.

Benjamin
 
A

Alessandro Basili

Hi everyone,

One thing I have trouble understanding is the following. Designers
typically spend way more time debugging VHDL code, running
simulations, debugging "real" hardware than writing actual code.

How do you debug your code? Isn't this process of "debugging real
hardware" just a matter of reading your code and understanding what it
is doing? After all if the hardware doesn't work (except for
pathological cases of bad pcb/pca, see later) is just because you wrote
something wrong.
From this perspective having an editor that helps you out in the process
of reading and editing your file is definitely a powerful tool.

Would you write code with notepad? or a word processor? or with a pen
and paper?
If the answer is no (as I presume), than the added value of a smart
editor is not negligible.
Therefore, I have trouble understanding why comparing Sigasi to Emacs
is so important? A lot of the Emacs feature are basically tools to
write code faster (code completion, sensitivity list updating, etc.).
Even If I write code 10% faster, this is probably the equivalent of a
driver speeding up only to being forced to stop because the light is
red. The analogy is imperfect, but basically in real life I'm limited
by the simulation speed of my simulator, I'm limited by the synthesis/
p&r of Xilinx/Altera/etc.

That is why you should spend more time reading and editing the file
rather than running simulation.
If you try to write an ARM architecture full of peripherals and then
assume your simulation will run through and spot all the problems then I
understand your frustration, but I also believe the approach is wrong.

Project segmentation is a very old technique that is always applicable.
Make your components generic enough to be reusable, not too small
otherwise you will loose the overview of your design and you will
clutter the code with components instantiation. Not to big otherwise you
will loose valuable details of the design (usually the brain is the best
tool to decide where to put the boundary).
At this point test your components individually with a dedicated test
bench (try "C-c C-p C-t" on emacs and then let's review your 10% speed
increase) in order to trust your basic elements of your design. Only
then you can more reliably move to the next step of connecting the
components together, to build a bigger piece.

Usually this approach force the designer to think about the interface
between the components and maybe try to make it standard (like a bus).
So the outcome of this process is not only more reliable, but enable the
designer to build a mental toolbox of "good practices" rather than
"dirty tricks".
I'm limited by real-life issues like a
faulty board, unclear specifications, project management, etc. Rarely
have I felt limited by notepad++ even though it is a simple code
editor with syntax highlighting.

The faulty board, unclear specifications, project management, etc. issue
are certainly part of the process.
This is why your work flow should be such that the PCB is going through
a verified building process, your PCA is visually inspected and your
components are previously screened for "infant mortality" before you can
even think about testing anything.

About the unclear specification that is certainly something you need to
work out earlier with your customer, otherwise you'll be off doing
something different from what he/she had in mind. And this has nothing
to do with the hardware at all. Same conclusion applies to the project
management problems which are not a good reason to justify your faulty
design (even though they maybe blamed for an incomplete one).

My background comes from antifuse-logic, where one chip programmed is
certainly one chip thrown away if you don't verify your code. Code
review and also "rubber duck debugging" are most of the times very good
practices that helps you out in getting rid of clumsy and unmaintainable
implementations.
I understand that it's tempting sometime to "load it and see if it
works", but if you face all the problems at once you may get in real
trouble with your schedule. IMHO this temptation is mostly due to the
volatility of the work, which comes from the nature of the hardware
used. The so called firmware we load in fpgas is similar to software
from an "easy to change" standpoint and this affect deeply the mindset
we have in the design and implementation phase.
Should you pay from your own pocket every time you release a version
that needs to be one time programmed on a chip at a cost of several K$ I
bet my salary you would definitely go back and thoroughly review your
process to make sure you don't miss anything anywhere and if you do I
bet the second salary you will try to understand what you did wrong the
first time.
I agree than Sigasi looks interesting from a code refactoring, project
management and code comprehension perspective but less so from a
"writing code faster point of view". What would be important for me,
is good integration with Xilinx (or Altera) and good integration with
Modelsim (or Aldec).

Code refactoring is not the only motivation for a good editor. Browsing
capabilities in the components structure is extremely important since it
allows you to navigate your source in a faster and more efficient way,
leaving you the time to think about the problem, as opposed to the
simulation where you need to go for a coffee or maybe two, since you are
"waiting" for the result.
Spending more time with your editor will also allow you to write better
maintainable code, since if you do have some sense of aesthetic you will
find that a poorly written code is poorly maintainable also.
Just my 2 cents.

In response to the OP I have to say that having an editor instead of a
tool is way much better, since editing is something that is part of our
daily work and every time we use the editor we learn better how to use
it, regardless of the mode.
 
A

Andreas Ehliar

To end my series of blog posts about Emacs vs. Eclipse/Sigasi, I am
interested to hear what you think: are there any _technical_ reasons
why Emacs is still better than an IDE solution? Or is it just a matter
of "I love this tool and nobody is going to deny me my rights?"

Well, I think I could characterize myself as a fairly competent Emacs
user. However, just for fun I have just downloaded Sigasi 2.0 to look
into whether it could replace Emacs for my VHDL editing tasks.

However, do be aware that I've used Emacs as my main editor since
about 1998. So this is not likely to be a very fair comparison since I
haven't used Sigasi for more than an hour or so by following the
tutorial and trying it on one of my own VHDL projects.

What follows are some notes from my testing and what I find missing as
compared to Emacs. Of course, some of these features may be present
but not working in exactly the same way as in Emacs which is why I
didn't find them.

* When using Emacs I can just type "emacs filename.vhd" (or an alias
for emacsclient if I expect that I will need to look into a lot of
different files using the same editor instance).

I'm not sure how to do this in Sigasi. Merely typing sigasi
filename.vhd doesn't seem to work at least and sigasi -h or sigasi
--help didn't give me any indication that it is possible to do this
from the commandline easily.

* It was fairly easy to find and enable the Emacs key scheme which
made it quite a bit more comfortable to use for me. Good.

* Incremental search worked as expected when pressing C-s and
C-r. However, some useful commands in Emacs are not present. Of this
the greatest loss is C-w (which adds the string following the cursor
to the search string). Very convenient when you want to search for
the word you are currently looking at. Nevertheless, merely the
presence of an easy to use incremental search is a big plus.

* Ctrl-g didn't work to abort a search and return to the start
location of the search as expected. However, Ctrl-x Ctrl-x worked as
expected which is good.

* I use M-q in Emacs all the time when writing text (for example in
the form of comments) to make sure that the text is nicely aligned
and doesn't exceed a user configurable number of characters per
line. (Usually a little less than 80.) In Sigasi M-q doesn't seem to
do anything.

* There doesn't seem to be any kill ring functionality. (Or similar
history functionality for other commands such as search.)

* The keys for rectangular cut and paste and string rectangle don't do
anything. (Neither the standard keybindings nor the cua-mode version
where you press ctrl-enter to start a rectangular selection.)

* I couldn't find any keyboard macro functionality :( This is actually
a really big issue for me. If you don't have macros you can't do a
lot of really really neat tricks. While I don't use keybaord macros
every day, they can really save you a lot of work in some
situations. See the following youtube clip for some inspiration:

* C-x C-b worked to select the buffer as expected. Good! (However, it
is not as powerful as iswitchb-mode in Emacs.)

* I turned off the Emacs keybindings to enable the use of C-SPACE
for template insertion. I'm somewhat skeptical about how these are
implemented, but I admit that this may be because I'm not used to
them.

* After trying out C-SPACE I changed the keys back to Emacs again. But
this change didn't seem to take effect. Perhaps I did something
wrong? A restart of Sigasi didn't fix it either.

* When opening an existing design which included components written in
both VHDL and Verilog there was no support for Verilog at all in the
editor. (Since I use both Verilog and VHDL fairly frequently this is
an issue for me. If you use Verilog rarely it may not be a big
problem though.)

All in all, Sigasi seems to be a major step up as compared to some
other VHDL editing solutions (for example, I'd much rather use Sigasi
than the ISE text editor). However, it will not replace Emacs for me
anytime soon I'm afraid.

The main reason why it is very hard to get me to change from Emacs to
some other editor is that my entire workflow is based around
Emacs. This allows me to utilize the same skill set regardless of
whether I edit Verilog, VHDL, HTML, C, shell script, or MP3
files. (Yes, I have done some simple editing of MP3 files in Emacs in
some situations.)

In addition to text editing I'm also using Emacs for reading mail,
organizing my schedule, and dealing with my TODO-list. I often find
myself running a shell from within Emacs as well. (The unix shell
running in split screen with a scratch buffer in Emacs can do some
really powerful things when combined with macros.)

I could probably spend another hour here merely listing some nice
Emacs tricks but I think I'll end here by wishing you good luck. While
I don't expect many die hard Emacs users to switch to Sigasi I think
you may have a good chance of snatching up people who only use Emacs
for VHDL editing.

regards
/Andreas
 
P

Philippe Faes

Well, I think I could characterize myself as a fairly competent Emacs
user. However, just for fun I have just downloaded Sigasi 2.0 to look
into whether it could replace Emacs for my VHDL editing tasks.

However, do be aware that I've used Emacs as my main editor since
about 1998. So this is not likely to be a very fair comparison since I
haven't used Sigasi for more than an hour or so by following the
tutorial and trying it on one of my own VHDL projects.

Andreas, thank you for your in-depth evaluation. It seems you have
focussed on text editing and search operations. Obviously, the tool
you have known for years will give you better results.

I'm not sure if you have looked at type-time compilation (with error
checking), and other advanced VHDL-specific features (navigation,
hovers, refactoring). If anybody is to be convinced of dropping Emacs,
it would be because of those features.
What follows are some notes from my testing and what I find missing as
compared to Emacs. Of course, some of these features may be present
but not working in exactly the same way as in Emacs which is why I
didn't find them.

* When using Emacs I can just type "emacs filename.vhd" (or an alias
  for emacsclient if I expect that I will need to look into a lot of
  different files using the same editor instance).

  I'm not sure how to do this in Sigasi. Merely typing sigasi
  filename.vhd doesn't seem to work at least and sigasi -h or sigasi
  --help didn't give me any indication that it is possible to do this
  from the commandline easily.

We'll get that working soon. Thanks for pointing it out.
* It was fairly easy to find and enable the Emacs key scheme which
  made it quite a bit more comfortable to use for me. Good.
Thanks

* Incremental search worked as expected when pressing C-s and
  C-r. However, some useful commands in Emacs are not present. Of this
  the greatest loss is C-w (which adds the string following the cursor
  to the search string). Very convenient when you want to search for
  the word you are currently looking at. Nevertheless, merely the
  presence of an easy to use incremental search is a big plus.

* Ctrl-g didn't work to abort a search and return to the start
  location of the search as expected. However, Ctrl-x Ctrl-x worked as
  expected which is good.

* I use M-q in Emacs all the time when writing text (for example in
  the form of comments) to make sure that the text is nicely aligned
  and doesn't exceed a user configurable number of characters per
  line. (Usually a little less than 80.) In Sigasi M-q doesn't seem to
  do anything.

Code formatting is mapped to CTRL+SHIFT+F. Remappable, though.
* There doesn't seem to be any kill ring functionality. (Or similar
  history functionality for other commands such as search.)

Not that I know of...
* The keys for rectangular cut and paste and string rectangle don't do
  anything. (Neither the standard keybindings nor the cua-mode version
  where you press ctrl-enter to start a rectangular selection.)
Rectangle editing (block select) can be activated using CRTL+ALT+A
with normal key bindings.
There is also an icon in the tool bar:
http://www.vasanth.in/2009/03/31/eclipse-tip-block-selection-mode/
* I couldn't find any keyboard macro functionality :( This is actually
  a really big issue for me. If you don't have macros you can't do a
  lot of really really neat tricks. While I don't use keybaord macros
  every day, they can really save you a lot of work in some
  situations. See the following youtube clip for some inspiration:
 

Good point. There might be an Eclipse plugin that offers marcros in a
way that you need. I'm not sure.
* C-x C-b worked to select the buffer as expected. Good! (However, it
  is not as powerful as iswitchb-mode in Emacs.)

* I turned off the Emacs keybindings to enable the use of C-SPACE
  for template insertion. I'm somewhat skeptical about how these are
  implemented, but I admit that this may be because I'm not used to
  them.

You can tie the template insertion to another key combination if you
like:
http://www.sigasi.com/faq/can-i-change-default-key-bindings
* After trying out C-SPACE I changed the keys back to Emacs again. But
  this change didn't seem to take effect. Perhaps I did something
  wrong? A restart of Sigasi didn't fix it either.

Bug in Eclipse. Try "restore to defaults".
* When opening an existing design which included components written in
  both VHDL and Verilog there was no support for Verilog at all in the
  editor. (Since I use both Verilog and VHDL fairly frequently this is
  an issue for me. If you use Verilog rarely it may not be a big
  problem though.)

Yeah, we'll get to Verilog. We didn't want to offer syntax
highlighting because that could create false expectations.
http://www.sigasi.com/keep-me-informed-about-verilog
All in all, Sigasi seems to be a major step up as compared to some
other VHDL editing solutions (for example, I'd much rather use Sigasi
than the ISE text editor). However, it will not replace Emacs for me
anytime soon I'm afraid.

The main reason why it is very hard to get me to change from Emacs to
some other editor is that my entire workflow is based around
Emacs. This allows me to utilize the same skill set regardless of
whether I edit Verilog, VHDL, HTML, C, shell script, or MP3
files. (Yes, I have done some simple editing of MP3 files in Emacs in
some situations.)

You can edit HTML, C and shell scripts in Eclipse. Just install the
right plugin. (No MP3 editing in Eclipse, though!)
In addition to text editing I'm also using Emacs for reading mail,
organizing my schedule, and dealing with my TODO-list. I often find
myself running a shell from within Emacs as well. (The unix shell
running in split screen with a scratch buffer in Emacs can do some
really powerful things when combined with macros.)

I could probably spend another hour here merely listing some nice
Emacs tricks but I think I'll end here by wishing you good luck. While
I don't expect many die hard Emacs users to switch to Sigasi I think
you may have a good chance of snatching up people who only use Emacs
for VHDL editing.

regards
/Andreas

Thanks for the encouraging words!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top