SlideShare a Scribd company logo
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
toString().padStart(width) : cell.padEnd(width); }).join(''))).join
}; const proportion = (max, val) => Math.round(val * 100 / max); co
calcProportion = table => { table.sort((row1, row2) => row2[DENSITY
row1[DENSITY_COL]); const maxDensity = table[0][DENSITY_COL]; table
forEach(row => { row.push(proportion(maxDensity, row[DENSITY_COL]))
return table; }; const getDataset = file => { const lines = fs.read
FileSync(file, 'utf8').toString().split('n'); lines.shift(); lines
return lines.map(line => line.split(',')); }; const main = compose
(getDataset, calcProportion, renderTable); const fs = require('fs'
compose = (...funcs) => x => funcs.reduce((x, fn) => fn(x), x); con
DENSITY_COL = 3; const renderTable = table => { const cellWidth = [
8, 8, 18, 6]; return table.map(row => (row.map((cell, i) => { const
= cellWidth[i]; return i ? cell.toString().padStart(width) : cell.p
(width); }).join(''))).join('n'); }; const proportion = (max, val)
История развития
языков программирования
Тимур Шемсединов
github.com/HowProgrammingWorks
Chief Software Architect at Metarhia
Lecturer at Kiev Polytechnic Institute
github.com/tshemsedinov
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Карты для механических машин
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Карты для электронных машин
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Machine code
00000000: 66 B8 05 00
00000004: 66 BB 07 00
00000008: 66 01 D8
0000000B: EB 05
0000000D: 66 50
0000000F: 66 31 C0
00000012: 66 B8 00 4C
00000016: CD 21
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Assembly Language
pr1: mov ax, 5
mov bx, 7
add ax, bx
jmp exit
pr2: push ax
xor ax, ax
exit: mov ax, 4c00h
int 21h
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Fortran
INTEGER N
N = 1
10 IF (N .LE. 100) THEN
WRITE (*,*) N
N = 2*N
GOTO 10
ENDIF
INTEGER I
DO 20 I = 10, 1, -2
WRITE (*,*) 'I =', i
20 CONTINUE
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Basic
10 LET S = 0
20 MAT INPUT V
30 LET N = NUM
40 IF N = 0 THEN 100
50 FOR I = 1 TO N
65 LET S = S + V(I)
70 NEXT I
80 PRINT S/N
90 GO TO 10
100 END
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
LISP
(+ 1 2 3 4)
(defun factorial (n)
(if (= n 0) 1
(* n (factorial (- n 1)))))
(defun factorial (n)
(loop for i from 1 to n
for fac = 1 then (* fac i)
finally (return fac)))
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Algol 60
BEGIN
INTEGER ARRAY candidates[0:1000];
INTEGER i;
FOR i := 0 STEP 1 UNTIL 1000 DO
BEGIN
candidates[i] := 1;
END;
END;
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
C
#include<stdio.h>
int f(int n) {
if (n == 0 || n == 1) return n;
else return (f(n - 1) + f(n - 2));
}
int main() {
printf("%dn", f(7));
return 0;
}
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
C++
#include <iostream>
using namespace std;
class Point {
public:
double x, y;
};
int main() {
Point point1;
point1.x = 10.0;
point1.y = 20.0;
cout << point1.x << "," << point1.y << endl;
return 0;
}
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Ada
function Get_Maximum (Of : My_Array_Type) return
Element_Type is
Maximum : Element_Type := Of (Of'First);
begin
for I in Of'First + 1 .. Of'Last loop
if Of (I) > Maximum then
Maximum := Of (I);
end if;
end loop;
return Maximum;
end Get;
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
dBase, FoxBase, Clipper
@ 0,0
arr := { 1, 2, 3 }
str := "abc"
FOR EACH a, b IN arr, str
? a, b
a *= 2
IF a == 3
?? Upper( b )
EXIT
ENDIF
NEXT
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Haskell
fibonacci :: Integer -> Integer
fibonacci 0 = 1
fibonacci 1 = 1
fibonacci x = fibonacci (x-1) + fibonacci (x-2)
fibs = 1 : 1 : zipWith (+) fibs (tail fibs)
fib n = fibs !! n
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Python
def sumDigit(num):
sum = 0
while(num):
sum += num % 10
num = int(num / 10)
return sum
num = [15, 300, 2700, 821, 52, 10, 6]
print('Maximum is:', max(num, key=sumDigit))
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Java
public class Main {
public static void main(String[] args) {
int a[] = new int [100];
Random rnd = new Random();
int max = 0;
for (int i = 0; i < a.length; i++) {
a[i] = rnd.nextInt(100);
if (a[j] > max) max = a[j];
}
}
}
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Delphi
procedure TForm1.MyButtonClick(Sender: TObject);
var
Button: TButton;
begin
Button := Sender as TButton;
ShowMessage(Button.Caption + ' clicked');
end;
AButton := TButton.Create;
AButton.Caption = 'Click me';
AButton.OnClick := MyButtonClick;
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
SQL
CREATE TABLE Department(
Id INT PRIMARY KEY NOT NULL,
Name CHAR(50) NOT NULL,
EmpId INT NOT NULL
);
INSERT INTO DEPARTMENT (Id, Name, EmpId)
VALUES (1, 'Software', 7);
SELECT * FROM Department WHERE Id = 1;
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
PHP
<?php class UserLogin {
private $logged_in = false;
function __construct(sname) {
session_name(sname);
session_start();
$session_id = session_id();
if (isset($_SESSION['userid'])) {
$this->logged_in = true;
}
}
} ?>
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
C#
[Serializable]
public class Point {
public int x = 0;
public int y = 0;
}
Point p1 = new Point();
p1.x = 10;
p1.y = 20;
IFormatter formatter = new BinaryFormatter();
Stream stream = new FileStream("File.bin",
FileMode.Create, FileAccess.Write, FileShare.None);
formatter.Serialize(stream, p1);
stream.Close();
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Go
package main
import "fmt"
func f(from string) {
for i := 0; i < 3; i++ {
fmt.Println(from, ":", i)
}
}
func main() {
f("direct")
go f("goroutine")
}
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Rust
fn main() {
for n in 1..50 {
println!("{}", n);
if n % 3 == 0 {
println!("if n % 3 == 0");
} else if n % 5 == 0 {
println!("n % 5 == 0");
}
}
println!("Done");
}
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
TypeScript
interface Person {
firstName: string;
lastName: string;
}
function greeter(person: Person) {
return 'Hello, ' + person.firstName + ' ' + person.lastName;
}
const user = { firstName: 'Marcus', lastName: 'Aurelius' };
console.log(greeter(user));
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Swift
var square = 0
var diceRoll = 0
while square < finalSquare {
diceRoll += 1
if diceRoll == 7 {
diceRoll = 1
}
square += diceRoll
if square < board.count {
square += board[square]
}
}
print("Game over!")
const fs = require('fs'); const compose = (...funcs) => x => funcs.
reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab
table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma
=> (row.map((cell, i) => { const width = cellWidth[i]; return i ? c
Kotlin
class Animal(val name: String)
class Zoo(val animals: List<Animal>) {
operator fun iterator(): Iterator<Animal> {
return animals.iterator()
}
}
fun main() {
val zoo = Zoo(listOf(Animal("zebra"), Animal("lion")))
for (animal in zoo) {
println("Watch out, it's a ${animal.name}")
}
}

More Related Content

PDF
Введение в программирование (1 часть)
PDF
Node.js middleware: Never again!
PPTX
All you need to know about the JavaScript event loop
PDF
ETL With Cassandra Streaming Bulk Loading
PDF
Javascript Design Patterns
PPT
programmation orienté objet c++
PDF
Celery: The Distributed Task Queue
PDF
The Future of Java: Records, Sealed Classes and Pattern Matching
Введение в программирование (1 часть)
Node.js middleware: Never again!
All you need to know about the JavaScript event loop
ETL With Cassandra Streaming Bulk Loading
Javascript Design Patterns
programmation orienté objet c++
Celery: The Distributed Task Queue
The Future of Java: Records, Sealed Classes and Pattern Matching

What's hot (20)

PDF
Commandes usuelle linux
PDF
Sigreturn Oriented Programming
PDF
Apples and Oranges - Comparing Kafka Streams and Flink with Bill Bejeck
PDF
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
PDF
Introducción a Celery y las colas de tareas asíncronas
PPTX
A Step Towards Data Orientation
PDF
Application web php5 html5 css3 bootstrap
PDF
#살아있다 #자프링외길12년차 #코프링2개월생존기
KEY
JavaOne 2011 - JVM Bytecode for Dummies
PPTX
Introduction à spring boot
PDF
Galera cluster for MySQL - Introduction Slides
PDF
Support NodeJS avec TypeScript Express MongoDB
PDF
Lecture 07 virtual machine i
PDF
Kafka Multi-Tenancy—160 Billion Daily Messages on One Shared Cluster at LINE
PDF
Workshop 4: NodeJS. Express Framework & MongoDB.
PPT
Open HFT libraries in @Java
PDF
Complete Java Course
PDF
Prototype programming in JavaScript
PDF
Tp java ee.pptx
PDF
Android-Tp3: fragments et menus
Commandes usuelle linux
Sigreturn Oriented Programming
Apples and Oranges - Comparing Kafka Streams and Flink with Bill Bejeck
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
Introducción a Celery y las colas de tareas asíncronas
A Step Towards Data Orientation
Application web php5 html5 css3 bootstrap
#살아있다 #자프링외길12년차 #코프링2개월생존기
JavaOne 2011 - JVM Bytecode for Dummies
Introduction à spring boot
Galera cluster for MySQL - Introduction Slides
Support NodeJS avec TypeScript Express MongoDB
Lecture 07 virtual machine i
Kafka Multi-Tenancy—160 Billion Daily Messages on One Shared Cluster at LINE
Workshop 4: NodeJS. Express Framework & MongoDB.
Open HFT libraries in @Java
Complete Java Course
Prototype programming in JavaScript
Tp java ee.pptx
Android-Tp3: fragments et menus
Ad

Similar to Programming Languages: comparison, history, future (20)

PDF
Patterns and antipatterns
PDF
Новое в JavaScript: ES.Next, ECMAScript 2020, ES11, ES10, ES9, ES8, ES7, ES6,...
PDF
Node.js in 2020 - part 3
PDF
How are Race Conditions in single threaded JavaScript possible?
PDF
Node.js in 2020 - part 2
PDF
Введение в SQL
PDF
Serverless Clouds (FaaS) and request context isolation in Node.js
PDF
Race-conditions-web-locks-and-shared-memory
PDF
Web Locks API
PDF
Asynchronous programming and mutlithreading
PDF
Node.js in 2020 - part 1
PDF
Private cloud without vendor lock // Serverless
PDF
Node.js in 2020
PDF
How to keep control and safety in the clouds
PDF
JavaScript в браузере: Web API (часть 1)
PPTX
Oh Composable World!
KEY
Haskellで学ぶ関数型言語
PPTX
Seminar PSU 10.10.2014 mme
PDF
Python From Scratch (1).pdf
PDF
PythonOOP
Patterns and antipatterns
Новое в JavaScript: ES.Next, ECMAScript 2020, ES11, ES10, ES9, ES8, ES7, ES6,...
Node.js in 2020 - part 3
How are Race Conditions in single threaded JavaScript possible?
Node.js in 2020 - part 2
Введение в SQL
Serverless Clouds (FaaS) and request context isolation in Node.js
Race-conditions-web-locks-and-shared-memory
Web Locks API
Asynchronous programming and mutlithreading
Node.js in 2020 - part 1
Private cloud without vendor lock // Serverless
Node.js in 2020
How to keep control and safety in the clouds
JavaScript в браузере: Web API (часть 1)
Oh Composable World!
Haskellで学ぶ関数型言語
Seminar PSU 10.10.2014 mme
Python From Scratch (1).pdf
PythonOOP
Ad

More from Timur Shemsedinov (16)

PDF
How to use Chat GPT in JavaScript optimizations for Node.js
PDF
IT Revolution in 2023-2024: AI, GPT, business transformation, future professi...
PDF
Multithreading in Node.js and JavaScript
PDF
Node.js threads for I/O-bound tasks
PDF
Node.js Меньше сложности, больше надежности Holy.js 2021
PDF
Rethinking low-code
PDF
Hat full of developers
PDF
FwDays 2021: Metarhia Technology Stack for Node.js
PDF
Node.js for enterprise - JS Conference
PDF
Node.js for enterprise 2021 - JavaScript Fwdays 3
PDF
Node.js in 2021
PDF
Information system structure and architecture
PDF
Базы данных в 2020
PDF
Почему хорошее ИТ-образование невостребовано рыночком
PDF
Node.js security
PDF
JS Fest 2019 Node.js Antipatterns
How to use Chat GPT in JavaScript optimizations for Node.js
IT Revolution in 2023-2024: AI, GPT, business transformation, future professi...
Multithreading in Node.js and JavaScript
Node.js threads for I/O-bound tasks
Node.js Меньше сложности, больше надежности Holy.js 2021
Rethinking low-code
Hat full of developers
FwDays 2021: Metarhia Technology Stack for Node.js
Node.js for enterprise - JS Conference
Node.js for enterprise 2021 - JavaScript Fwdays 3
Node.js in 2021
Information system structure and architecture
Базы данных в 2020
Почему хорошее ИТ-образование невостребовано рыночком
Node.js security
JS Fest 2019 Node.js Antipatterns

Recently uploaded (20)

PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Cell Types and Its function , kingdom of life
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
01-Introduction-to-Information-Management.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
Business Ethics Teaching Materials for college
PPTX
Cell Structure & Organelles in detailed.
PPTX
master seminar digital applications in india
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
Classroom Observation Tools for Teachers
PPTX
Institutional Correction lecture only . . .
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
RMMM.pdf make it easy to upload and study
Anesthesia in Laparoscopic Surgery in India
Cell Types and Its function , kingdom of life
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Basic Mud Logging Guide for educational purpose
Week 4 Term 3 Study Techniques revisited.pptx
01-Introduction-to-Information-Management.pdf
Pre independence Education in Inndia.pdf
Business Ethics Teaching Materials for college
Cell Structure & Organelles in detailed.
master seminar digital applications in india
VCE English Exam - Section C Student Revision Booklet
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Classroom Observation Tools for Teachers
Institutional Correction lecture only . . .
O7-L3 Supply Chain Operations - ICLT Program
FourierSeries-QuestionsWithAnswers(Part-A).pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
RMMM.pdf make it easy to upload and study

Programming Languages: comparison, history, future

  • 1. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c toString().padStart(width) : cell.padEnd(width); }).join(''))).join }; const proportion = (max, val) => Math.round(val * 100 / max); co calcProportion = table => { table.sort((row1, row2) => row2[DENSITY row1[DENSITY_COL]); const maxDensity = table[0][DENSITY_COL]; table forEach(row => { row.push(proportion(maxDensity, row[DENSITY_COL])) return table; }; const getDataset = file => { const lines = fs.read FileSync(file, 'utf8').toString().split('n'); lines.shift(); lines return lines.map(line => line.split(',')); }; const main = compose (getDataset, calcProportion, renderTable); const fs = require('fs' compose = (...funcs) => x => funcs.reduce((x, fn) => fn(x), x); con DENSITY_COL = 3; const renderTable = table => { const cellWidth = [ 8, 8, 18, 6]; return table.map(row => (row.map((cell, i) => { const = cellWidth[i]; return i ? cell.toString().padStart(width) : cell.p (width); }).join(''))).join('n'); }; const proportion = (max, val) История развития языков программирования Тимур Шемсединов github.com/HowProgrammingWorks Chief Software Architect at Metarhia Lecturer at Kiev Polytechnic Institute github.com/tshemsedinov
  • 2. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Карты для механических машин
  • 3. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Карты для электронных машин
  • 4. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Machine code 00000000: 66 B8 05 00 00000004: 66 BB 07 00 00000008: 66 01 D8 0000000B: EB 05 0000000D: 66 50 0000000F: 66 31 C0 00000012: 66 B8 00 4C 00000016: CD 21
  • 5. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Assembly Language pr1: mov ax, 5 mov bx, 7 add ax, bx jmp exit pr2: push ax xor ax, ax exit: mov ax, 4c00h int 21h
  • 6. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Fortran INTEGER N N = 1 10 IF (N .LE. 100) THEN WRITE (*,*) N N = 2*N GOTO 10 ENDIF INTEGER I DO 20 I = 10, 1, -2 WRITE (*,*) 'I =', i 20 CONTINUE
  • 7. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Basic 10 LET S = 0 20 MAT INPUT V 30 LET N = NUM 40 IF N = 0 THEN 100 50 FOR I = 1 TO N 65 LET S = S + V(I) 70 NEXT I 80 PRINT S/N 90 GO TO 10 100 END
  • 8. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c LISP (+ 1 2 3 4) (defun factorial (n) (if (= n 0) 1 (* n (factorial (- n 1))))) (defun factorial (n) (loop for i from 1 to n for fac = 1 then (* fac i) finally (return fac)))
  • 9. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Algol 60 BEGIN INTEGER ARRAY candidates[0:1000]; INTEGER i; FOR i := 0 STEP 1 UNTIL 1000 DO BEGIN candidates[i] := 1; END; END;
  • 10. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c C #include<stdio.h> int f(int n) { if (n == 0 || n == 1) return n; else return (f(n - 1) + f(n - 2)); } int main() { printf("%dn", f(7)); return 0; }
  • 11. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c C++ #include <iostream> using namespace std; class Point { public: double x, y; }; int main() { Point point1; point1.x = 10.0; point1.y = 20.0; cout << point1.x << "," << point1.y << endl; return 0; }
  • 12. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Ada function Get_Maximum (Of : My_Array_Type) return Element_Type is Maximum : Element_Type := Of (Of'First); begin for I in Of'First + 1 .. Of'Last loop if Of (I) > Maximum then Maximum := Of (I); end if; end loop; return Maximum; end Get;
  • 13. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c dBase, FoxBase, Clipper @ 0,0 arr := { 1, 2, 3 } str := "abc" FOR EACH a, b IN arr, str ? a, b a *= 2 IF a == 3 ?? Upper( b ) EXIT ENDIF NEXT
  • 14. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Haskell fibonacci :: Integer -> Integer fibonacci 0 = 1 fibonacci 1 = 1 fibonacci x = fibonacci (x-1) + fibonacci (x-2) fibs = 1 : 1 : zipWith (+) fibs (tail fibs) fib n = fibs !! n
  • 15. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Python def sumDigit(num): sum = 0 while(num): sum += num % 10 num = int(num / 10) return sum num = [15, 300, 2700, 821, 52, 10, 6] print('Maximum is:', max(num, key=sumDigit))
  • 16. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Java public class Main { public static void main(String[] args) { int a[] = new int [100]; Random rnd = new Random(); int max = 0; for (int i = 0; i < a.length; i++) { a[i] = rnd.nextInt(100); if (a[j] > max) max = a[j]; } } }
  • 17. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Delphi procedure TForm1.MyButtonClick(Sender: TObject); var Button: TButton; begin Button := Sender as TButton; ShowMessage(Button.Caption + ' clicked'); end; AButton := TButton.Create; AButton.Caption = 'Click me'; AButton.OnClick := MyButtonClick;
  • 18. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c SQL CREATE TABLE Department( Id INT PRIMARY KEY NOT NULL, Name CHAR(50) NOT NULL, EmpId INT NOT NULL ); INSERT INTO DEPARTMENT (Id, Name, EmpId) VALUES (1, 'Software', 7); SELECT * FROM Department WHERE Id = 1;
  • 19. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c PHP <?php class UserLogin { private $logged_in = false; function __construct(sname) { session_name(sname); session_start(); $session_id = session_id(); if (isset($_SESSION['userid'])) { $this->logged_in = true; } } } ?>
  • 20. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c C# [Serializable] public class Point { public int x = 0; public int y = 0; } Point p1 = new Point(); p1.x = 10; p1.y = 20; IFormatter formatter = new BinaryFormatter(); Stream stream = new FileStream("File.bin", FileMode.Create, FileAccess.Write, FileShare.None); formatter.Serialize(stream, p1); stream.Close();
  • 21. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Go package main import "fmt" func f(from string) { for i := 0; i < 3; i++ { fmt.Println(from, ":", i) } } func main() { f("direct") go f("goroutine") }
  • 22. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Rust fn main() { for n in 1..50 { println!("{}", n); if n % 3 == 0 { println!("if n % 3 == 0"); } else if n % 5 == 0 { println!("n % 5 == 0"); } } println!("Done"); }
  • 23. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c TypeScript interface Person { firstName: string; lastName: string; } function greeter(person: Person) { return 'Hello, ' + person.firstName + ' ' + person.lastName; } const user = { firstName: 'Marcus', lastName: 'Aurelius' }; console.log(greeter(user));
  • 24. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Swift var square = 0 var diceRoll = 0 while square < finalSquare { diceRoll += 1 if diceRoll == 7 { diceRoll = 1 } square += diceRoll if square < board.count { square += board[square] } } print("Game over!")
  • 25. const fs = require('fs'); const compose = (...funcs) => x => funcs. reduce((x, fn) => fn(x), x); const DENSITY_COL = 3; const renderTab table => { const cellWidth = [18, 10, 8, 8, 18, 6]; return table.ma => (row.map((cell, i) => { const width = cellWidth[i]; return i ? c Kotlin class Animal(val name: String) class Zoo(val animals: List<Animal>) { operator fun iterator(): Iterator<Animal> { return animals.iterator() } } fun main() { val zoo = Zoo(listOf(Animal("zebra"), Animal("lion"))) for (animal in zoo) { println("Watch out, it's a ${animal.name}") } }