Showing posts with label GNU Emacs. Show all posts
Showing posts with label GNU Emacs. Show all posts

Tuesday, November 8, 2011

The GNU Project and the GNU Operating System

http://www.gnu.org/gnu/thegnuproject.html

Some information for the website.
by Richard Stallman 
the original version was published in the book “Open Sources” 
The first software-sharing community - When I started working at the MIT Artificial Intelligence Lab in 1971, I became part of a software-sharing community that had existed for many years. Sharing of software was not limited to our particular community; it is as old as computers, just as sharing of recipes is as old as cooking. But we did it more than most. 
The AI Lab used a timesharing operating system called ITS (the Incompatible Timesharing System) that the lab's staff hackers (1) had designed and written in assembler language for the Digital PDP-10, one of the large computers of the era. As a member of this community, an AI Lab staff system hacker, my job was to improve this system. 
We did not call our software “free software”, because that term did not yet exist; but that is what it was. Whenever people from another university or a company wanted to port and use a program, we gladly let them. If you saw someone using an unfamiliar and interesting program, you could always ask to see the source code, so that you could read it, change it, or cannibalize parts of it to make a new program. 
(1) The use of “hacker” to mean “security breaker” is a confusion on the part of the mass media. We hackers refuse to recognize that meaning, and continue using the word to mean someone who loves to program, someone who enjoys playful cleverness, or the combination of the two. See my article, On Hacking. 
GNU software and the GNU system - Developing a whole system is a very large project. To bring it into reach, I decided to adapt and use existing pieces of free software wherever that was possible. For example, I decided at the very beginning to use TeX as the principal text formatter; a few years later, I decided to use the X Window System rather than writing another window system for GNU. Because of this decision, the GNU system is not the same as the collection of all GNU software. The GNU system includes programs that are not GNU software, programs that were developed by other people and projects for their own purposes, but which we can use because they are free software. 
GNU Emacs - I began work on GNU Emacs in September 1984, and in early 1985 it was beginning to be usable. This enabled me to begin using Unix systems to do editing; having no interest in learning to use vi or ed, I had done my editing on other kinds of machines until then. At this point, people began wanting to use GNU Emacs, which raised the question of how to distribute it. Of course, I put it on the anonymous ftp server on the MIT computer that I used. (This computer, prep.ai.mit.edu, thus became the principal GNU ftp distribution site; when it was decommissioned a few years later, we transferred the name to our new ftp server.) But at that time, many of the interested people were not on the Internet and could not get a copy by ftp. So the question was, what would I say to them? I could have said, “Find a friend who is on the net and who will make a copy for you.” Or I could have done what I did with the original PDP-10 Emacs: tell them, “Mail me a tape and a SASE, and I will mail it back with Emacs on it.” But I had no job, and I was looking for ways to make money from free software. So I announced that I would mail a tape to whoever wanted one, for a fee of $150. In this way, I started a free software distribution business, the precursor of the companies that today distribute entire Linux-based GNU systems. 
The GNU Hurd - By 1990, the GNU system was almost complete; the only major missing component was the kernel. We had decided to implement our kernel as a collection of server processes running on top of Mach. Mach is a microkernel developed at Carnegie Mellon University and then at the University of Utah; the GNU Hurd is a collection of servers (i.e., a herd of GNUs) that run on top of Mach, and do the various jobs of the Unix kernel. The start of development was delayed as we waited for Mach to be released as free software, as had been promised. One reason for choosing this design was to avoid what seemed to be the hardest part of the job: debugging a kernel program without a source-level debugger to do it with. This part of the job had been done already, in Mach, and we expected to debug the Hurd servers as user programs, with GDB. But it took a long time to make that possible, and the multithreaded servers that send messages to each other have turned out to be very hard to debug. Making the Hurd work solidly has stretched on for many years. 
Linux and GNU/Linux - The GNU Hurd is not suitable for production use, and we don't know if it ever will be. The capability-based design has problems that result directly from the flexibility of the design, and it is not clear solutions exist. Fortunately, another kernel is available. In 1991, Linus Torvalds developed a Unix-compatible kernel and called it Linux. In 1992, he made Linux free software; combining Linux with the not-quite-complete GNU system resulted in a complete free operating system. (Combining them was a substantial job in itself, of course.) It is due to Linux that we can actually run a version of the GNU system today. We call this system version GNU/Linux, to express its composition as a combination of the GNU system with Linux as the kernel.

Some general information and links on C/C++, Fortran, and Java and an IDE or editor-compiler combination

While exploring new computer programming languages (as of right now I am fairly good with MATLAB/Octave m-file programming;  I did take a class on C programming back in college, but I have rarely used it so I pretty much know nothing about other languages;  I feel it is important to try to learn as many as possible because this will help with my general understanding of computer programming and it will be a great marketing tool for job searches), I have come across some interesting and helpful links which include forum discussions and other websites.  For this post I am going to put up some links I have found while searching topics such as: best IDE in Ubuntu 11.10, best IDE in linux or Ubuntu 11.11 for C/C++, Fortran, and/or Java, Eclipse IDE, etc.  This post is going to strictly deal with C/C++ and IDEs.

There seem to be many options for a computer language editor and compiler for Ubuntu.  The first is using a text editor such as gedit, jEdit, or the many others available in Ubuntu to write the program, then compile the program in the terminal using GCC.  The second route is to use an all in one package to write and compile usually called an IDE.  As of now I am trying out Geany.  Many others include Eclipse, Emacs, Vi, Code::Blocks, Code Lite, Anjuta, etc.  There is also the option to download and install the non-commercial Intel compilers.

Here is a link from the Ubuntu Community site on how to install and a little about GCC.  https://help.ubuntu.com/community/InstallingCompilers

Link and information on GCC, the GNU Compiler Collection.  http://gcc.gnu.org/

The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, Ada, and Go, as well as libraries for these languages (libstdc++, libgcj,...). GCC was originally written as the compiler for the GNU operating system. The GNU system was developed to be 100% free software, free in the sense that it respects the user's freedom. 
We strive to provide regular, high quality releases, which we want to work well on a variety of native and cross targets (including GNU/Linux), and encourage everyone to contribute changes or help testing GCC. Our sources are readily and freely available via SVN and weekly snapshots. 
Major decisions about GCC are made by the steering committee, guided by the mission statement.

GCC has support for

http://gcc.gnu.org/c99status.html

C++ http://gcc.gnu.org/projects/cxx0x.html

Fortran http://gcc.gnu.org/fortran/

Java http://gcc.gnu.org/java/

and a few others.

Here is an Ubuntu Forum thread over a C/C++ IDE for commercial use.  Even though they mention commercial, there is still some interesting discussions on Eclipse and a few other IDEs.  http://ubuntuforums.org/showthread.php?t=172849

Some links on how to run and compile a C/C++ code on Ubuntu

http://blog.sudobits.com/2011/05/08/how-to-compile-and-run-c-c-plus-plus-program-on-ubuntu-11-04/

http://www.wikihow.com/Compile-a-C/C%2B%2B-Program-in-Ubuntu

http://www.ubuntugeek.com/how-to-install-c-and-c-compilers-in-ubuntu-and-testing-your-first-c-and-c-program.html

Another Ubuntu Forum thread on C/C++ editor and compiler.  http://ubuntuforums.org/showthread.php?t=1724796

Another Ubuntu Forum discussion on editors and compilers.

http://ubuntuforums.org/showthread.php?t=1580148

Ubuntu Forum thread where I found out about Sun Studio, now Oracle Solaris Studio, and KDevelop.  http://ubuntuforums.org/showthread.php?t=463955

Oracle Solaris Studio http://www.oracle.com/technetwork/server-storage/solarisstudio/overview/index.html

Oracle Solaris Studio, formerly Sun Studio, is a free comprehensive C, C++, and Fortran tool suite for both Oracle Solaris and Linux operating systems that accelerates the development of scalable, secure, and reliable enterprise applications.
KDevelop http://kdevelop.org/

is a free, open source IDE (Integrated Development Environment) for MS Windows, Mac OS X, Linux, Solaris and FreeBSD. It is a feature-full, plugin extensible IDE for C/C++ and other programming languages. It is based on KDevPlatform, and the KDE and Qt libraries and is under development since 1998.

Discussion from Stackflow on Fortran and IDEs.  http://stackoverflow.com/questions/3473854/best-fortran-ide

An interesting discussion on KDev and g77 for a Fortran compiler and IDE.  http://ubuntuforums.org/showthread.php?t=1094563

Some comments from the above thread link.
KDevelop and Visual Studios are IDE's, they give you a nice coding environment they have backend compilers that actually do the compiling...not the IDE itself 
Kdevelop is just somekind of glueprogram, that has en texteditor, and this program calls/executes the compiler. This is called an ide "integrated dev. environment" Normally it contains funky features like, syntax highlighting, api lookup... You can write your sourcecode in whatever editor you want. And then compile it by hand, by typing Code: gcc yourfile.cpp In a terminal. Makefiles are just a program that simply executes a series of compilations, while checking for dependencies in your program. All compilers as I know them, are commandline tools. The gnu compiler for assembler sourcefiles is called g77.

Intersting discussion on Fortran IDEs and compilers.  http://mandrivausers.org/index.php?/topic/15152-what-ide-is-best-for-fortran/

http://www.linuxquestions.org/questions/linux-newbie-8/how-to-build-a-fortran-project-in-kdevelop-876096/

http://www.linuxquestions.org/questions/linux-software-2/intel-fortran-compiler-under-kdevelop-240242/

Ubuntu Forum FAQ's on programming and such.  http://ubuntuforums.org/showthread.php?t=1006666

Ubuntu Forum on programming guides, has the above FAQ's thread and many more useful tools and information.  http://ubuntuforums.org/showthread.php?t=1766253

I will try to update this post or add others on programming and such...to be continued...in progress...

Wednesday, August 24, 2011

Sage in Emacs and TeX

CTAN directory: /macros/latex/contrib/sagetex - http://www.ctan.org/tex-archive/macros/latex/contrib/sagetex/

This is the SageTeX package. It allows you to embed code, results of
computations, and plots from the Sage mathematics software suite
(http://sagemath.org) into LaTeX documents.
====================================================================

The recommended way to acquire and install SageTeX is by installing the
Sage spkg; visit http://sagemath.org/packages/optional/, find the
current version number, and run "sage -i sagetex-[version]" in a
terminal. Then you'll need to make the file sagetex.sty known to TeX;
that file will be in SAGE_ROOT/local/share/texmf/tex/generic/sagetex,
along with documentation and examples.

If you can't or don't want to install SageTeX by using Sage, you can use
this CTAN package. If sagetex.py and sagetex.sty haven't been extracted
from the .dtx file, you'll need to do:

0. Run `latex sagetexpackage.ins'

If a PDF file of the documentation wasn't included with this
distribution of SageTeX, you will need to build the documentation
yourself. To do that:

1. Run `latex sagetexpackage.dtx'
2. Run `sage sagetexpackage.sage'
3. Run the indexing commands that the .ins file told you about.
4. Run `latex sagetexpackage.dtx' again.

You can skip step 3 if you don't care about the index. You will need the
pgf and tikz packages installed to typeset the figures.

The file example.tex has, as you likely guessed, a bunch of examples
showing you how this package works. You can compile it using a another
latex-sage-latex cycle as in steps 1-2-4 above. Note that example.tex
includes some PNG graphics which latex cannot use; to see those, use
pdflatex instead of regular latex or enable the imagemagick option. (See
the documentation.)

To use the SageTeX package with your own documents, see the
"Installation" section of the documentation.

SageTeX now includes `remote-sagetex.py', a plain Python script that
allows you to use a remote Sage server instead of a local Sage
installation, so now you can use SageTeX on any computer with TeX and
Python 2.6 installed.

This work builds on a lot of work by others; see the "Credits" section
of the documentation for credits. The source code may be modified and
distributed under the terms of the GPL, v2 or later; the documentation
may be modified and distributed under a Creative Commons Attribution -
Noncommercial - Share Alike 3.0 License. See the "Copying and licenses"
section of the documentation.

Please let me know if you find any bugs or have any ideas for
improvement!

- Dan Drake

sage-mode - http://wiki.sagemath.org/sage-mode

Description

sage-mode provides Emacs Lisp that helps you use Sage in GNU Emacs.

Warning! This is alpha code. This might fail horribly and is not (yet) easily customizable!

Tuesday, February 1, 2011

LaTeX - TeXworks, Kile, Texmaker, and others such as GNU Emacs & AUCTeX, LyX, and GNU TeXmacs

I am still experimenting with several LaTeX software and editors.  So far I have tried Texmaker and Kile extensively.  They are both pretty good, but not the best.  One thing I don't like with either is the syntax coloring (it may have better color available, but I haven't found it yet; I think there is an option to change colors, but I am not sure how much it improves with Kile or Texmaker).  To me it is harder to read the less colorful syntax highlighting of Kile and Texmaker.  However, Kile is a little better syntax coloring-wise than Texmaker, and Kile also has a few better features (it's been awhile since I have used Texmaker so I don't remember the differences, I just like the layout of Kile better than Texmaker).

However, I have recently tried TeXworks, and so far it is much more simple than Texmaker or Kile.  TeXworks seems to have much better syntax coloring, and it is an easy option to find and turn on or off.  It also recently helped me catch an error that TeXworks nor Kile could catch.  TeXworks it also cross platform so it works for Windows, Mac, and Linux.  This is especially helpful since I just had to use a Windows machine and use Winedt (as a frontend and MikTeX as the TeX compiler), which has only a free-trial for 30 days that I just found out about.

One good thing about Kile and Texmaker is that they will restore an old session so you don't have to re-open everything like you do in TeXworks.  Texmaker has an "Restore Previous Session" selection under the File menu.  However, only after you have opened up files before and closed Texmaker without closing the files.  Kile does the same except it does it automatically when the program is opened.

Anyways, TeXworks (as a frontend and TeXlive as the compiler) is what I am going to be trying out for now.  Really, Texmaker and Kile are not bad at all.  It is just more of a personal preference for cross platform and aesthetics.

I have also been attempting to use Emacs and AUCTeX or GNU TeXmacs editor.  Right now, Emacs is a little scary looking (not enough GUI for me), and GNU TeXmacs seems to be a LaTeX frontend similar to LyX.  I will try to update more on these later as from what I hear learning Emacs can be quite powerful.

Shots of TeXworks (click to enlarge a bit):





Shots of Kile and Okular:




Shots of Texmaker:




Link to AUCTeX documentation: http://www.gnu.org/software/auctex/manual/auctex.pdf

Link to TeXworks documentation: http://ftp.ctex.org/pub/tex/tools/editors/TeXworks/manual.pdf

Link to GNU Emacs: http://www.gnu.org/software/emacs/

Link to GNU TeXmacs: http://www.texmacs.org/

Link to LyX: http://www.lyx.org/

Link to Texmaker: http://www.xm1math.net/texmaker/

Link to TeXworks: http://www.tug.org/texworks/

Link to Kile: http://kile.sourceforge.net/