"…mais ce serait peut-être l'une des plus grandes opportunités manquées de notre époque si le logiciel libre ne libérait rien d'autre que du code…"

Archive for the ‘programmation’ Category

Nouvelle version majeure de GCC : GCC 4.3.0

Posted by patrick sur mars 11, 2008

GCC est utilisé pour le développement de la plupart des logiciels libres. Le noyau Linux dépend notamment étroitement des fonctionnalités de GCC.

GCC 4.3.0 has been released. GCC 4.3.0 is a major release, containing substantial new functionality not available in GCC 4.2.x or previous GCC releases. See: http://gcc.gnu.org/gcc-4.3/changes.html for more information about changes in GCC 4.3.0.

There is one important caveat. It was discovered after the final release
has been made that some OS kernels on i?86 and x86_64 architectures
violate the processor specific ABI with regards to the DF flag, if a process
is interrupted with a signal while doing overlapping memmove or running some other code with DF flag set, the signal handler might be started with DF flag set on entry to the signal handler. GCC 4.3.0 no longer emits cld instructions unnecessarily, so GCC 4.3.0 compiled async signal handlers or functions the signal handlers call that rely on DF flag being cleared might misbehave. This will be hopefully fixed in the kernels soon and future GCC releases might provide an optional workaround for this bug.

Fixes for some systems:
Linux http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e40cd10ccff3d9fbffd57b93780bee4b7b9bff51
FreeBSD http://www.freebsd.org/cgi/query-pr.cgi?pr=121422
Hurd http://sources.redhat.com/ml/libc-alpha/2008-03/msg00020.html

http://gcc.gnu.org/gcc-4.3/changes.html (« GCC requires the GMP and MPFR libraries for building all the various front-end languages it supports. See the prerequisites page for version requirementsThe GCC middle-end has been integrated with the MPFR library. This allows GCC to evaluate and replace at compile-time calls to built-in math functions having constant arguments with their mathematically equivalent results. In making use of MPFR, GCC can generate correct results regardless of the math library implementation or floating point precision of the host platform. This also allows GCC to generate identical results regardless of whether one compiles in native or cross-compile configurations to a particular target….C++: Experimental support for the upcoming ISO C++ standard, C++0x. -Wc++0x-compat has been added and is now enabled by default for -Wall. It produces warnings for constructs whose meaning differs between ISO C++ 1998 and C++0x… An experimental parallel mode has been added. This is a parallel implementation of many C++ Standard library algorithms, like std::accumulate, std::for_each, std::transform, or std::sort, to give but four examples…Java: gcj now uses the Eclipse Java compiler for its Java parsing needs. This enables the use of all 1.5 language features, and fixes most existing front end bugs…Other significant improvements

  • The compiler’s --help command-line option has been extended so that it now takes an optional set of arguments. These arguments restrict the information displayed to specific classes of command-line options, and possibly only a subset of those options. It is also now possible to replace the descriptive text associated with each displayed option with an indication of its current value, or for binary options, whether it has been enabled or disabled.

    Here are some examples. The following will display all the options controlling warning messages:


    Whereas this will display all the undocumented, target specific options:


    This sequence of commands will display the binary optimizations that are enabled by -O3:

          gcc -c -Q -O3 --help=optimizers > /tmp/O3-opts
          gcc -c -Q -O2 --help=optimizers > /tmp/O2-opts
          diff /tmp/O2-opts /tmp/O3-opts | grep enabled

« )

http://en.wikipedia.org/wiki/GNU_Compiler_Collection (« GCC was started by Richard Stallman in 1985. He extended an existing compiler to compile C. The compiler originally compiled Pastel, an extended, nonportable dialect of Pascal, and was written in Pastel. It was rewritten in C by Len Tower and Stallman,[4] and released in 1987[5] as the compiler for the GNU Project, in order to have a compiler available that was free software. Its development was supervised by the Free Software Foundation.« )


Posted in C++, Développement logiciel, GCC, java, programmation | Tagué: | Leave a Comment »

C++ et la métaprogrammation avec les templates, le nouveau standard C++0x pour C++

Posted by patrick sur mars 3, 2008

Source: un article publié dans le magazine Programmez! de Frédéric Mazué sur “Blitz++ et la méta-programmation C++ ».

« …quand C++ s’est vu doté des templates, des programmeurs astucieux les ont détournés de leur usage premier. La méta-programmation C++ était née, et un gain significatif de performance avec elle…ce n’est pas une bonne idée que de vouloir faire de la méta-programmation à tout prix. Par contre c’est une bonne idée d’utiliser des librairies telles que Boost et Blitz++ dont la méta-programmtion est une pierre angulaire« .

A voir:

  • http://fr.wikipedia.org/wiki/M%C3%A9taprogrammation (« La métaprogrammation avec des patrons est une technique de programmation dans laquelle les patrons sont utilisés de sorte que le compilateur, lors de la compilation du code, exécute un programme. Ces programmes peuvent générer des constantes ou des structures de données. Cette technique est utilisée principalement dans le langage de programmation C++…La métaprogrammation avec des patrons a des utilisations pratiques malgré son apparence maladroite. Elle peut être utilisée pour créer des classes vecteur à n dimensions quand n est connu à la compilation. L’avantage par rapport à un vecteur à n dimensions traditionnel est que les boucles peuvent être déroulées, ce qui produit un code très optimisé. »)
  • http://en.wikipedia.org/wiki/C%2B%2B0x (« C++0x is the planned new standard for the C++ programming language. It is intended to replace the existing C++ standard, ISO/IEC 14882, which was published in 1998 and updated in 2003. These predecessors are informally known as C++98 and C++03. The new standard will include several additions to the core language and will extend the C++ standard library, incorporating most of the C++ Technical Report 1 libraries — most likely with the exception of the library of mathematical special functions. Since the standard is not yet finalized, this article may not reflect the most recent state of C++0x. Up-to-date state of the next C++ standard is published on the ISO C++ committee website. The most recent report, N2432, was published in October 2007. »)
  • http://www.oonumerics.org/blitz/ (« Blitz++ is a C++ class library for scientific computing which provides performance on par with Fortran 77/90. It uses template techniques to achieve high performance. The current versions provide dense arrays and vectors, random number generators, and small vectors and matrices. Blitz++ is distributed freely under an open source license, and contributions to the library are welcomed. « )
  • http://www.boost.org/ (« Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work well with the C++ Standard Library. Boost libraries are intended to be widely useful, and usable across a broad spectrum of applications. The Boost license encourages both commercial and non-commercial use.C++ Standards Committee’s Library Technical Report ( TR1) as a step toward becoming part of a future C++ Standard. More Boost libraries are proposed for the upcoming TR2 We aim to establish « existing practice » and provide reference implementations so that Boost libraries are suitable for eventual standardization. Ten Boost libraries are already included in the . »)
  • http://en.wikipedia.org/wiki/Boost_C%2B%2B_Libraries (« …The libraries are aimed at a wide range of C++ users and application domains. They range from general-purpose libraries like SmartPtr, to OS Abstractions like FileSystem, to libraries primarily aimed at other library developers and advanced C++ users, like MPL. In order to ensure efficiency and flexibility, Boost makes extensive use of templates. Boost has been a source of extensive work and research into generic programming and metaprogramming in C++…« )
  • http://en.wikipedia.org/wiki/GNU_Compiler_Collection (« …The GNU Compiler Collection (usually shortened to GCC) is a set of compilers produced for various programming languages by the GNU Project. GCC is a key component of the GNU toolchain. As well as being the official compiler of the GNU system, GCC has been adopted as the standard compiler by most other modern Unix-like computer operating systems, including Linux, the BSD family and Mac OS X. GCC has been ported to a wide variety of computer architectures, and is widely deployed as a tool in commercial, proprietary and closed source software development environments. GCC is also used in popular embedded platforms like Symbian[1], Playstation and Sega Dreamcast. Originally named the GNU C Compiler, because it only handled the C programming language, GCC 1.0 was released in 1987, and the compiler was extended to compile C++ in December of that year.[2] Front ends were later developed for Fortran, Pascal, Objective C, Java, and Ada, among others...GCC 4.2.1 will be the last release of GCC covered by version 2 of the GNU General Public License. All future releases will be released under GPL version 3. » « )

Posted in C++, métaprogrammation | Tagué: | 1 Comment »

Friendsnippets : un réseau social d’échange de snippets

Posted by patrick sur octobre 13, 2007

Source: http://www.toolinux.com/news/logiciels/friendsnippets_le_reseau_social_d_echange_de_code_ar9682.html

Un site qui a l’air bien sympa: http://www.friendsnippets.com

Friendsnippets a été conçu pour faciliter la recherche et les échanges de code source ouvert et libre. Le site lancé fin septembre 2007 est disponible en français et en anglais.


Friendsnippets se présente comme une bibliothèque de morceaux de codes de programmation (snippets) déposés par ses membres. Vous pouvez utiliser Friendsnippets pour conserver vos snippets sur un seul site, marquer ou observer des snippets, rechercher du code source avec Google Code Search et l’intégrer dans votre friendsnippets.

L’usage premier de Friendsnippets et de vous permetre de maintenir facilement votre collection de snippets. Vous pouvez les étiquetter (tagguer) pour les organiser ce qui est bien plus efficace que de créer des dossiers

Friendsnippets est publié par Enki Multimedia, une nouvelle société web fondée par Benoît Chesneau. Le site web a été crée avec Django, un framework web en Python qui utilise le framework javascript YUI mis à disposition par Yahoo. Le site exploite également MySQL et OpenBSD.

A voir aussi:

– http://www.posteet.com

Posted in échange de code, javascript, mysql, python | Tagué: , | 2 Comments »