Ubuntu is composed of many software packages, the vast majority of which are distributed under a free software license. The only exceptions are some proprietary hardware drivers.The main license used is the GNU General Public License (GNU GPL) which, along with the GNU Lesser General Public License (GNU LGPL), explicitly declares that users are free to run, copy, distribute, study, change, develop and improve the software. On the other hand, there is also proprietary software available that can run on Ubuntu. Ubuntu focuses on usability, security and stability. The Ubiquity installer allows Ubuntu to be installed to the hard disk from within the Live CD environment, without the need for restarting the computer prior to installation. Ubuntu also emphasizes accessibility and internationalization to reach as many people as possible.
Custom Search

Ada mode for GNU Emacs and XEmacs.

Monday, May 31, 2010

This package provides a major mode for GNU Emacs, or XEmacs, to edit files written in the Ada programming language.

It provides:

* Support for project-files
* Auto-casing and auto-indentation
* Support for cross-referencing source code including
cross-references to operators.

Download :

Similar packages:

The Emacs mode for programming in Ada helps the user in understanding existing code and facilitates writing new code.

When the Gnu Ada compiler GNAT is used, the cross-reference information output by the compiler is used to provide powerful code navigation (jump to definition, find all uses, etc).

When you open a file with a file extension of .ads or .adb, Emacs will automatically load and activate Ada mode.

Ada mode works without any customization, if you are using the GNAT compiler (https://libre2.adacore.com/) and the GNAT default naming convention.

You must customize a few things if you are using a different compiler or file naming convention; See Other compiler, See Non-standard file names.

In addition, you may want to customize the indentation, capitalization, and other things; See Other customization.

Finally, for large Ada projects, you will want to set up an Emacs Ada mode project file for each project; See Project files. Note that these are different from the GNAT project files used by gnatmake and other GNAT commands.

See the Emacs info manual, section 'Running Debuggers Under Emacs', for general information on debugging.

Installation.

Ada mode is part of the standard Emacs distribution; if you use that, no files need to be installed.

Ada mode is also available as a separate distribution, from the Emacs Ada mode website http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html. The separate distribution may be more recent.

For installing the separate distribution, see the README file in the distribution.

To see what version of Ada mode you have installed, do M-x ada-mode-version.

The following files are provided with the Ada mode distribution:

  • ada-mode.el: The main file for Ada mode, providing indentation, formatting of parameter lists, moving through code, comment handling and automatic casing.
  • ada-prj.el: GUI editing of Ada mode project files, using Emacs widgets.
  • ada-stmt.el: Ada statement templates.
  • ada-xref.el: GNAT cross-references, completion of identifiers, and compilation. Also provides project files (which are not GNAT-specific).
Customizing Ada mode

Here we assume you are familiar with setting variables in Emacs, either thru 'customize' or in elisp (in your .emacs file). For a basic introduction to customize, elisp, and Emacs in general, see the tutorial in The GNU Emacs Manual.

These global Emacs settings are strongly recommended (put them in your .emacs):

     (global-font-lock-mode t)
(transient-mark-mode t)

(global-font-lock-mode t)’ turns on syntax highlighting for all buffers (it is off by default because it may be too slow for some machines).

(transient-mark-mode t)’ highlights selected text.

See the Emacs help for each of these variables for more information.

Non-standard file names.

By default, Ada mode is configured to use the GNAT file naming convention, where file names are a simple modification of the Ada names, and the extension for specs and bodies are ‘.ads’ and ‘.adb’, respectively.

Ada mode uses the file extentions to allow moving from a package body to the corresponding spec and back.

Ada mode supports a list of alternative file extensions for specs and bodies.

For instance, if your spec and bodies files are called unit_s.ada and unit_b.ada, respectively, you can add the following to your .emacs file:

     (ada-add-extensions "_s.ada" "_b.ada")<br />

You can define additional extensions:

     (ada-add-extensions ".ads" "_b.ada")<br />     (ada-add-extensions ".ads" ".body")<br />

This means that whenever Ada mode looks for the body for a file whose extension is .ads, it will take the first available file that ends with either .adb, _b.ada or .body.

Simililarly, if Ada mode is looking for a spec, it will look for .ads or _s.ada.

If the filename is not derived from the Ada name following the GNAT convention, things are a little more complicated. You then need to rewrite the function ada-make-filename-from-adaname. Doing that is beyond the scope of this manual; see the current definitions in ada-mode.el and ada-xref.el for examples.


Other compiler.

By default, Ada mode is configured to use the Gnu Ada compiler GNAT.

To use a different Ada compiler, you must specify the command lines used to run that compiler, either in lisp variables or in Emacs Ada mode project files. See Project file variables for the list of project variables, and the corresponding lisp variables.

Other customization.

All user-settable Ada mode variables can be set via the menu ‘Ada | Customize’. Click on the ‘Help’ button there for help on using customize.

To modify a specific variable, you can directly call the function customize-variable; just type M-x customize-variable variable-name ).

Alternately, you can specify variable settings in the Emacs configuration file, .emacs. This file is coded in Emacs lisp, and the syntax to set a variable is the following:

     (setq variable-name value)<br /><br /><b><br /></b>

Compiling Executing.

Ada projects can be compiled, linked, and executed using commands on the Ada menu. All of these commands can be customized via a project file (see Project files), but the defaults are sufficient for using the GNAT compiler for simple projects (single files, or several files in a single directory).

Even when no project file is used, the GUI project editor (menu ‘Ada | Project | Edit’) shows the settings of the various project file variables referenced here.

Compile commands.

Here are the commands for building and using an Ada project, as listed in the Ada menu.

In multi-file projects, there must be one file that is the main program. That is given by the main project file variable; it defaults to the current file if not yet set, but is also set by the “set main and build” command.

Check file
Compiles the current file in syntax check mode, by running check_cmd defined in the current project file. This typically runs faster than full compile mode, speeding up finding and fixing compilation errors.

This sets main only if it has not been set yet.

Compile file
Compiles the current file, by running comp_cmd from the current project file.

This does not set main.

Set main and Build
Sets main to the current file, then executes the Build command.
Show main
Display main in the message buffer.
Build
Compiles all obsolete units of the current main, and links main, by running make_cmd from the current project.

This sets main only if it has not been set yet.

Run
Executes the main program in a shell, displayed in a separate Emacs buffer. This runs run_cmd from the current project. The execution buffer allows for interactive input/output.

To modify the run command, in particular to provide or change the command line arguments, type C-u before invoking the command.

This command is not available for a cross-compilation toolchain.

It is important when using these commands to understand how main is used and changed.

Build runs 'gnatmake' on the main unit. During a typical edit/compile session, this is the only command you need to invoke, which is why it is bound to C-c C-c. It will compile all files needed by the main unit, and display compilation errors in any of them.

Note that Build can be invoked from any Ada buffer; typically you will be fixing errors in files other than the main, but you don't have to switch back to the main to invoke the compiler again.

Novices and students typically work on single-file Ada projects. In this case, C-c C-m will normally be the only command needed; it will build the current file, rather than the last-built main.

Playboy   300x250.jpg

There are three ways to change main:

  1. Invoke ‘Ada | Set main and Build’, which sets main to the current file.
  2. Invoke ‘Ada | Project | Edit’, edit main and main, and click ‘[save]
  3. Invoke ‘Ada | Project | Load’, and load a project file that specifies main
Files.
ada-mode-4.01.tar.gz
My latest version.
ada-mode-examples-4.01.tar.gz
Ada examples from the current Ada mode manual.
ada-mode.html
The current Ada mode manual. The distribution contains this and an Emacs info version.
ada-mode-patches.el
My current patches to Ada mode; open for discussion about including in Emacs distribution.
ada-mode-keys.el
My bindings, settings, and hooks for using Ada mode; provided as an example.
gnat-fix-error.el
Utilities for automatically fixing errors reported by the gnat compiler; proposed addition to Ada mode.

Adserver 610x250


If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:

rss_trappola

Related Post


Linux Links

GNU Guile is an interpreter/virtual machine for the Scheme programming language

Sunday, May 30, 2010

GNU Guile is an interpreter/virtual machine for the Scheme programming language. It was first released in 1993. Guile includes modularized extensions for POSIX system calls, APL array functionality, and others, packaged as an object library. "Libguile" allows the language to be embedded in other programs, and used as an interface for other languages which allow close integration.

Guile stands for Gnu's Ubiquitous Interactive Language for Extension.

Guile is the "official" extension language of the GNU Project, although, as of 2006, it has been used for only a handful of major projects. Its name was coined in a Usenet discussion by Lee Thomas. The idea is that "the developer implements critical algorithms and data structures in C or C++ and exports the functions and types for use by interpreted code. The application becomes a library of primitives orchestrated by the interpreter, combining the efficiency of compiled code with the flexibility of interpretation."

The close interaction between Guile and the application comes at a cost. Scheme requires implementations to optimize tail recursion because of Scheme's heavy use of recursion, but most techniques interfere with interoperation; Guile compromises by optimizing tail calls within purely Scheme functions and programs, but not when foreign functions enter the picture.

Implementation of call/cc, another requirement of the Scheme standard, is not entirely satisfactory — to handle continuations in this environment it must copy the entire execution stack into the heap, and back.[8] Because foreign code may have pointers to Scheme objects, Guile's garbage collector is the "conservative" variety which must periodically touch all of allocated memory.

Guile had its origin in a heated discussion (later dubbed "the Tcl Wars") started by Richard Stallman, who stated that Tcl was underpowered for application scripting; he proposed Scheme as the preferred language for extending GNU applications and eventually launched the Guile project. Because an appropriate Scheme interpreter did not exist at that time, Guile was developed to fill the niche. Tom Lord (later the developer of GNU arch) was heavily involved in the development of Guile while employed by Cygnus Solutions (later acquired by Red Hat). Its earlier versions were forked from SIOD ("Scheme In One Day") and the SCM interpreter, before 1995. After its initial release, development languished for many years, but 2009-10 saw major performance improvements.

One of the goals of Guile is to allow other languages to be translated into Scheme and thence into portable byte-code; thus Guile would effectively be a language-neutral runtime environment. This goal has not been fulfilled yet, though various attempts have been made: a dialect of Scheme essentially differing only in its C-like syntax; a translation of Emacs Lisp; a Tcl converter motivated by TkWWW; and something roughly resembling the Logo programming language.

Guile Scheme supports XML, XPath, and XSLT in the forms of SXML, SXPath and SXSLT, respectively. The S-expression-based XML processing is provided by guile-lib.

Guile programs can use facilities from SLIB, the portable Scheme library.

Programs using Guile

* AisleRiot - part of the GNOME Games package.
* AutoGen
* gEDA
* GNU Anubis
* GnuCash
* Denemo
* GNU LilyPond
* GNU MDK
* GNU Robots
* GNU Serveez
* GNU TeXmacs
* GnoTime
* Liquid War 6
* mcron — a backwards compatible replacement for Vixie cron written in Guile
* OpenCog
* Scwm
* Skribilo
* Snd (software)
* TkWWW — defunct web browser; was a Free GNU browser written & extensible in Tk.

The Tcl War.

In late September, 1994, Richard Stallman of the Free Software Foundation posted an article to comp.lang.tcl and several other newsgroups titled Why you should not use Tcl. Predictably, a flamewar ensued, which lasted in one form or another for almost a month (until it was pre-empted by the GNU project's announcement of plans for its own extension language, later dubbed GUILE).

Like most flamewars, there was much heat and little light. However, there was some light, and as the maintainer of the Tcl bibliography (which attempts to be very thorough), I took it upon myself to archive the interesting posts, partly to give the bibliography entry something to point at, and also to provide a balanced perspective: it seemed likely, even at the beginning, that the GNU project would archive Stallman's original article and redistribute it without the many reasonable rebuttals which appeared.

Although I tried to take a neutral perspective, and saved articles espousing diverse points of view, this selection unavoidably reflects my own prejudices. Included are a few articles which contain nothing but a snappy comeback. I missed a few important articles, such as one by Bill Janssen which started an entire lengthy subthread. And naturally, all of my own posts are included.

Starting: Sun 25 Sep 1994 - 06:14:14 CST
Ending: Tue, 18 Oct 1994 01:02:03 GMT
Messages: 68

Last message date: Tue, 18 Oct 1994 01:02:03 GMT
Archived on: Fri Feb 10 1995 - 18:04:38 CST




Adserver 610x250


If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:

rss_trappola

Related Post


Linux Links

Alexandria, a collection of portable Common Lisp utilities and Babel, A charset encoding/decoding library, not unlike GNU libiconv.

Alexandria is a project and a library.

As a project Alexandria's goal is to reduce duplication of effort and improve portability of Common Lisp code according to its own idiosyncratic and rather conservative aesthetic. What this actually means is open to debate, but each project member has a veto on all project activities, so a degree of conservativism is inevitable.

As a library Alexandria is one of the means by which the project strives for its goals. Alexandria is a collection of portable public domain utilities that meet the following constraints:

  • Utilities, not extensions: Alexandria will not contain conceptual extensions to Common Lisp, instead limiting itself to tools and utilities that fit well within the framework of standard ANSI Common Lisp. Test-frameworks, system definitions, logging facilities, serialization layers, etc. are all outside the scope of Alexandria as a library, though well within the scope of Alexandria as a project.
  • Conservative: Alexandria limits itself to what project members consider conservative utilities. Alexandria does not and will not include anaphoric constructs, loop-like binding macros, etc.
  • Portable: Alexandria limits itself to portable parts of Common Lisp. Even apparently conservative and usefull functions remain outside the scope of Alexandria if they cannot be implemented portably. Portability is here defined as portable within a conforming implementation: implementation bugs are not considered portability issues.
  • Team player: Alexandria will not (initially, at least) subsume or provide functionality for which good-quality special-purpose packages exist, like split-sequence. Instead, third party packages such as that may be "blessed".

Playboy   300x250.jpg

Initial release of the Alexandria library is yet to happen, but draft documantion exists and current sources are available:

git clone <a href="http://common-lisp.net/gitweb?p=projects/alexandria/alexandria.git;a=summary">git://common-lisp.net/projects/alexandria/alexandria.git</a>

Note: As of 2010-03-09 the project switched from Darcs to Git. The old Darcs repo

http://common-lisp.net/project/alexandria/darcs/alexandria

is still available, but remains frozen.

Discussions on Alexandria take place on alexandria-devel mailing list -- and also #lisp on irc.freenode.net. Automated commit messages for the Git repository are sent to the alexandria-cvs mailing list. (Yeah, -cvs, really. Historical reasons.)

Babel is a charset encoding/decoding library, not unlike GNU libiconv, but completely written in Common Lisp.

It strives to achieve decent performance. To that effect, we use Clozure CL's approach of calculating the destination buffer size in advance. Most of the encoding/decoding algorithms have been adapted from Clozure CL's source. Another important goal is reusability. Similarly to SBCL, we define an interface wherein the algorithms can be reused between a variety of data types so long we're dealing with conversions between octets and unicode code points.

Babel comes with converters between strings and octet vectors but can be easily extended to deal with, e.g., strings and foreign memory, vectors and Closure's runes, etc...

Mailing List

babel-devel
(also available through gmane.lisp.babel.devel)

The current version is 0.3.0, released on July 28, 2008. (tar.gz, sig)

A Darcs repository is available:

darcs get http://common-lisp.net/project/babel/darcs/babel
(browsable through darcsweb)

Adserver 610x250


If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:

rss_trappola

Related Post


Linux Links

View3ds, simple viewer for 3D Studio files and Video4Linux Loopback Device.

Wednesday, May 26, 2010

View3ds, simple viewer for 3D Studio files.


This is simple realtime 3DS file previewer based on the lib3ds library by J.E. Hoffmann. It won't display any 3DS model, but it can properly display 3DS scenes. lib3ds was developed as part of the support libraries for FAMP, the Free Animation and Modeling Project.

Download:

Similar packages: Video4Linux Loopback Device.

Uploaded to TWiki first time by KennethLavrsen

The video4linux device is a driver that implements a video pipe using two video4linux devices

Jeroen Vreeken wrote this driver for debugging motion realtime, which worked very nice and he decided to make something usefull of it. You can use this driver for looking at motion in realtime or for feeding a webcam while still securing your room.

Note also that vloopback output can be used by several applications at the same time (see below)

The video4linux device is no longer actively being maintained. But since there is still some demand for it and still some people that make small patches for it the new Motion maintainers decided to gather these patches in a new release. If you need support do not ask the current motion maintainers. Instead join the motion mailing list where there is a reasonable chance to find help.

The following applications supports piping a video feed to vloopback:

These applications that can read the output of vloopback:

  • setv4l (Jeroen's program for changing the settings of a video device)
  • vidcat (part of the w3cam package)
  • camstream (a nice video viewer).
  • Xawtv also works, but you might have to tell it the size e.g. 'xawtv -c /dev/videoN -geometry 176x144'.
  • EffecTV An amazing real-time video effector.
  • Motion (feeding a second motion process the output of the first gives neat effects)
How to use multiple webcam applications with vloopbac.

1) A simple example (all applications use the same resolution) Do "modproble vloopback" then "resize /dev/video0 /dev/video1 320x240 320x240". Now, you can run as many webcam applications as you want with input as /dev/video2 (however you might have to tell your application the picture size, see below).

Of course, you may think resizing the scale from 320x240 to the same size is silly. Yes, it is, you can edit the source of invert.c (it suffices to remove one sign) to write a program that simply sends the stream from /dev/video0 to /dev/video1 if you prefer.

2) A more complicated example (applications using different resolutions) Do "modprobe vloopback pipes=2". Then "resize /dev/video0 /dev/video1 640x480 640x480 & resize /dev/video2 /dev/video3 640x480 320x240". (Assuming that you have only one real video device at /dev/video0. You can check with dmesg).

Now, you can watch your webcam with camstream at 640x480 (choose the device called vloopback0 output in camstream's menu, which is /dev/video2), at the sime time you can record a video of your webcam stream at 320x240 by doing "ffmpeg -vd /dev/video4 -s 320x240 picture.mpeg", you can at the same time run a webcam http server by running "camsource" (after editting camsource.conf to choose /dev/video2 or /dev/video4 as v4l_input source).

N.B. You can't use camorama with vloopback, as far as I know, camorama looks for inputs from /dev/video0. You should also not open two "view"s in the same instance of camstream. However, opening multiple instances of camsource doesn't cause a problem.

Attached File.

Attached are the recent versions of the vloopback.

Kernel 2.6

  • svn trunk for kernel version >= 2.6.32
  • vloopback-1.3.tar.gz : New stable version tested with stable version 2.6.31
  • vloopback-1.2.tar.gz : New stable version tested with stable version 2.6.28
  • vloopback-1.1.tar.gz : New stable version tested with stable version 2.6.24
  • vloopback-1.0.tar.gz : old stable version with some more fixes and allow build a kernel module in debian way and fixes problems to compile in Suse. If you want to make it work with motion , use motion-3.2.6 or above. stable for kernel <= 2.6.17
Kernel 2.4
  • vloopback-0.92-snap1.tar.gz: Snaphot release for testing (this is the last version ever to be released for kernel 2.4 and is the 0.91 version with a redhat kernel 2.4.20 fix)
  • vloopback-0.91.tar.gz: Last official release for kernel 2.4. Does not build on 2.6 kernels


Adserver 610x250


If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:

rss_trappola

Related Post


Linux Links

My Favorites

Finance

Logo IWBank gif120x60 banner 9

Antipixel & Counters

Dr.5z5 Open Feed Directory BlogESfera Directorio de Blogs Hispanos - Agrega tu Blog BlogItalia.it - La directory italiana dei blog Software blogs Computers blogs Il Bloggatore Add to Technorati Favorites diigo it Peru Blogs Programming Blogs - Blog Catalog Blog Directory AddThis Social Bookmark Button Find the best blogs at Blogs.com. website counter
Social Bookmarking
Add to: Mr. Wong Add to: Webnews Add to: Icio Add to: Oneview Add to: Linkarena Add to: Favoriten Add to: Seekxl Add to: Kledy.de Add to: Social Bookmarking Tool Add to: BoniTrust Add to: Power Oldie Add to: Bookmarks.cc Add to: Favit Add to: Newskick Add to: Newsider Add to: Linksilo Add to: Readster Add to: Folkd Add to: Yigg Add to: Digg Add to: Del.icio.us Add to: Reddit Add to: Jumptags Add to: Upchuckr Add to: Simpy Add to: StumbleUpon Add to: Slashdot Add to: Netscape Add to: Furl Add to: Yahoo Add to: Spurl Add to: Google Add to: Blinklist Add to: Blogmarks Add to: Diigo Add to: Technorati Add to: Newsvine Add to: Blinkbits Add to: Ma.Gnolia Add to: Smarking Add to: Netvouz Information

Recent Posts