The Low Level Virtual Machine (LLVM) is a compiler infrastructure, written in C++, which is designed for compile-time, link-time, run-time, and “idle-time” optimization of programs written in arbitrary programming languages. Originally implemented for C/C++, the language-independent design (and the success) of LLVM has since spawned a wide variety of front ends, including Objective-C, Fortran, Ada, Haskell, Java bytecode, Python, Ruby, ActionScript, GLSL, and others.
LLVM can provide the middle layers of a complete compiler system, taking intermediate form (IF) code from a compiler and outputting an optimized IF that can then be converted and linked into machine-dependent assembler code for a target platform. LLVM can accept the IF from the GCC toolchain, allowing it to be used with a wide array of existing compilers written for that project.
LLVM can also generate relocatable machine code at compile-time or link-time or even binary machine code at run-time.
LLVM supports a language-independent instruction set and type system. Each instruction is in static single assignment form (SSA), meaning that each variable (called a typed register) is assigned once and is frozen. This helps simplify the analysis of dependencies among variables. LLVM allows code to be compiled statically, as it is under the traditional GCC system, or left for late-compiling from the IF to machine code in a just-in-time compiler (JIT) in a fashion similar to Java. The type system consists of basic types such as integers or floats and five derived types: pointers, arrays, vectors, structures, and functions. A type construct in a concrete language can be represented by combining these basic types in LLVM. For example, a class in C++ can be represented by a combination of structures, functions and arrays of function pointers.
The LLVM Compiler Infrastructure (llvm.org) – the LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Despite its name, LLVM has little to do with traditional virtual machines, though it does provide helpful libraries that can be used to build them.
Ubuntu Tweak is an application to config Ubuntu easier for everyone. It provides many useful desktop and system options that the default desktop environment doesn’t provide.
As a Ubuntu user, you always get excited when you see something new in Ubuntu world. You play with new applications, new themes, new applets… After playing with them, you may find something break the desktop, and you don’t know how to recover to the original style.
That’s what the Desktop Recovery will help you.
Desktop Recovery is the tool integrated into Ubuntu Tweak to help people safely tweak with desktop settings, and never worry about how to go back.
It has three basic actions:
Backup: backup the current settings, keep as many as backups you want;
Recover: recover to the backup;
Reset: even you don’t have any backup, you can also reset to the default settings;
And what items does Desktop Recovery can backup? Here’s it is:
Application settings which use GConf: gedit, Compiz, Empathy, Nautilus… You know, almost every desktop applications;
System components: Input method (ibus), network-manager, proxy…
You can see, Desktop Recovery covers almost everything of desktop/applications.
One thing You MUST know: it will only operate with the setting, not the files related with the setting. E.G. It will backup the setting about the background name, but not the real background file.
A real-time operating system (RTOS) is an operating system (OS) intended for real-time applications. Such operating systems serve application requests nearly real-time. A real-time operating system offers programmers more control over process priorities. An application’s process priority level may exceed that of a system process. Real-time operating systems minimize critical sections of system code, so that the application’s interruption is nearly critical.
A key characteristic of a real-time OS is the level of its consistency concerning the amount of time it takes to accept and complete an application’s task; the variability is jitter. A hard real-time operating system has less jitter than a soft real-time operating system. The chief design goal is not high throughput, but rather a guarantee of a soft or hard performance category. A real-time OS that can usually or generally meet a deadline is a soft real-time OS, but if it can meet a deadline deterministically it is a hard real-time OS.
Tom Wujec presents some surprisingly deep research into the “marshmallow problem” — a simple team-building exercise that involves dry spaghetti, one yard of tape and a marshmallow. Who can build the tallest tower with these ingredients? And why does a surprising group always beat the average?
Career analyst Dan Pink examines the puzzle of motivation, starting with a fact that social scientists know but most managers don’t: Traditional rewards aren’t always as effective as we think. Listen for illuminating stories — and maybe, a way forward.
In the following series, learn all about STL from the great Stephan T. Lavavej, Microsoft’s keeper of the STL cloth (this means he manages the partnership with the owners of STL and Microsoft, including, of course, bug fixes and enhancements to the STL that ships as part of Visual C++).
Alexander Alexandrovich Stepanov (Russian: Александр Александрович Степанов) (born November 16, 1950 in Moscow) is the primary designer and implementer of the C++ Standard Template Library [1], which he started to develop around 1992 while employed at HP Labs. He had earlier been working for Bell Labs close to Andrew Koenig and tried to convince Bjarne Stroustrup to introduce something like Ada Generics in C++.
Лекция «Наибольшая общая мера последние 2500 лет» (часть 1 и часть 2)
Слайды: англ и рус.
Elements of Programming – (November 3, 2010) Speakers Alexander Stepanov and Paul McJones give a presentation on the book titled “Elements of Programming”. They explain why they wrote and attempt to explain their book. They describe programming as a mathematical discipline and that it is extremely useful and should not be overlooked.
function Vigenere(Src, Key : string; Encrypt : boolean) : string;
const
OrdMinChar : integer = Ord('A');
OrdMaxChar : integer = Ord('Z');
IncludeChars : set of char = ['A'..'Z'];
var
CharRangeCount, i, j, KeyLen, KeyInc, SrcOrd, CryptOrd : integer;
SrcA : string;
begin
CharRangeCount := OrdMaxChar - OrdMinChar + 1;
KeyLen := Length(Key);
SetLength(SrcA, Length(Src));
If Encrypt then
begin
// transfer only included characters to SrcA for encryption
j := 1;
for i := 1 to Length(Src) do
begin
if (Src[i] in IncludeChars) then
begin
SrcA[j] := Src[i];
inc(j);
end;
end;
SetLength(SrcA, j - 1);
end;
SetLength(Result, Length(SrcA));
if Encrypt then
begin
// Encrypt to Result
for i := 1 to Length(SrcA) do
begin
SrcOrd := Ord(Src[i]) - OrdMinChar;
KeyInc := Ord(Key[((i - 1 ) mod KeyLen)+ 1]) - OrdMinChar;
CryptOrd := ((SrcOrd + KeyInc) mod CharRangeCount) + OrdMinChar;
Result[i] := Char(CryptOrd);
end;
end;
else
begin
// Decrypt to Result
for i := 1 to Length(SrcA) do
begin
SrcOrd := Ord(Src[i]) - OrdMinChar;
KeyInc := Ord(Key[((i - 1 ) mod KeyLen)+ 1]) - OrdMinChar;
CryptOrd := ((SrcOrd - KeyInc + CharRangeCount)
mod CharRangeCount) + OrdMinChar;
// KeyInc may be larger than SrcOrd
Result[i] := Char(CryptOrd);
end;
end;
end;
The above code will save and restore window position, size, toolbar visibility, toolbar docking area, dock states, locations and sizes. It saves using QSettings which will store your settings in a platform correct way.