Lua at a Glance — A Language a Day, Advent Calendar 2019 Day 10/24

About this ‘A Language a Day’ Advent Calendar 2019 Welcome to Day 10 of this year’s A Language a Day Advent Calendar. Today’s topic is introduction to the Lua programming language. Facts about the language Some facts about Lua: A dynamically typed language Strong focus on being implementable in ANSI C (which ensures it works on … Continue reading “Lua at a Glance — A Language a Day, Advent Calendar 2019 Day 10/24”

Hack at a Glance — A Language a Day, Advent Calendar 2019 Day 9/24

About this ‘A Language a Day’ Advent Calendar 2019 Welcome to Day 9 of this year’s A Language a Day Advent Calendar. Today’s topic is introduction to the Hack programming language. Facts about the language Some facts about Hack: Hack is an extension of PHP Hack uses the HHVM virtual machine (HH = HipHop) Hack provides … Continue reading “Hack at a Glance — A Language a Day, Advent Calendar 2019 Day 9/24”

Dart at a Glance — A Language a Day, Advent Calendar 2019 Day 8/24

About this ‘A Language a Day’ Advent Calendar 2019 Welcome to Day 8 of this year’s A Language a Day Advent Calendar. Today’s topic is introduction to the Dart programming language. Facts about the language Some facts about Dart: Object-oriented Compiled to native code or to JavaScript Developed by Google Appeared in 2011 Website: dart.dev Installing … Continue reading “Dart at a Glance — A Language a Day, Advent Calendar 2019 Day 8/24”

Scala at a Glance — A Language a Day, Advent Calendar 2019 Day 7/24

About this ‘A Language a Day’ Advent Calendar 2019 Welcome to Day 7 of this year’s A Language a Day Advent Calendar. Today’s topic is introduction to the Scala programming language. Facts about the language Some facts about Scala: Based on Java (both syntactically and using JVM) Supports object-oriented and functional styles Statically typed Appeared in … Continue reading “Scala at a Glance — A Language a Day, Advent Calendar 2019 Day 7/24”

Crystal at a Glance — A Language a Day, Advent Calendar 2019 Day 6/24

About this ‘A Language a Day’ Advent Calendar 2019 Welcome to Day 6 of this year’s A Language a Day Advent Calendar. Today’s topic is introduction to the Crystal programming language. Facts about the language Some facts about Crystal Based on Ruby Static type checking Everything is an object Compiled language (but also allows script execution) … Continue reading “Crystal at a Glance — A Language a Day, Advent Calendar 2019 Day 6/24”

Kotlin at a Glance — A Language a Day, Advent Calendar 2019 Day 4/24

About this ‘A Language a Day’ Advent Calendar 2019 Welcome to Day 4 of this year’s A Language a Day Advent Calendar. Today’s topic is introduction to the Kotlin programming language. Facts about the language Some facts about the Kotlin programming language: It targets JVM (but the syntax is not of Java) Can be compiled to … Continue reading “Kotlin at a Glance — A Language a Day, Advent Calendar 2019 Day 4/24”

Julia at a Glance — A Language a Day, Advent Calendar 2019 Day 3/24

About this ‘A Language a Day’ Advent Calendar 2019 Welcome to Day 3 of this year’s A Language a Day Advent Calendar. Today’s topic is introduction to the Julia programming language. Facts about the language Some facts about Julia: A dynamically typed language Compiles to LLVM Strong support of scientific and numeric computing (math, statistics, etc.) … Continue reading “Julia at a Glance — A Language a Day, Advent Calendar 2019 Day 3/24”

Rust at a Glance — A Language a Day, Advent Calendar 2019 Day 2/24

About this ‘A Language a Day’ Advent Calendar 2019 Welcome to Day 2 of this year’s A Language a Day Advent Calendar. Today’s topic is introduction to the Rust programming language. Facts about the language Some facts about Rust: Syntactically close to C++ Makes memory management safe It is a compiled language Object-orientation is based on … Continue reading “Rust at a Glance — A Language a Day, Advent Calendar 2019 Day 2/24”

TypeScript at a Glance — A Language a Day, Advent Calendar 2019 Day 1/24

About this ‘A Language a Day’ Advent Calendar 2019 Welcome to Day 1 of this year’s A Language a Day Advent Calendar. Today’s topic is introduction to the TypeScript programming language. Facts about the language Some facts about TypeScript: TypeScript is a superset on top of JavaScript The source code compiles to plain JavaScript There is … Continue reading “TypeScript at a Glance — A Language a Day, Advent Calendar 2019 Day 1/24”

‘A Language a Day’ — Advent Calendar 2019

Welcome to my Advent Calendar 2019. Last year, I was publishing daily articles about one-liners in Raku. This year, I decided to spend time on filling the gap in other areas and try as many other languages as possible. During the last decade or so, a lot of programming languages appeared. Some of them are … Continue reading “‘A Language a Day’ — Advent Calendar 2019”

constexpr in C++ 11 and C++ 14

In the previous post, we were talking about the constexpr keyword in modern C++. It was added to the C++ 11 standard, but in C++ 14, it got a very nice addition. In particular, you can do more in constexpr functions now. Consider the following program that wants to pre-compute a factorial of 5. #include <iostream> … Continue reading “constexpr in C++ 11 and C++ 14”

Using Perl 6

There is a new version of this book. If you want to get an electronic copy or a paperback, see Using Raku for more details. 100 Programming Challenges Solved with the Perl 6 Programming Language This book is a collection of different programming challenges and solutions in Perl 6. It can be used as an … Continue reading “Using Perl 6”

🎄 26/25. Overview of the Perl 6 One-Liner Advent Calendar 2018

The Perl 6 One-Liner Advent Calendar 2018 is over! Let’s make a quick overview of what we have covered so far. There were a few themes covered. First, some one-liners from the Perl 6 Calendar 2019 were explained in more detail. We looked at how to generate random passwords and random integers, how to print … Continue reading “🎄 26/25. Overview of the Perl 6 One-Liner Advent Calendar 2018”

🎄 11/25. Solving the Problem 34 in Perl 6

Welcome to Day 11 of the Perl 6 One-Liner Advent Calendar! Today, the calendar post is totally devoted to the solution of problem 34 of Project Euler. Once again, let me warn you to pause reading if you want to find your own solution prior to seeing mine. So, the task is to find the … Continue reading “🎄 11/25. Solving the Problem 34 in Perl 6”

🎄 10/25. Reduction operator in Perl 6

Welcome to Day 10 of the Perl 6 One-Liner Advent Calendar! Today, there will be three one-liners instead of a regular one. Our today’s guest is a reduction construction with a pair of square brackets. When they do not surround an array index, they work in a completely different field. Example 1 The most classical … Continue reading “🎄 10/25. Reduction operator in Perl 6”

🔬52. An attempt to understand how [*] works in Perl 6

Reduction operators are one of the many attractive features of Perl 6. A classical example is calculating factorial: say [*] 1..5; # 120 It is remarkable that in the AST output (generated with the –target=ast command-line option) you do not see any cycles. There is the METAOP_REDUCE_LEFT call, and obviously, the rest is hidden on the deeper … Continue reading “🔬52. An attempt to understand how [*] works in Perl 6”