nixCraft: C versus other programming languages

Programming languages at the poker table




Building blocks with a wide range of modules
The well matched Tinkerforge modules allow experienced programmers to concentrate on the software, thus projects can be completed faster. A programming novice on the other hand has the possibility to learn programming with exciting applications by using the Tinkerforge building blocks.

No detailed knowledge in electronics necessary
The realization of a project with Tinkerforge is possible without troubles. You simply pick the required modules and connect them together with each other. There is no other electronics knowledge and no soldering needed.
For example: If the project is to control a motor dependent on a measured temperature, you just have to choose a temperature sensor and an appropriate motor controller out of the available Tinkerforge building blocks.

Intuitive API
The Tinkerforge API offers intuitive functions, that simplify the programming. For example: It is possible to set the velocity of a motor in meters per second with a call of setVelocity() or to read out a temperature in degree Celsius (°C) with getTemperature().

SimpleSAMLphp is an award-winning application written in native PHP that deals with authentication

SimpleSAMLphp is an award-winning application written in native PHP that deals with authentication

SimpleSAMLphp is an award-winning application written in native PHP that deals with authentication. The project is led by UNINETT, has a large user base, a helpful user community and a large set of external contributors. The main focus of SimpleSAMLphp is providing support for:

SAML 2.0 as a Service Provider (SP)
SAML 2.0 as an Identity Provider (IdP)
However, it also supports some other identity protocols and frameworks, such as Shibboleth 1.3, A-Select, CAS, OpenID, WS-Federation or OAuth, and is easily extendable, so you can develop your own modules if you like.

With the memcache session handler, SimpleSAMLphp scales pretty well. A replication layer is built upon memcache, such that an unlimited number of SimpleSAMLphp web front-ends can work with a back-end matrix of memcache servers with both replication (fail-over) and load-balancing.

SimpleSAMLphp is tested with several other federation software implementations. Among others; Shibboleth 1.3, Shibboleth 2.2, PingID, Sun Federation Manager, Sun Federated Access Manager, Sun Access Manager, mod_mellon, CAS, etc. If someone discovers incompatibility issues, we try to sort them out as fast as possible if reported properly through the issue tracker. Install Memcached Server For Python and PHP Apps Install Memcached Server For Python and PHP Apps

Memcached is a general-purpose distributed memory caching system. It is usually used to speed up dynamic database-driven webapps or websites by caching objects in RAM. It is often result into reducing database load. You need to install the following packages:

  1. memcached – A high-performance memory object caching server
  2. php5-memcache – Memcache extension module for PHP5
  3. php5-memcached – Memcached extension module for PHP5, uses libmemcached
  4. python-memcache – Pure python memcached client

Let us add a key called foo with value BAR, enter:

echo -e 'add foo 0 300 3\r\nBAR\r' | nc localhost 11211

Sample outputs:

STORED PHP at the speed of C with Recki-CT PHP at the speed of C with Recki-CT

Recently, Anthony Ferrara (known throughout the Internet and beyond as @ircmaxell) and Joe Watkins (similarly well-known as @krakjoe) have been working on a new set of toys for solving this problem while staying on the “standard” PHP runtime. Recki-CT is a set of tools that implement a PHP compiler, in PHP. While this might you think of things like PyPy, which implements a Python virtual machine in Python, this is not Recki’s goal – it doesn’t provide a VM, so it can’t run PHP by itself. However, it can parse PHP code and generate other code from it.

Recki uses the well-known PHP-Parser library by Nikita Popov to generate a graph-based representation of the code, and convert it to an intermediate representation. To get here involves a few steps, which are described in Recki’s documentation, but essentially:

  • It generates a tree-based representation of the code called an abstract syntax tree
  • From the AST, it generates a control flow graph
  • It then converts this graph into static single assignment form, where every variable is only assigned once, and all are defined before use. This makes it simpler to optimize.
  • Next, it repeatedly runs optimizations on this graph
php colourmandel.php
Data took 78.744249
Render took 0.631219

hvm mandelbrot.php
Data took 5.852351
Render took 0.236238

php -dextension=./ mandelbrotWithExtension.php
Data took 2.411557
Render took 0.637504