Gyp

GYP was designed to generate native build files for XCode, Visual Studio, Make and SCons in a reasonable and fast manner.
GYP was originally designed to meet Chromium’s complex build requirements.

example.gypexample.gyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
'targets': [
{
'target_name': 'new_unit_tests',
'type': 'executable',
'defines': [
'FOO',
],
'include_dirs': [
'..',
],
'dependencies': [
'other_target_in_this_file',
'other_gyp2:target_in_other_gyp2',
],
'sources': [
'new_additional_source.cc',
'new_unit_tests.cc',
],
},
],
}

Understanding Coccinelle

The Coccinelle Semantic Patch Language (SmPL) allows for reliable and rapid semantic-oriented code transformation for massive and rapidly evolving libraries.

test.coccitest.cocci
1
2
3
4
5
6
7
8
9
@@
expression E;
identifier ptr;
@@

-ptr = alloca(E);
+ptr = malloc(E);
+if (ptr == NULL)
+ return 1;

SWIG deep-dive

SWIG is a software development tool that is used to parse C/C++ interfaces and generate glue-code for higher level programming languages.
SWIG is a failry complete C++ compiler with support for nearly all the language features. SWIG can also be used to package structures and classes into proxy classes in the target higher level language.

example.iexample.i
1
2
3
4
5
6
7
8
9
10
11
%module example
%{
/* Put headers and other declarations here */
extern double My_variable;
extern int fact(int);
extern int my_mod(int n, int m);
%}

extern double My_variable;
extern int fact(int);
extern int my_mod(int n, int m);

GNU Octave for beginners

GNU Octave is a high-level language, primarily intended for numerical computations.
It provides a convenient command line interface for solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with Matlab. It may also be used as a batch-oriented language.

blink.mblink.m
1
2
3
4
5
6
7
8
ar = arduino;
led_pin = "d13";
while true
writeDigitalPin (ar, led_pin, 0);
pause (0.5)
writeDigitalPin (ar, led_pin, 1);
pause (0.5)
endwhile

Build with SCons

SCons is touted as an easier, more reliable and faster way to build software with in-built support for multiple languages and an easily extensible user-defined builder system.

SConstruct
1
Program('app.c')
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×