title: Scala (programming language)

paragraphs: Scala ( ) is a general-purpose programming language providing support for both object-oriented programming and functional programming. The language has a strong static type system. Designed to be concise, many of Scala's design decisions are aimed to address criticisms of Java.

paragraphs: Scala source code is intended to be compiled to Java bytecode, so that the resulting executable code runs on a Java virtual machine. Scala provides language interoperability with Java, so that libraries written in either language may be referenced directly in Scala or Java code. Like Java, Scala is object-oriented, and uses a curly-brace syntax reminiscent of the C programming language. Unlike Java, Scala has many features of functional programming languages like Scheme, Standard ML and Haskell, including currying, immutability, lazy evaluation, and pattern matching. It also has an advanced type system supporting algebraic data types, covariance and contravariance, higher-order types (but not higher-rank types), and anonymous types. Other features of Scala not present in Java include operator overloading, optional parameters, named parameters, and raw strings. Conversely, a feature of Java not in Scala is checked exceptions, which has proved controversial.

paragraphs: The name Scala is a portmanteau of "scalable" and "language", signifying that it is designed to grow with the demands of its users.

paragraphs: The design of Scala started in 2001 at the École Polytechnique Fédérale de Lausanne (EPFL) (in Lausanne, Switzerland) by Martin Odersky. It followed on from work on Funnel, a programming language combining ideas from functional programming and Petri nets. Odersky formerly worked on Generic Java, and javac, Sun's Java compiler.

paragraphs: After an internal release in late 2003, Scala was released publicly in early 2004 on the Java platform, A second version (v2.0) followed in March 2006.

paragraphs: On 17 January 2011, the Scala team won a five-year research grant of over €2.3 million from the European Research Council. On 12 May 2011, Odersky and collaborators launched Typesafe Inc. (later renamed Lightbend Inc.), a company to provide commercial support, training, and services for Scala. Typesafe received a $3 million investment in 2011 from Greylock Partners.

paragraphs: Scala runs on the Java platform (Java virtual machine) and is compatible with existing Java programs. As Android applications are typically written in Java and translated from Java bytecode into Dalvik bytecode (which may be further translated to native machine code during installation) when packaged, Scala's Java compatibility makes it well-suited to Android development, more so when a functional approach is preferred.

paragraphs: The reference Scala software distribution, including compiler and libraries, is released under the Apache license.

paragraphs: "Scala.js" is a Scala compiler that compiles to JavaScript, making it possible to write Scala programs that can run in web browsers or "Node.js". The compiler was in development since 2013, was announced as no longer experimental in 2015 (v0.6). Version v1.0.0-M1 was released in June 2018. In September 2020 it is at version 1.1.1.

paragraphs: Scala Native is a Scala compiler that targets the LLVM compiler infrastructure to create executable code that uses a lightweight managed runtime, which uses the Boehm garbage collector. The project is led by Denys Shabalin and had its first release, 0.1, on 14 March 2017. Development of Scala Native began in 2015 with a goal of being faster than just-in-time compilation for the JVM by eliminating the initial runtime compilation of code and also providing the ability to call native routines directly.

paragraphs: A reference Scala compiler targeting the .NET Framework and its Common Language Runtime was released in June 2004, but was officially dropped in 2012.

paragraphs: The Hello World program written in Scala has this form:

paragraphs: Unlike the stand-alone Hello World application for Java, there is no class declaration and nothing is declared to be static; a singleton object created with the object keyword is used instead.

paragraphs: When the program is stored in file "HelloWorld.scala", the user compiles it with the command:

paragraphs: This is analogous to the process for compiling and running Java code. Indeed, Scala's compiling and executing model is identical to that of Java, making it compatible with Java build tools such as Apache Ant.

paragraphs: A shorter version of the "Hello World" Scala program is:

paragraphs: Scala includes interactive shell and scripting support. Saved in a file named codice_1, this can be run as a script with no prior compiling using:

paragraphs: Commands can also be entered directly into the Scala interpreter, using the option :

paragraphs: Expressions can be entered interactively in the REPL:

paragraphs: Welcome to Scala 2.12.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_131).

paragraphs: Type in expressions for evaluation. Or try :help.

paragraphs: The following example shows the differences between Java and Scala syntax:

paragraphs: Some syntactic differences in this code are:

paragraphs: These syntactic relaxations are designed to allow support for domain-specific languages.

paragraphs: The following example contrasts the definition of classes in Java and Scala.

paragraphs: The code above shows some of the conceptual differences between Java and Scala's handling of classes:

paragraphs: Scala has the same compiling model as Java and C#, namely separate compiling and dynamic class loading, so that Scala code can call Java libraries.

paragraphs: Scala's operational characteristics are the same as Java's. The Scala compiler generates byte code that is nearly identical to that generated by the Java compiler. In fact, Scala code can be decompiled to readable Java code, with the exception of certain constructor operations. To the Java virtual machine (JVM), Scala code and Java code are indistinguishable. The only difference is one extra runtime library, codice_35.

paragraphs: Scala adds a large number of features compared with Java, and has some fundamental differences in its underlying model of expressions and types, which make the language theoretically cleaner and eliminate several "corner cases" in Java. From the Scala perspective, this is practically important because several added features in Scala are also available in C#. Examples include:

paragraphs: As mentioned above, Scala has a good deal of syntactic flexibility, compared with Java. The following are some examples:

paragraphs: By themselves, these may seem like questionable choices, but collectively they serve the purpose of allowing domain-specific languages to be defined in Scala without needing to extend the compiler. For example, Erlang's special syntax for sending a message to an actor, i.e. codice_67 can be (and is) implemented in a Scala library without needing language extensions.

paragraphs: Java makes a sharp distinction between primitive types (e.g. codice_68 and codice_69) and reference types (any class). Only reference types are part of the inheritance scheme, deriving from codice_70. In Scala, all types inherit from a top-level class codice_71, whose immediate children are codice_72 (value types, such as codice_73 and codice_74) and codice_75 (reference types, as in Java). This means that the Java distinction between primitive types and boxed types (e.g. codice_68 vs. codice_77) is not present in Scala; boxing and unboxing is completely transparent to the user. Scala 2.10 allows for new value types to be defined by the user.

paragraphs: Instead of the Java "foreach" loops for looping through an iterator, Scala has codice_78-expressions, which are similar to list comprehensions in languages such as Haskell, or a combination of list comprehensions and generator expressions in Python. For-expressions using the codice_79 keyword allow a new collection to be generated by iterating over an existing one, returning a new collection of the same type. They are translated by the compiler into a series of codice_64, codice_65 and codice_66 calls. Where codice_79 is not used, the code approximates to an imperative-style loop, by translating to codice_84.

paragraphs: val s = for (x <- 1 to 25 if x*x > 50) yield 2*x

paragraphs: The result of running it is the following vector:

paragraphs: A more complex example of iterating over a map is:

paragraphs: // Given a map specifying Twitter users mentioned in a set of tweets,

paragraphs: // and number of times each user was mentioned, look up the users

paragraphs: // in a map of known politicians, and return a new map giving only the

paragraphs: // Democratic politicians (as objects, rather than strings).

paragraphs: Expression codice_88 is an example of pattern matching (see below). Iterating over a map returns a set of key-value tuples, and pattern-matching allows the tuples to easily be destructured into separate variables for the key and value. Similarly, the result of the comprehension also returns key-value tuples, which are automatically built back up into a map because the source object (from the variable codice_89) is a map. Note that if codice_89 instead held a list, set, array or other collection of tuples, exactly the same code above would yield a new collection of the same type.

paragraphs: While supporting all of the object-oriented features available in Java (and in fact, augmenting them in various ways), Scala also provides a large number of capabilities that are normally found only in functional programming languages. Together, these features allow Scala programs to be written in an almost completely functional style and also allow functional and object-oriented styles to be mixed.

paragraphs: Unlike C or Java, but similar to languages such as Lisp, Scala makes no distinction between statements and expressions. All statements are in fact expressions that evaluate to some value. Functions that would be declared as returning codice_24 in C or Java, and statements like codice_92 that logically do not return a value, are in Scala considered to return the type codice_25, which is a singleton type, with only one object of that type. Functions and operators that never return at all (e.g. the codice_94 operator or a function that always exits non-locally using an exception) logically have return type codice_95, a special type containing no objects; that is, a bottom type, i.e. a subclass of every possible type. (This in turn makes type codice_95 compatible with every type, allowing type inference to function correctly.)

paragraphs: Similarly, an codice_97 "statement" is actually an expression, which produces a value, i.e. the result of evaluating one of the two branches. This means that such a block of code can be inserted wherever an expression is desired, obviating the need for a ternary operator in Scala:

paragraphs: For similar reasons, codice_7 statements are unnecessary in Scala, and in fact are discouraged. As in Lisp, the last expression in a block of code is the value of that block of code, and if the block of code is the body of a function, it will be returned by the function.

paragraphs: To make it clear that all functions are expressions, even methods that return codice_25 are written with an equals sign

paragraphs: or equivalently (with type inference, and omitting the unnecessary braces):

paragraphs: def printValue(x: String) = println("I ate a %s" format x)

paragraphs: Due to type inference, the type of variables, function return values, and many other expressions can typically be omitted, as the compiler can deduce it. Examples are codice_100 (for an immutable constant or immutable object) or codice_101 (for a variable whose value can later be changed). Type inference in Scala is essentially local, in contrast to the more global Hindley-Milner algorithm used in Haskell, ML and other more purely functional languages. This is done to facilitate object-oriented programming. The result is that certain types still need to be declared (most notably, function parameters, and the return types of recursive functions), e.g.

paragraphs: def formatApples(x: Int) = "I ate %d apples".format(x)

paragraphs: or (with a return type declared for a recursive function)

paragraphs: In Scala, functions are objects, and a convenient syntax exists for specifying anonymous functions. An example is the expression codice_102, which specifies a function with one parameter, that compares its argument to see if it is less than 2. It is equivalent to the Lisp form codice_103. Note that neither the type of codice_104 nor the return type need be explicitly specified, and can generally be inferred by type inference; but they can be explicitly specified, e.g. as codice_105 or even codice_106.

paragraphs: Anonymous functions behave as true closures in that they automatically capture any variables that are lexically available in the environment of the enclosing function. Those variables will be available even after the enclosing function returns, and unlike in the case of Java's "anonymous inner classes" do not need to be declared as final. (It is even possible to modify such variables if they are mutable, and the modified value will be available the next time the anonymous function is called.)

paragraphs: An even shorter form of anonymous function uses placeholder variables: For example, the following:

paragraphs: Scala enforces a distinction between immutable and mutable variables. Mutable variables are declared using the codice_6 keyword and immutable values are declared using the codice_5 keyword.

paragraphs: A variable declared using the codice_5 keyword can not be reassigned in the same way that a variable declared using the codice_113 keyword can't be reassigned in Java. It should be noted however that codice_5's are only shallowly immutable, that is, an object referenced by a val is not guaranteed to itself be immutable.

paragraphs: Immutable classes are encouraged by convention however, and the Scala standard library provides a rich set of immutable collection classes.

paragraphs: Scala provides mutable and immutable variants of most collection classes, and the immutable version is always used unless the mutable version is explicitly imported.

paragraphs: The immutable variants are persistent data structures that always return an updated copy of an old object instead of updating the old object destructively in place.

paragraphs: An example of this is immutable linked lists where prepending an element to a list is done by returning a new list node consisting of the element and a reference to the list tail.

paragraphs: Appending an element to a list can only be done by prepending all elements in the old list to a new list with only the new element.

paragraphs: In the same way, inserting an element in the middle of a list will copy the first half of the list, but keep a reference to the second half of the list. This is called structural sharing.

paragraphs: This allows for very easy concurrency — no locks are needed as no shared objects are ever modified.

paragraphs: Evaluation is strict ("eager") by default. In other words, Scala evaluates expressions as soon as they are available, rather than as needed. However, it is possible to declare a variable non-strict ("lazy") with the codice_115 keyword, meaning that the code to produce the variable's value will not be evaluated until the first time the variable is referenced. Non-strict collections of various types also exist (such as the type codice_116, a non-strict linked list), and any collection can be made non-strict with the codice_117 method. Non-strict collections provide a good semantic fit to things like server-produced data, where the evaluation of the code to generate later elements of a list (that in turn triggers a request to a server, possibly located somewhere else on the web) only happens when the elements are actually needed.

paragraphs: Functional programming languages commonly provide tail call optimization to allow for extensive use of recursion without stack overflow problems. Limitations in Java bytecode complicate tail call optimization on the JVM. In general, a function that calls itself with a tail call can be optimized, but mutually recursive functions cannot. Trampolines have been suggested as a workaround. Trampoline support has been provided by the Scala library with the object codice_118 since Scala 2.8.0 (released 14 July 2010). A function may optionally be annotated with codice_119, in which case it will not compile unless it is tail recursive.

paragraphs: Scala has built-in support for pattern matching, which can be thought of as a more sophisticated, extensible version of a switch statement, where arbitrary data types can be matched (rather than just simple types like integers, booleans and strings), including arbitrary nesting. A special type of class known as a "case class" is provided, which includes automatic support for pattern matching and can be used to model the algebraic data types used in many functional programming languages. (From the perspective of Scala, a case class is simply a normal class for which the compiler automatically adds certain behaviors that could also be provided manually, e.g., definitions of methods providing for deep comparisons and hashing, and destructuring a case class on its constructor parameters during pattern matching.)

paragraphs: An example of a definition of the quicksort algorithm using pattern matching is this:

paragraphs: def qsort(list: List[Int]): List[Int] = list match {

paragraphs: The idea here is that we partition a list into the elements less than a pivot and the elements not less, recursively sort each part, and paste the results together with the pivot in between. This uses the same divide-and-conquer strategy of mergesort and other fast sorting algorithms.

paragraphs: The codice_120 operator is used to do pattern matching on the object stored in codice_121. Each codice_122 expression is tried in turn to see if it will match, and the first match determines the result. In this case, codice_123 only matches the literal object codice_123, but codice_125 matches a non-empty list, and simultaneously "destructures" the list according to the pattern given. In this case, the associated code will have access to a local variable named codice_126 holding the head of the list, and another variable codice_127 holding the tail of the list. Note that these variables are read-only, and are semantically very similar to variable bindings established using the codice_128 operator in Lisp and Scheme.

paragraphs: Pattern matching also happens in local variable declarations. In this case, the return value of the call to codice_129 is a tuple — in this case, two lists. (Tuples differ from other types of containers, e.g. lists, in that they are always of fixed size and the elements can be of differing types — although here they are both the same.) Pattern matching is the easiest way of fetching the two parts of the tuple.

paragraphs: The form codice_130 is a declaration of an anonymous function with a placeholder variable; see the section above on anonymous functions.

paragraphs: The list operators codice_131 (which adds an element onto the beginning of a list, similar to codice_132 in Lisp and Scheme) and codice_133 (which appends two lists together, similar to codice_134 in Lisp and Scheme) both appear. Despite appearances, there is nothing "built-in" about either of these operators. As specified above, any string of symbols can serve as function name, and a method applied to an object can be written "infix"-style without the period or parentheses. The line above as written:

paragraphs: in more standard method-call notation. (Methods that end with a colon are right-associative and bind to the object to the right.)

paragraphs: In the pattern-matching example above, the body of the codice_120 operator is a partial function, which consists of a series of codice_122 expressions, with the first matching expression prevailing, similar to the body of a switch statement. Partial functions are also used in the exception-handling portion of a codice_139 statement:

paragraphs: Finally, a partial function can be used alone, and the result of calling it is equivalent to doing a codice_120 over it. For example, the prior code for quicksort can be written thus:

paragraphs: Here a read-only "variable" is declared whose type is a function from lists of integers to lists of integers, and bind it to a partial function. (Note that the single parameter of the partial function is never explicitly declared or named.) However, we can still call this variable exactly as if it were a normal function:

paragraphs: Scala is a pure object-oriented language in the sense that every value is an object. Data types and behaviors of objects are described by classes and traits. Class abstractions are extended by subclassing and by a flexible mixin-based composition mechanism to avoid the problems of multiple inheritance.

paragraphs: Traits are Scala's replacement for Java's interfaces. Interfaces in Java versions under 8 are highly restricted, able only to contain abstract function declarations. This has led to criticism that providing convenience methods in interfaces is awkward (the same methods must be reimplemented in every implementation), and extending a published interface in a backwards-compatible way is impossible. Traits are similar to mixin classes in that they have nearly all the power of a regular abstract class, lacking only class parameters (Scala's equivalent to Java's constructor parameters), since traits are always mixed in with a class. The codice_141 operator behaves specially in traits, allowing traits to be chained using composition in addition to inheritance. The following example is a simple window system:

paragraphs: trait HorizontalScrollbarDecoration extends WindowDecoration {

paragraphs: trait VerticalScrollbarDecoration extends WindowDecoration {

paragraphs: trait TitleDecoration extends WindowDecoration {

paragraphs: val mywin = new SimpleWindow with VerticalScrollbarDecoration with HorizontalScrollbarDecoration with TitleDecoration

paragraphs: In other words, the call to codice_143 first executed the code in codice_144 (the last trait mixed in), then (through the codice_145 calls) threaded back through the other mixed-in traits and eventually to the code in codice_146, "even though none of the traits inherited from one another". This is similar to the decorator pattern, but is more concise and less error-prone, as it doesn't require explicitly encapsulating the parent window, explicitly forwarding functions whose implementation isn't changed, or relying on run-time initialization of entity relationships. In other languages, a similar effect could be achieved at compile-time with a long linear chain of implementation inheritance, but with the disadvantage compared to Scala that one linear inheritance chain would have to be declared for each possible combination of the mix-ins.

paragraphs: Scala is equipped with an expressive static type system that mostly enforces the safe and coherent use of abstractions. The type system is, however, not sound. In particular, the type system supports:

paragraphs: Scala is able to infer types by usage. This makes most static type declarations optional. Static types need not be explicitly declared unless a compiler error indicates the need. In practice, some static type declarations are included for the sake of code clarity.

paragraphs: A common technique in Scala, known as "enrich my library" (originally termed "pimp my library" by Martin Odersky in 2006; concerns were raised about this phrasing due to its negative connotations and immaturity), allows new methods to be used as if they were added to existing types. This is similar to the C# concept of extension methods but more powerful, because the technique is not limited to adding methods and can, for instance, be used to implement new interfaces. In Scala, this technique involves declaring an implicit conversion from the type "receiving" the method to a new type (typically, a class) that wraps the original type and provides the additional method. If a method cannot be found for a given type, the compiler automatically searches for any applicable implicit conversions to types that provide the method in question.

paragraphs: This technique allows new methods to be added to an existing class using an add-on library such that only code that "imports" the add-on library gets the new functionality, and all other code is unaffected.

paragraphs: The following example shows the enrichment of type codice_73 with methods codice_148 and codice_149:

paragraphs: import MyExtensions._ // bring implicit enrichment into scope

paragraphs: Importing the members of codice_150 brings the implicit conversion to extension class codice_151 into scope.

paragraphs: Scala's standard library includes support for the actor model, in addition to the standard Java concurrency APIs. Lightbend Inc. provides a platform that includes Akka, a separate open-source framework that provides actor-based concurrency. Akka actors may be distributed or combined with software transactional memory ("transactors"). Alternative communicating sequential processes (CSP) implementations for channel-based message passing are Communicating Scala Objects, or simply via JCSP.

paragraphs: An Actor is like a thread instance with a mailbox. It can be created by codice_152, overriding the codice_153 method to receive messages and using the codice_154 (exclamation point) method to send a message.

paragraphs: The following example shows an EchoServer that can receive messages and then print them.

paragraphs: Scala also comes with built-in support for data-parallel programming in the form of Parallel Collections integrated into its Standard Library since version 2.9.0.

paragraphs: The following example shows how to use Parallel Collections to improve performance.

paragraphs: val urls = List("https://scala-lang.org", "https://github.com/scala/scala")

paragraphs: def fromURL(url: String) = scala.io.Source.fromURL(url)

paragraphs: urls.par.map(fromURL(_)) // par returns parallel implementation of a collection

paragraphs: println("time: " + (System.currentTimeMillis - t) + "ms")

paragraphs: Besides actor support and data-parallelism, Scala also supports asynchronous programming with Futures and Promises, software transactional memory, and event streams.

paragraphs: The most well-known open-source cluster-computing solution written in Scala is Apache Spark. Additionally, Apache Kafka, the publish–subscribe message queue popular with Spark and other stream processing technologies, is written in Scala.

paragraphs: There are several ways to test code in Scala. ScalaTest supports multiple testing styles and can integrate with Java-based testing frameworks. ScalaCheck is a library similar to Haskell's QuickCheck. specs2 is a library for writing executable software specifications. ScalaMock provides support for testing high-order and curried functions. JUnit and TestNG are popular testing frameworks written in Java.

paragraphs: Scala is often compared with Groovy and Clojure, two other programming languages also using the JVM. Substantial differences between these languages are found in the type system, in the extent to which each language supports object-oriented and functional programming, and in the similarity of their syntax to the syntax of Java.

paragraphs: Scala is statically typed, while both Groovy and Clojure are dynamically typed. This makes the type system more complex and difficult to understand but allows almost all type errors to be caught at compile-time and can result in significantly faster execution. By contrast, dynamic typing requires more testing to ensure program correctness and is generally slower in order to allow greater programming flexibility and simplicity. Regarding speed differences, current versions of Groovy and Clojure allow for optional type annotations to help programs avoid the overhead of dynamic typing in cases where types are practically static. This overhead is further reduced when using recent versions of the JVM, which has been enhanced with an "invoke dynamic" instruction for methods that are defined with dynamically typed arguments. These advances reduce the speed gap between static and dynamic typing, although a statically typed language, like Scala, is still the preferred choice when execution efficiency is very important.

paragraphs: Regarding programming paradigms, Scala inherits the object-oriented model of Java and extends it in various ways. Groovy, while also strongly object-oriented, is more focused in reducing verbosity. In Clojure, object-oriented programming is deemphasised with functional programming being the main strength of the language. Scala also has many functional programming facilities, including features found in advanced functional languages like Haskell, and tries to be agnostic between the two paradigms, letting the developer choose between the two paradigms or, more frequently, some combination thereof.

paragraphs: Regarding syntax similarity with Java, Scala inherits much of Java's syntax, as is the case with Groovy. Clojure on the other hand follows the Lisp syntax, which is different in both appearance and philosophy. However, learning Scala is also considered difficult because of its many advanced features. This is not the case with Groovy, despite its also being a feature-rich language, mainly because it was designed to be mainly a scripting language.

paragraphs: , all JVM-based languages (Clojure, Groovy, Kotlin, Scala) are significantly less popular than the original Java language, which is usually ranked first or second, and which is also simultaneously evolving over time.

paragraphs: The Popularity of Programming Language Index, which tracks searches for language tutorials, ranked Scala 15th in April 2018 with a small downward trend. This makes Scala the most popular JVM-based language after Java, although immediately followed by Kotlin, a JVM-based language with a strong upward trend ranked 16th.

paragraphs: The TIOBE index of programming language popularity employs internet search engine rankings and similar publication-counting to determine language popularity. As of April 2018, it shows Scala in 34th place, having dropped four places over the last two years, but–as mentioned under "Bugs & Change Requests"–TIOBE is aware of issues with its methodology of using search terms which might not be commonly used in some programming language communities. In this ranking Scala is ahead of some functional languages like Haskell (42nd), Erlang, but below other languages like Swift (15th), Perl (16th), Go (19th) and Clojure (30th).

paragraphs: The ThoughtWorks Technology Radar, which is an opinion based biannual report of a group of senior technologists, recommended Scala adoption in its languages and frameworks category in 2013. In July 2014, this assessment was made more specific and now refers to a "Scala, the good parts", which is described as "To successfully use Scala, you need to research the language and have a very strong opinion on which parts are right for you, creating your own definition of Scala, the good parts.".

paragraphs: The RedMonk Programming Language Rankings, which establishes rankings based on the number of GitHub projects and questions asked on Stack Overflow, ranks Scala 14th. Here, Scala is placed inside a second-tier group of languages–ahead of Go, PowerShell and Haskell, and behind Swift, Objective-C, Typescript and R. However, in its 2018 report, the Rankings noted a drop of Scala's rank for the third time in a row, questioning "how much of the available oxygen for Scala is consumed by Kotlin as the latter continues to rocket up these rankings".

paragraphs: In the 2018 edition of the "State of Java" survey, which collected data from 5160 developers on various Java-related topics, Scala places third in terms of usage of alternative languages on the JVM. Compared to the last year's edition of the survey, Scala's usage among alternative JVM languages fell by almost a quarter (from 28.4% to 21.5%), overtaken by Kotlin, which rose from 11.4% in 2017 to 28.8% in 2018.

paragraphs: In March 2015, former VP of the Platform Engineering group at Twitter Raffi Krikorian, stated that he would not have chosen Scala in 2011 due to its learning curve. The same month, LinkedIn SVP Kevin Scott stated their decision to "minimize [their] dependence on Scala". In November 2011, Yammer moved away from Scala for reasons that included the learning curve for new team members and incompatibility from one version of the Scala compiler to the next.


title: MongoDB

paragraphs: MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License (SSPL).

paragraphs: 10gen software company began developing MongoDB in 2007 as a component of a planned platform as a service product. In 2009, the company shifted to an open-source development model, with the company offering commercial support and other services. In 2013, 10gen changed its name to MongoDB Inc.

paragraphs: On October 20, 2017, MongoDB became a publicly traded company, listed on NASDAQ as MDB with an IPO price of $24 per share.

paragraphs: On October 30, 2019, MongoDB teamed up with Alibaba Cloud, who will offer its customers a MongoDB-as-a-service solution. Customers can use the managed offering from BABA's global data centers.

paragraphs: MongoDB supports field, range query, and regular-expression searches. Queries can return specific fields of documents and also include user-defined JavaScript functions. Queries can also be configured to return a random sample of results of a given size.

paragraphs: Fields in a MongoDB document can be indexed with primary and secondary indices.

paragraphs: MongoDB provides high availability with replica sets. A replica set consists of two or more copies of the data. Each replica-set member may act in the role of primary or secondary replica at any time. All writes and reads are done on the primary replica by default. Secondary replicas maintain a copy of the data of the primary using built-in replication. When a primary replica fails, the replica set automatically conducts an election process to determine which secondary should become the primary. Secondaries can optionally serve read operations, but that data is only eventually consistent by default.

paragraphs: MongoDB scales horizontally using sharding. The user chooses a shard key, which determines how the data in a collection will be distributed. The data is split into ranges (based on the shard key) and distributed across multiple shards. (A shard is a master with one or more replicas.). Alternatively, the shard key can be hashed to map to a shard – enabling an even data distribution.

paragraphs: MongoDB can run over multiple servers, balancing the load or duplicating data to keep the system up and running in case of hardware failure.

paragraphs: MongoDB can be used as a file system, called GridFS, with load balancing and data replication features over multiple machines for storing files.

paragraphs: This function, called grid file system, is included with MongoDB drivers. MongoDB exposes functions for file manipulation and content to developers. GridFS can be accessed using mongofiles utility or plugins for Nginx and lighttpd. GridFS divides a file into parts, or chunks, and stores each of those chunks as a separate document.

paragraphs: MongoDB provides three ways to perform aggregation: the aggregation pipeline, the map-reduce function, and single-purpose aggregation methods.

paragraphs: Map-reduce can be used for batch processing of data and aggregation operations. But according to MongoDB's documentation, the Aggregation Pipeline provides better performance for most aggregation operations.

paragraphs: The aggregation framework enables users to obtain the kind of results for which the SQL GROUP BY clause is used. Aggregation operators can be strung together to form a pipeline – analogous to Unix pipes. The aggregation framework includes the $lookup operator which can join documents from multiple collections, as well as statistical operators such as standard deviation.

paragraphs: JavaScript can be used in queries, aggregation functions (such as MapReduce), and sent directly to the database to be executed.

paragraphs: MongoDB supports fixed-size collections called capped collections. This type of collection maintains insertion order and, once the specified size has been reached, behaves like a circular queue.

paragraphs: MongoDB claims to support multi-document ACID transactions since the 4.0 release in June 2018. This claim was found to not be true as MongoDB violates snapshot isolation.

paragraphs: The MongoDB Community Edition is free and available for Windows, Linux, and OS X.

paragraphs: MongoDB Enterprise Server is the commercial edition of MongoDB, available as part of the MongoDB Enterprise Advanced subscription.

paragraphs: MongoDB is also available as an on-demand fully managed service. MongoDB Atlas runs on AWS, Microsoft Azure, and Google Cloud Platform.

paragraphs: MongoDB has official drivers for major programming languages and development environments. There are also a large number of unofficial or community-supported drivers for other programming languages and frameworks.

paragraphs: MongoDB Stitch provides serverless access to MongoDB and other services. Client libraries are available for JavaScript, iOS, and Android.

paragraphs: The primary interface to the database has been the mongo shell. Since MongoDB 3.2, MongoDB Compass is introduced as the native GUI. There are products and third-party projects that offer user interfaces for administration and data viewing.

paragraphs: As of October 2018, MongoDB is released under the Server Side Public License (SSPL), a license developed by the project. It replaces the GNU Affero General Public License, and is nearly identical to the GNU General Public License version 3, but requires that those making the software publicly available as part of a "service" must make the service's entire source code available under this license. The SSPL was submitted for certification to the Open Source Initiative but later withdrawn. The language drivers are available under an Apache License. In addition, MongoDB Inc. offers proprietary licenses for MongoDB. The last versions licensed as AGPL version 3 are 4.0.3 (stable) and 4.1.4.

paragraphs: MongoDB has been removed from the Debian, Fedora and Red Hat Enterprise Linux distributions due to the licensing change. Fedora determined that the SSPL version 1 is not a free software license because it is "intentionally crafted to be aggressively discriminatory" towards commercial users.

paragraphs: Due to the default security configuration of MongoDB, allowing anyone to have full access to the database, data from tens of thousands of MongoDB installations has been stolen. Furthermore, many MongoDB servers have been held for ransom.

paragraphs: From the MongoDB 2.6 release onwards, the binaries from the official MongoDB RPM and DEB packages bind to localhost by default. From MongoDB 3.6, this default behavior was extended to all MongoDB packages across all platforms. As a result, all networked connections to the database will be denied unless explicitly configured by an administrator.

paragraphs: In some failure scenarios where an application can access two distinct MongoDB processes, but these processes cannot access each other, it is possible for MongoDB to return stale reads. In this scenario it is also possible for MongoDB to roll back writes that have been acknowledged. This issue was addressed since version 3.4.0 released in November 2016 (and back-ported to v3.2.12).

paragraphs: Before version 2.2, locks were implemented on a per-server process basis. With version 2.2, locks were implemented at the database level. Since version 3.0, pluggable storage engines were introduced, and each storage engine may implement locks differently. With MongoDB 3.0 locks are implemented at the collection level for the MMAPv1 storage engine, while the WiredTiger storage engine uses an optimistic concurrency protocol that effectively provides document-level locking. Even with versions prior to 3.0, one approach to increase concurrency is to use sharding. In some situations, reads and writes will yield their locks. If MongoDB predicts a page is unlikely to be in memory, operations will yield their lock while the pages load. The use of lock yielding expanded greatly in 2.2.

paragraphs: Up until version 3.3.11, MongoDB could not do collation-based sorting and was limited to byte-wise comparison via memcmp which would not provide correct ordering for many non-English languages when used with a Unicode encoding. The issue was fixed on August 23, 2016.

paragraphs: Prior to MongoDB 4.0, queries against an index were not atomic. Documents which were being updated while the query was running could be missed. The introduction of the snapshot read concern in MongoDB 4.0 eliminated this phenomenon.

paragraphs: Although MongoDB claims in an undated article entitled "MongoDB and Jepsen" that their database passed Distributed Systems Safety Research company Jepsen's tests, which it called “the industry’s toughest data safety, correctness, and consistency Tests”, Jepsen published an article in May 2020 stating that MongoDB 3.6.4 had in fact failed their tests, and that the newer MongoDB 4.2.6 has more problems including “retrocausal transactions” where a transaction reverses order so that a read can see the result of a future write. Jepsen noted in their report that MongoDB omitted any mention of these findings on MongoDB's "MongoDB and Jepsen" page.

paragraphs: MongoDB is known to be used by Barclays; Bosch; Cisco; Pfizer; City of Chicago; Codecademy; Coinbase; eBay; Foursquare; HSBC; IBM; Orange S.A.; Sega; The Gap, Inc.; Uber; Urban Outfitters; and U.S. Immigration and Customs Enforcement.

paragraphs: MongoDB World is an annual developer conference hosted by MongoDB, Inc.


title: Rust (programming language)

paragraphs: Rust is a multi-paradigm programming language designed for performance and safety, especially safe concurrency. Rust is syntactically similar to C++, but can guarantee memory safety by using a "borrow checker" to validate references. Rust achieves memory safety without garbage collection, and reference counting is optional.

paragraphs: Rust was originally designed by Graydon Hoare at Mozilla Research, with contributions from Dave Herman, Brendan Eich, and others. The designers refined the language while writing the Servo layout or browser engine, and the Rust compiler. It has gained increasing use in industry, and Microsoft has been experimenting with the language for secure and safety-critical software components.

paragraphs: Rust has been voted the "most loved programming language" in the Stack Overflow Developer Survey every year since 2016.

paragraphs: The language grew out of a personal project begun in 2006 by Mozilla employee Graydon Hoare, who stated that the project was possibly named after the rust family of fungi. Mozilla began sponsoring the project in 2009 and announced it in 2010. The same year, work shifted from the initial compiler (written in OCaml) to the LLVM-based self-hosting compiler written in Rust. Named , it successfully compiled itself in 2011.

paragraphs: The first numbered pre-alpha release of the Rust compiler occurred in January 2012. Rust 1.0, the first stable release, was released on May 15, 2015. Following 1.0, stable point releases are delivered every six weeks, while features are developed in nightly Rust and then tested with beta releases that last six weeks.

paragraphs: Along with conventional static typing, before version 0.4, Rust also supported typestates. The typestate system modeled assertions before and after program statements, through use of a special codice_1 statement. Discrepancies could be discovered at compile time, rather than when a program was running, as might be the case with assertions in C or C++ code. The typestate concept was not unique to Rust, as it was first introduced in the language NIL. Typestates were removed because in practice they were little used, though the same function can still be achieved with a "branding pattern".

paragraphs: The style of the object system changed considerably within versions 0.2, 0.3 and 0.4 of Rust. Version 0.2 introduced classes for the first time, with version 0.3 adding several features, including destructors and polymorphism through the use of interfaces. In Rust 0.4, traits were added as a means to provide inheritance; interfaces were unified with traits and removed as a separate feature. Classes were also removed, replaced by a combination of implementations and structured types.

paragraphs: Starting in Rust 0.9 and ending in Rust 0.11, Rust had two built-in pointer types: codice_2 and codice_3, simplifying the core memory model. It reimplemented those pointer types in the standard library as codice_4 and (the now removed) codice_5.

paragraphs: In January 2014, before the first stable release, Rust 1.0, the editor-in-chief of "Dr Dobb's", Andrew Binstock, commented on Rust's chances to become a competitor to C++ and to the other upcoming languages D, Go, and Nim (then Nimrod). According to Binstock, while Rust was "widely viewed as a remarkably elegant language", adoption slowed because it repeatedly changed between versions.

paragraphs: In August 2020, Mozilla laid off 250 employees worldwide as part of a corporate restructure caused by the long-term impact of the COVID-19 pandemic. The number corresponded to 25% of all its staff. Among these employees were most of the Rust team, while the Servo team was completely disbanded. The event raised concerns about the future of Rust.

paragraphs: In the following week, the Rust Core Team acknowledged the severe impact of the layoffs and announced that plans for a Rust foundation were undergoing. The first goal of the foundation would be taking ownership of all trademarks and domain names, and also take financial responsibility for their costs.

paragraphs: In November 2020, Amazon Web Services announced its commitment to the Rust continuity by hiring some people who had a close relationship with the Rust language development. AWS said to be expanding the use of Rust in the development of its own products.

paragraphs: Here is a simple "Hello, World!" program written in Rust. The codice_6 macro prints the message to standard output.

paragraphs: The concrete syntax of Rust is similar to C and C++, with blocks of code delimited by curly brackets, and control flow keywords such as codice_7, codice_8, codice_9, and codice_10, although the specific syntax for defining functions is more similar to Pascal. Not all C or C++ keywords are implemented, however, and some Rust functions (such as the use of the keyword codice_11 for pattern matching) will be less familiar to those versed in these languages. Despite the superficial resemblance to C and C++, the syntax of Rust in a deeper sense is closer to that of the ML family of languages and the Haskell language. Nearly every part of a function body is an expression, even control flow operators. For example, the ordinary codice_7 expression also takes the place of , an idiom used by ALGOL-60. As in Lisp, a function need not end with a codice_13 expression: in this case if the semicolon is omitted, the last expression in the function creates the return value, as seen in the following recursive implementation of the factorial function:

paragraphs: The following iterative implementation uses the codice_14 operator to create an inclusive range:

paragraphs: Rust is intended to be a language for highly concurrent and highly safe systems, and "programming in the large", that is, creating and maintaining boundaries that preserve large-system integrity. This has led to a feature set with an emphasis on safety, control of memory layout, and concurrency.

paragraphs: Rust is designed to be memory safe, and it does not permit null pointers, dangling pointers, or data races in safe code. Data values can be initialized only through a fixed set of forms, all of which require their inputs to be already initialized. To replicate the function in other languages of pointers being either valid or codice_15, such as in linked list or binary tree data structures, the Rust core library provides an option type, which can be used to test whether a pointer has codice_16 value or codice_17. Rust also introduces added syntax to manage lifetimes, and the compiler reasons about these through its "borrow checker". Unsafe code which can subvert some of these restrictions may be written using the language's codice_18 keyword.

paragraphs: Rust does not use an automated garbage collection system. Instead, memory and other resources are managed through the resource acquisition is initialization (RAII) convention, with optional reference counting. Rust provides deterministic management of resources, with very low overhead. Rust also favors stack allocation of values and does not perform implicit boxing.

paragraphs: There is the concept of references (using the codice_19 symbol), which does not involve run-time reference counting. The safety of using such pointers is verified at compile time by the borrow checker, preventing dangling pointers and other forms of undefined behavior. Additionally, Rust's type system separates shared, immutable pointers of the form codice_20 from unique, mutable pointers of the form codice_21. However, a mutable pointer can be coerced to an immutable pointer, but not vice versa.

paragraphs: Rust has an ownership system where all values have a unique owner, and the scope of the value is the same as the scope of the owner. Values can be passed by immutable reference, using codice_20, by mutable reference, using codice_21, or by value, using codice_24. At all times, there can either be multiple immutable references or one mutable reference (an implicit readers-writer lock). The Rust compiler enforces these rules at compile time and also checks that all references are valid.

paragraphs: The type system supports a mechanism similar to type classes, called "traits", inspired directly by the Haskell language. This is a facility for ad hoc polymorphism, achieved by adding constraints to type variable declarations. Other features from Haskell, such as higher-kinded polymorphism, are not yet supported.

paragraphs: Rust features type inference for variables declared with the keyword codice_25. Such variables do not require a value to be initially assigned to determine their type. A compile-time error results if any branch of code fails to assign a value to the variable. Variables assigned multiple times must be marked with the keyword codice_26.

paragraphs: Functions can be given generic parameters, which usually require the generic type to implement a certain trait or traits. Within such a function, the generic value can only be used through those traits. This means that a generic function can be type-checked as soon as it is defined. This is in contrast to C++ templates, which are fundamentally duck typed and cannot be checked until instantiated with concrete types. C++ concepts address the same issue and are part of C++20, though they still don't allow the C++ compiler to typecheck a template without concrete instantiation.

paragraphs: However, the "implementation" of Rust generics is similar to the typical implementation of C++ templates: a separate copy of the code is generated for each instantiation. This is called monomorphization and contrasts with the type erasure scheme typically used in Java and Haskell. Type erasure is also available in Rust by using the keyword codice_27. The benefit of monomorphization is optimized code for each specific use case; the drawback is increased compile time and size of the resulting binaries.

paragraphs: The object system within Rust is based around implementations, traits and structured types. Implementations fulfill a role similar to that of classes within other languages and are defined with the keyword codice_28. Inheritance and polymorphism are provided by traits; they allow methods to be defined and mixed in to implementations. Structured types are used to define fields. Implementations and traits cannot define fields themselves, and only traits can provide inheritance. Among other benefits, this prevents the diamond problem of multiple inheritance, as in C++. In other words, Rust supports interface inheritance, but replaces implementation inheritance with composition; see composition over inheritance.

paragraphs: Performance of idiomatic Rust is comparable to the performance of idiomatic C++.

paragraphs: Rust was the third-most-loved programming language in the 2015 Stack Overflow annual survey and took first place for 2016–2020.

paragraphs: A web browser and several related components are being written in Rust, including:

paragraphs: Operating systems and OS-level components written in Rust include:


title: TensorFlow

paragraphs: TensorFlow is a free and open-source software library for machine learning. It can be used across a range of tasks but has a particular focus on training and inference of deep neural networks.

paragraphs: Tensorflow is a symbolic math library based on dataflow and differentiable programming. It is used for both research and production at Google.

paragraphs: TensorFlow was developed by the Google Brain team for internal Google use. It was released under the Apache License 2.0 in 2015.

paragraphs: Starting in 2011, Google Brain built DistBelief as a proprietary machine learning system based on deep learning neural networks. Its use grew rapidly across diverse Alphabet companies in both research and commercial applications. Google assigned multiple computer scientists, including Jeff Dean, to simplify and refactor the codebase of DistBelief into a faster, more robust application-grade library, which became TensorFlow. In 2009, the team, led by Geoffrey Hinton, had implemented generalized backpropagation and other improvements which allowed generation of neural networks with substantially higher accuracy, for instance a 25% reduction in errors in speech recognition.

paragraphs: TensorFlow is Google Brain's second-generation system. Version 1.0.0 was released on February 11, 2017. While the reference implementation runs on single devices, TensorFlow can run on multiple CPUs and GPUs (with optional CUDA and SYCL extensions for general-purpose computing on graphics processing units). TensorFlow is available on 64-bit Linux, macOS, Windows, and mobile computing platforms including Android and iOS.

paragraphs: Its flexible architecture allows for the easy deployment of computation across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters of servers to mobile and edge devices.

paragraphs: TensorFlow computations are expressed as stateful dataflow graphs. The name TensorFlow derives from the operations that such neural networks perform on multidimensional data arrays, which are referred to as "tensors". During the Google I/O Conference in June 2016, Jeff Dean stated that 1,500 repositories on GitHub mentioned TensorFlow, of which only 5 were from Google.

paragraphs: In December 2017, developers from Google, Cisco, RedHat, CoreOS, and CaiCloud introduced Kubeflow at a conference. Kubeflow allows operation and deployment of TensorFlow on Kubernetes.

paragraphs: In March 2018, Google announced TensorFlow.js version 1.0 for machine learning in JavaScript.

paragraphs: In Jan 2019, Google announced TensorFlow 2.0. It became officially available in Sep 2019.

paragraphs: In May 2019, Google announced TensorFlow Graphics for deep learning in computer graphics.

paragraphs: In May 2016, Google announced its Tensor processing unit (TPU), an application-specific integrated circuit (ASIC, a hardware chip) built specifically for machine learning and tailored for TensorFlow. A TPU is a programmable AI accelerator designed to provide high throughput of low-precision arithmetic (e.g., 8-bit), and oriented toward using or running models rather than training them. Google announced they had been running TPUs inside their data centers for more than a year, and had found them to deliver an order of magnitude better-optimized performance per watt for machine learning.

paragraphs: In May 2017, Google announced the second-generation, as well as the availability of the TPUs in Google Compute Engine. The second-generation TPUs deliver up to 180 teraflops of performance, and when organized into clusters of 64 TPUs, provide up to 11.5 petaflops.

paragraphs: In May 2018, Google announced the third-generation TPUs delivering up to 420 teraflops of performance and 128 GB high bandwidth memory (HBM). Cloud TPU v3 Pods offer 100+ petaflops of performance and 32 TB HBM.

paragraphs: In February 2018, Google announced that they were making TPUs available in beta on the Google Cloud Platform.

paragraphs: In July 2018, the Edge TPU was announced. Edge TPU is Google's purpose-built ASIC chip designed to run TensorFlow Lite machine learning (ML) models on small client computing devices such as smartphones known as edge computing.

paragraphs: In May 2017, Google announced a software stack specifically for mobile development, TensorFlow Lite. In January 2019, TensorFlow team released a developer preview of the mobile GPU inference engine with OpenGL ES 3.1 Compute Shaders on Android devices and Metal Compute Shaders on iOS devices. In May 2019, Google announced that their TensorFlow Lite Micro (also known as TensorFlow Lite for Microcontrollers) and ARM's uTensor would be merging.

paragraphs: TensorFlow Lite uses FlatBuffers as the data serialization format for network models, eschewing the Protocol Buffers format used by standard TensorFlow models.

paragraphs: In October 2017, Google released the Google Pixel 2 which featured their Pixel Visual Core (PVC), a fully programmable image, vision and AI processor for mobile devices. The PVC supports TensorFlow for machine learning (and Halide for image processing).

paragraphs: Google officially released RankBrain on October 26, 2015, backed by TensorFlow.

paragraphs: Google also released , which is a TensorFlow Jupyter notebook environment that requires no setup to use.

paragraphs: On March 1, 2018, Google released its Machine Learning Crash Course (MLCC). Originally designed to help equip Google employees with practical artificial intelligence and machine learning fundamentals, Google rolled out its free TensorFlow workshops in several cities around the world before finally releasing the course to the public.

paragraphs: As TensorFlow's market share among research papers was declining to the advantage of PyTorch TensorFlow Team announced a release of a new major version of the library in September 2019. TensorFlow 2.0 introduced many changes, the most significant being TensorFlow eager, which changed the automatic differentiation scheme from the static computational graph, to the "Define-by-Run" scheme originally made popular by Chainer and later PyTorch. Other major changes included removal of old libraries, cross-compatibility between trained models on different versions of TensorFlow, and significant improvements to the performance on GPU.

paragraphs: TensorFlow provides stable Python (for version 3.7 across all platforms) and C APIs; and without API backwards compatibility guarantee: C++, Go, Java, JavaScript and Swift (early release). Third-party packages are available for C#, Haskell, Julia, MATLAB, R, Scala, Rust, OCaml, and Crystal.

paragraphs: "New language support should be built on top of the C API. However, [..] not all functionality is available in C yet." Some more functionality is provided by the Python API.

paragraphs: Among the applications for which TensorFlow is the foundation, are automated image-captioning software, such as DeepDream.


title: Laravel

paragraphs: Laravel (stylised as Laгavel) is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern and based on Symfony. Some of the features of Laravel are a modular packaging system with a dedicated dependency manager, different ways for accessing relational databases, utilities that aid in application deployment and maintenance, and its orientation toward syntactic sugar.

paragraphs: The source code of Laravel is hosted on GitHub and licensed under the terms of MIT License.

paragraphs: Taylor Otwell created Laravel as an attempt to provide a more advanced alternative to the CodeIgniter framework, which did not provide certain features such as built-in support for user authentication and authorization. Laravel's first beta release was made available on June 9, 2011, followed by the Laravel 1 release later in the same month. Laravel 1 included built-in support for authentication, localisation, models, views, sessions, routing and other mechanisms, but lacked support for controllers that prevented it from being a true MVC framework.

paragraphs: Laravel 2 was released in September 2011, bringing various improvements from the author and community. Major new features included the support for controllers, which made Laravel 2 a fully MVC-compliant framework, built-in support for the inversion of control (IoC) principle, and a templating system called "Blade". As a downside, support for third-party packages was removed in Laravel 2.

paragraphs: Laravel 3 was released in February 2012 with a set of new features including the command-line interface (CLI) named "Artisan", built-in support for more database management systems, database migrations as a form of version control for database layouts, support for handling events, and a packaging system called "Bundles". An increase of Laravel's userbase and popularity lined up with the release of Laravel 3.

paragraphs: Laravel 4, codenamed "Illuminate", was released in May 2013. It was made as a complete rewrite of the Laravel framework, migrating its layout into a set of separate packages distributed through Composer, which serves as an application-level package manager. Such a layout improved the extensibility of Laravel 4, which was paired with its official regular release schedule spanning six months between minor point releases. Other new features in the Laravel 4 release include database seeding for the initial population of databases, support for message queues, built-in support for sending different types of email, and support for delayed deletion of database records called "soft deletion".

paragraphs: Laravel 5 was released in February 2015 as a result of internal changes that ended up in renumbering the then-future Laravel 4.3 release. New features in the Laravel 5 release include support for scheduling periodically executed tasks through a package called "Scheduler", an abstraction layer called "Flysystem" that allows remote storage to be used in the same way as local file systems, improved handling of package assets through "Elixir", and simplified externally handled authentication through the optional "Socialite" package. Laravel 5 also introduced a new internal directory tree structure for developed applications.

paragraphs: Laravel 5.1, released in June 2015, was the first release of Laravel to receive long-term support (LTS). New LTS versions were planned for one every two years.

paragraphs: Laravel 5.3 was released on August 23, 2016. The new features in 5.3 are focused on improving developer speed by adding additional out of the box improvements for common tasks.

paragraphs: Laravel 5.4 was released on January 24, 2017, with many new features like Laravel Dusk, Laravel Mix, Blade Components and Slots, Markdown Emails, Automatic Facades, Route Improvements, Higher Order Messaging for Collections, and many others.

paragraphs: Laravel 6 was released on September 3, 2019, shift blueprint code generation, introducing semantic versioning, compatibility with Laravel Vapor, improved authorization responses, improved job middleware, lazy collections, and sub-query improvements. The frontend scaffolding was removed from the main package and moved into the laravel/ui package.

paragraphs: Laravel 7 was released on March 3, 2020, with new features like Laravel Sanctum, Custom Eloquent Casts, Blade Component Tags, Fluent String Operations and Route Model Binding Improvements.

paragraphs: The latest Laravel version is version 8, which was released on September 8, 2020, with new features like Laravel Jetstream, model factory classes, migration squashing, Tailwind CSS for pagination views and other usability improvements.

paragraphs: Versions designated LTS are supported with bug fixes for 2 years and security fixes for 3 years. Other releases are supported with bug fixes for 6 months and security fixes for 1 year.

paragraphs: The following features serve as Laravel's key design points (where not specifically noted, descriptions refer to the features of Laravel 3):

paragraphs: Ready-to-use packages provided by Laravel through Composer and Packagist include the following:

paragraphs: Laravel's command-line interface (CLI), called "Artisan", was initially introduced in Laravel 3 with a limited set of capabilities. Laravel's later migration to a Composer-based architecture allowed Artisan to incorporate different components from the Symfony framework, resulting in the availability of additional Artisan features in Laravel 4.

paragraphs: The features of Artisan are mapped to different subcommands of the command-line utility, providing functionality that aids in managing and building Laravel-based applications. Common uses of Artisan include managing database migrations and seeding, publishing package assets, and generating boilerplate code for new controllers and migrations; the latter frees the developer from creating proper code skeletons. The functionality and capabilities of Artisan can also be expanded by implementing new custom commands, which, for example, may be used to automate application-specific recurring tasks.

paragraphs: "Laracon" is the official Laravel conference centered around the Laravel framework, covering its development, uses, and related general software development topics. Laracon has taken place in the United States, Europe and online in the past. Typically, the conference happens in the United States and Europe every year. 2017 was the first year a Laracon was held as an online event only. 2018 was the first year a Laracon was held in Australia. Each year the conference has a different variety of sponsors and organizers, but Laravel, Laravel News and UserScape are usually the primary organizers.

paragraphs: While the numerous Laracon conferences are officially run, a number of other conferences are run under the name of Laravel Live. Currently there are yearly held Laravel Live UK and Laravel Live India conferences. While these are not officially run, they have the permission of Taylor Otwell to use the name Laravel.


title: Vue.js

paragraphs: Vue.js (commonly referred to as Vue; pronounced , like "view") is an open-source model–view–viewmodel front end JavaScript framework for building user interfaces and single-page applications. It was created by Evan You, and is maintained by him and the rest of the active core team members.

paragraphs: Vue.js features an incrementally adaptable architecture that focuses on declarative rendering and component composition. The core library is focused on the view layer only. Advanced features required for complex applications such as routing, state management and build tooling are offered via officially maintained supporting libraries and packages, with Nuxt.js as one of the most popular solutions

paragraphs: Vue.js lets you extend HTML with HTML attributes called directives. The directives offer functionality to HTML applications, and come as either built-in or user defined directives.

paragraphs: Vue was created by Evan You after working for Google using AngularJS in a number of projects. He later summed up his thought process: "I figured, what if I could just extract the part that I really liked about Angular and build something really lightweight." The first source code commit to the project was dated July 2013, and Vue was first released the following February, in 2014.

paragraphs: Vue components extend basic HTML elements to encapsulate reusable code. At a high level, components are custom elements to which the Vue’s compiler attaches behavior. In Vue, a component is essentially a Vue instance with pre-defined options.

paragraphs: The code snippet below contains an example of a Vue component. The component presents a button and prints the number of times the button is clicked:

paragraphs: Vue uses an HTML-based template syntax that allows binding the rendered DOM to the underlying Vue instance's data. All Vue templates are valid HTML that can be parsed by specification-compliant browsers and HTML parsers. Vue compiles the templates into virtual DOM render functions. A virtual Document Object Model (or “DOM”) allows Vue to render components in its memory before updating the browser. Combined with the reactivity system, Vue is able to calculate the minimal number of components to re-render and apply the minimal amount of DOM manipulations when the app state changes.

paragraphs: Vue users can use template syntax or choose to directly write render functions using JSX. Render functions allow application to be built from software components.

paragraphs: Vue features a reactivity system that uses plain JavaScript objects and optimized re-rendering. Each component keeps track of its reactive dependencies during its render, so the system knows precisely when to re-render, and which components to re-render.

paragraphs: Vue provides a variety of ways to apply transition effects when items are inserted, updated, or removed from the DOM. This includes tools to:

paragraphs: When an element wrapped in a transition component is inserted or removed, this is what happens:

paragraphs: A traditional disadvantage of single-page applications (SPAs) is the inability to share links to the exact "sub" page within a specific web page. Because SPAs serve their users only one URL-based response from the server (it typically serves index.html or index.vue), bookmarking certain screens or sharing links to specific sections is normally difficult if not impossible. To solve this problem, many client-side routers delimit their dynamic URLs with a "hashbang" (#!), e.g. "page.com/#!/". However, with HTML5 most modern browsers support routing without hashbangs.

paragraphs: Vue provides an interface to change what is displayed on the page based on the current URL path – regardless of how it was changed (whether by emailed link, refresh, or in-page links). Additionally, using a front-end router allows for the intentional transition of the browser path when certain browser events (i.e. clicks) occur on buttons or links. Vue itself doesn’t come with front-end hashed routing. But the open source "vue-router" package provides an API to update the application's URL, supports the back button (navigating history), and email password resets or email verification links with authentication URL parameters. It supports mapping nested routes to nested components and offers fine-grained transition control. With Vue, developers are already composing applications with small building blocks building larger components. With vue-router added to the mix, components must merely be mapped to the routes they belong to, and parent/root routes must indicate where children should render.

paragraphs: The core library comes with tools and libraries both developed by the core team and contributors.


title: NumPy

paragraphs: NumPy (pronounced () or sometimes ()) is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. The ancestor of NumPy, Numeric, was originally created by Jim Hugunin with contributions from several other developers. In 2005, Travis Oliphant created NumPy by incorporating features of the competing Numarray into Numeric, with extensive modifications. NumPy is open-source software and has many contributors.

paragraphs: The Python programming language was not originally designed for numerical computing, but attracted the attention of the scientific and engineering community early on. In 1995 the special interest group (SIG) "matrix-sig" was founded with the aim of defining an array computing package; among its members was Python designer and maintainer Guido van Rossum, who extended Python's syntax (in particular the indexing syntax) to make array computing easier.

paragraphs: An implementation of a matrix package was completed by Jim Fulton, then generalized by Jim Hugunin and called "Numeric" (also variously known as the "Numerical Python extensions" or "NumPy").

paragraphs: Hugunin, a graduate student at the Massachusetts Institute of Technology (MIT), joined the Corporation for National Research Initiatives (CNRI) in 1997 to work on JPython, leaving Paul Dubois of Lawrence Livermore National Laboratory (LLNL) to take over as maintainer. Other early contributors include David Ascher, Konrad Hinsen and Travis Oliphant.

paragraphs: A new package called "Numarray" was written as a more flexible replacement for Numeric. Like Numeric, it too is now deprecated. Numarray had faster operations for large arrays, but was slower than Numeric on small ones, so for a time both packages were used in parallel for different use cases. The last version of Numeric (v24.2) was released on 11 November 2005, while the last version of numarray (v1.5.2) was released on 24 August 2006.

paragraphs: There was a desire to get Numeric into the Python standard library, but Guido van Rossum decided that the code was not maintainable in its state then.

paragraphs: In early 2005, NumPy developer Travis Oliphant wanted to unify the community around a single array package and ported Numarray's features to Numeric, releasing the result as NumPy 1.0 in 2006. This new project was part of SciPy. To avoid installing the large SciPy package just to get an array object, this new package was separated and called NumPy. Support for Python 3 was added in 2011 with NumPy version 1.5.0.

paragraphs: In 2011, PyPy started development on an implementation of the NumPy API for PyPy. It is not yet fully compatible with NumPy.

paragraphs: NumPy targets the CPython reference implementation of Python, which is a non-optimizing bytecode interpreter. Mathematical algorithms written for this version of Python often run much slower than compiled equivalents. NumPy addresses the slowness problem partly by providing multidimensional arrays and functions and operators that operate efficiently on arrays, requiring rewriting some code, mostly inner loops, using NumPy.

paragraphs: Using NumPy in Python gives functionality comparable to MATLAB since they are both interpreted, and they both allow the user to write fast programs as long as most operations work on arrays or matrices instead of scalars. In comparison, MATLAB boasts a large number of additional toolboxes, notably Simulink, whereas NumPy is intrinsically integrated with Python, a more modern and complete programming language. Moreover, complementary Python packages are available; SciPy is a library that adds more MATLAB-like functionality and Matplotlib is a plotting package that provides MATLAB-like plotting functionality. Internally, both MATLAB and NumPy rely on BLAS and LAPACK for efficient linear algebra computations.

paragraphs: Python bindings of the widely used computer vision library OpenCV utilize NumPy arrays to store and operate on data.

paragraphs: Since images with multiple channels are simply represented as three-dimensional arrays, indexing, or masking with other arrays are very efficient ways to access specific pixels of an image.

paragraphs: The NumPy array as universal data structure in OpenCV for images, extracted feature points, filter kernels and many more vastly simplifies the programming workflow and debugging.

paragraphs: The core functionality of NumPy is its "ndarray", for "n"-dimensional array, data structure. These arrays are strided views on memory. In contrast to Python's built-in list data structure, these arrays are homogeneously typed: all elements of a single array must be of the same type.

paragraphs: Such arrays can also be views into memory buffers allocated by C/C++, Cython, and Fortran extensions to the CPython interpreter without the need to copy data around, giving a degree of compatibility with existing numerical libraries. This functionality is exploited by the SciPy package, which wraps a number of such libraries (notably BLAS and LAPACK). NumPy has built-in support for memory-mapped ndarrays.

paragraphs: Inserting or appending entries to an array is not as trivially possible as it is with Python's lists.

paragraphs: The np.pad(...) routine to extend arrays actually creates new arrays of the desired shape and padding values, copies the given array into the new one and returns it.

paragraphs: NumPy's np.concatenate([a1,a2]) operation does not actually link the two arrays but returns a new one, filled with the entries from both given arrays in sequence.

paragraphs: Reshaping the dimensionality of an array with np.reshape(...) is only possible as long as the number of elements in the array does not change.

paragraphs: These circumstances originate from the fact that NumPy's arrays must be views on contiguous memory buffers. A replacement package called Blaze attempts to overcome this limitation.

paragraphs: Algorithms that are not expressible as a vectorized operation will typically run slowly because they must be implemented in "pure Python", while vectorization may increase memory complexity of some operations from constant to linear, because temporary arrays must be created that are as large as the inputs. Runtime compilation of numerical code has been implemented by several groups to avoid these problems; open source solutions that interoperate with NumPy include codice_1, numexpr and Numba. Cython and Pythran are static-compiling alternatives to these.

paragraphs: Many modern large-scale scientific computing applications have requirements that exceed the capabilities of the NumPy arrays.

paragraphs: For example, NumPy arrays are usually loaded into a computer's memory, which might have insufficient capacity for the analysis of large datasets.

paragraphs: Further, NumPy operations are executed on a single computer's CPU.

paragraphs: However, many linear algebra operations can be accelerated by executing them on clusters of CPUs or of specialized hardware, such as GPUs and TPUs, which many deep learning applications rely on.

paragraphs: As a result, several alternative array implementations have arisen in the scientific python ecosystem over the resent years, such as Dask for distributed arrays and TensorFlow or JAX for computations on GPUs.

paragraphs: Because of its popularity, these often implement a subset of Numpy's API or mimic it, so that users can change their array implementation with minimal changes to their code required.

paragraphs: »> b = np.linspace(0, 2, 4) # create an array with four equally spaced points starting with 0 and ending with 2.

paragraphs: »> solve(a, b) # solve the equation ax = b

paragraphs: »> c = rand(3, 3) * 20 # create a 3x3 random matrix of values within [0,1] scaled by 20

paragraphs: »> a @ c # Starting with Python 3.5 and NumPy 1.10

paragraphs: »> r = np.reshape(np.arange(256*256)%256,(256,256)) # 256x256 pixel array with a horizontal gradient from 0 to 255 for the red color channel

paragraphs: »> g = np.zeros_like(r) # array of same size and type as r but filled with 0s for the green color channel

paragraphs: »> b = r.T # transposed r will give a vertical gradient for the blue color channel

paragraphs: »> cv2.imwrite('gradients.png', np.dstack([b,g,r])) # OpenCV images are interpreted as BGR, the depth-stacked array will be written to an 8bit RGB PNG-file called 'gradients.png'

paragraphs: »> for idx, point in enumerate(points): # iterate over all points

paragraphs: »> print('Nearest point to q: {0}'.format(points[minIdx]))

paragraphs: »> # # # Equivalent NumPy vectorization # # #

paragraphs: »> minIdx = np.argmin(np.linalg.norm(points-qPoint,axis=1)) # compute all euclidean distances at once and return the index of the smallest one


title: Pandas (software)

paragraphs: In computer programming, pandas is a software library written for the Python programming language for data manipulation and analysis. In particular, it offers data structures and operations for manipulating numerical tables and time series. It is free software released under the three-clause BSD license. The name is derived from the term "panel data", an econometrics term for data sets that include observations over multiple time periods for the same individuals. Its name is a play on the phrase "Python data analysis" itself. Wes McKinney started building what would become pandas at AQR Capital while he was a researcher there from 2007 to 2010.

paragraphs: The library is highly optimized for performance, with critical code paths written in Cython or C.

paragraphs: Pandas is mainly used for data analysis. Pandas allows importing data from various file formats such as comma-separated values, JSON, SQL, Microsoft Excel. Pandas allows various data manipulation operations such as merging, reshaping, selecting, as well as data cleaning, and data wrangling features.

paragraphs: Developer Wes McKinney started working on pandas in 2008 while at AQR Capital Management out of the need for a high performance, flexible tool to perform quantitative analysis on financial data. Before leaving AQR he was able to convince management to allow him to open source the library.

paragraphs: Another AQR employee, Chang She, joined the effort in 2012 as the second major contributor to the library.

paragraphs: In 2015, pandas signed on as a fiscally sponsored project of NumFOCUS, a 501(c)(3) nonprofit charity in the United States.


title: Keras

paragraphs: Keras is an open-source software library that provides a Python interface for artificial neural networks. Keras acts as an interface for the TensorFlow library.

paragraphs: Up until version 2.3 Keras supported multiple backends, including TensorFlow, Microsoft Cognitive Toolkit, R, Theano, and PlaidML. As of version 2.4, only TensorFlow is supported. Designed to enable fast experimentation with deep neural networks, it focuses on being user-friendly, modular, and extensible. It was developed as part of the research effort of project ONEIROS (Open-ended Neuro-Electronic Intelligent Robot Operating System), and its primary author and maintainer is François Chollet, a Google engineer. Chollet also is the author of the XCeption deep neural network model.

paragraphs: Keras contains numerous implementations of commonly used neural-network building blocks such as layers, objectives, activation functions, optimizers, and a host of tools to make working with image and text data easier to simplify the coding necessary for writing deep neural network code. The code is hosted on GitHub, and community support forums include the GitHub issues page, and a Slack channel.

paragraphs: In addition to standard neural networks, Keras has support for convolutional and recurrent neural networks. It supports other common utility layers like dropout, batch normalization, and pooling.

paragraphs: Keras allows users to productize deep models on smartphones (iOS and Android), on the web, or on the Java Virtual Machine. It also allows use of distributed training of deep-learning models on clusters of Graphics processing units (GPU) and tensor processing units (TPU).

paragraphs: Keras claims over 375,000 individual users as of early-2020. Keras was the 10th most cited tool in the KDnuggets 2018 software poll and registered a 22% usage.


title: PyTorch

paragraphs: PyTorch is an open source machine learning library based on the Torch library, used for applications such as computer vision and natural language processing, primarily developed by Facebook's AI Research lab (FAIR). It is free and open-source software released under the Modified BSD license. Although the Python interface is more polished and the primary focus of development, PyTorch also has a C++ interface.

paragraphs: A number of pieces of Deep Learning software are built on top of PyTorch, including Tesla Autopilot, Uber's Pyro, HuggingFace's Transformers, PyTorch Lightning, and Catalyst.

paragraphs: PyTorch provides two high-level features:

paragraphs: Facebook operates both "PyTorch" and "Convolutional Architecture for Fast Feature Embedding" (Caffe2), but models defined by the two frameworks were mutually incompatible. The Open Neural Network Exchange (ONNX) project was created by Facebook and Microsoft in September 2017 for converting models between frameworks. Caffe2 was merged into PyTorch at the end of March 2018.

paragraphs: PyTorch defines a class called Tensor (codice_1) to store and operate on homogeneous multidimensional rectangular arrays of numbers. PyTorch Tensors are similar to NumPy Arrays, but can also be operated on a CUDA-capable Nvidia GPU. PyTorch supports various sub-types of Tensors.

paragraphs: PyTorch uses a method called automatic differentiation. A recorder records what operations have performed, and then it replays it backward to compute the gradients. This method is especially powerful when building neural networks to save time on one epoch by calculating differentiation of the parameters at the forward pass.

paragraphs: codice_3 is a module that implements various optimization algorithms used for building neural networks. Most of the commonly used methods are already supported, so there is no need to build them from scratch.

paragraphs: PyTorch autograd makes it easy to define computational graphs and take gradients, but raw autograd can be a bit too low-level for defining complex neural networks. This is where the codice_4 module can help.


title: Matplotlib

paragraphs: Matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like Tkinter, wxPython, Qt, or GTK+. There is also a procedural "pylab" interface based on a state machine (like OpenGL), designed to closely resemble that of MATLAB, though its use is discouraged. SciPy makes use of Matplotlib.

paragraphs: Matplotlib was originally written by John D. Hunter, since then it has an active development community, and is distributed under a BSD-style license. Michael Droettboom was nominated as matplotlib's lead developer shortly before John Hunter's death in August 2012, and further joined by Thomas Caswell.

paragraphs: Matplotlib 2.0.x supports Python versions 2.7 through 3.6. Python 3 support started with Matplotlib 1.2. Matplotlib 1.4 is the last version to support Python 2.6. Matplotlib has pledged not to support Python 2 past 2020 by signing the Python 3 Statement.

paragraphs: Pyplot is a Matplotlib module which provides a MATLAB-like interface. Matplotlib is designed to be as usable as MATLAB, with the ability to use Python, and the advantage of being free and open-source.

paragraphs: Several toolkits are available which extend Matplotlib functionality. Some are separate downloads, others ship with the Matplotlib source code but have external dependencies.


title: SciPy

paragraphs: SciPy (pronounced /ˈsaɪpaɪ'/ "Sigh Pie") is a free and open-source Python library used for scientific computing and technical computing.

paragraphs: SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing, ODE solvers and other tasks common in science and engineering.

paragraphs: SciPy builds on the NumPy array object and is part of the NumPy stack which includes tools like Matplotlib, pandas and SymPy, and an expanding set of scientific computing libraries. This NumPy stack has similar users to other applications such as MATLAB, GNU Octave, and Scilab. The NumPy stack is also sometimes referred to as the SciPy stack.

paragraphs: SciPy is also a family of conferences for users and developers of these tools: SciPy (in the United States), EuroSciPy (in Europe) and SciPy.in (in India). Enthought originated the SciPy conference in the United States and continues to sponsor many of the international conferences as well as host the SciPy website.

paragraphs: The SciPy library is currently distributed under the BSD license, and its development is sponsored and supported by an open community of developers. It is also supported by NumFOCUS, a community foundation for supporting reproducible and accessible science.

paragraphs: The SciPy package of key algorithms and functions core to Python's scientific computing capabilities. Available sub-packages include:

paragraphs: The basic data structure used by SciPy is a multidimensional array provided by the NumPy module. NumPy provides some functions for linear algebra, Fourier transforms, and random number generation, but not with the generality of the equivalent functions in SciPy. NumPy can also be used as an efficient multidimensional container of data with arbitrary datatypes. This allows NumPy to seamlessly and speedily integrate with a wide variety of databases. Older versions of SciPy used Numeric as an array type, which is now deprecated in favor of the newer NumPy array code.

paragraphs: In the 1990s, Python was extended to include an array type for numerical computing called Numeric (This package was eventually replaced by Travis Oliphant who wrote NumPy in 2006 as a blending of Numeric and Numarray which had been started in 2001). As of 2000, there was a growing number of extension modules and increasing interest in creating a complete environment for scientific and technical computing. In 2001, Travis Oliphant, Eric Jones, and Pearu Peterson merged code they had written and called the resulting package SciPy. The newly created package provided a standard collection of common numerical operations on top of the Numeric array data structure. Shortly thereafter, Fernando Pérez released IPython, an enhanced interactive shell widely used in the technical computing community, and John Hunter released the first version of Matplotlib, the 2D plotting library for technical computing. Since then the SciPy environment has continued to grow with more packages and tools for technical computing.


title: Scikit-learn

paragraphs: Scikit-learn (formerly scikits.learn and also known as sklearn) is a free software machine learning library for the Python programming language.

paragraphs: It features various classification, regression and clustering algorithms including support vector machines, random forests, gradient boosting, "k"-means and DBSCAN, and is designed to interoperate with the Python numerical and scientific libraries NumPy and SciPy.

paragraphs: The scikit-learn project started as scikits.learn, a Google Summer of Code project by David Cournapeau. Its name stems from the notion that it is a "SciKit" (SciPy Toolkit), a separately-developed and distributed third-party extension to SciPy.

paragraphs: The original codebase was later rewritten by other developers. In 2010 Fabian Pedregosa, Gael Varoquaux, Alexandre Gramfort and Vincent Michel, all from the French Institute for Research in Computer Science and Automation in Rocquencourt, France, took leadership of the project and made the first public release on February the 1st 2010. Of the various scikits, scikit-learn as well as scikit-image were described as "well-maintained and popular" . Scikit-learn is one of the most popular machine learning libraries on GitHub.

paragraphs: Scikit-learn is largely written in Python, and uses numpy extensively for high-performance linear algebra and array operations. Furthermore, some core algorithms are written in Cython to improve performance. Support vector machines are implemented by a Cython wrapper around LIBSVM; logistic regression and linear support vector machines by a similar wrapper around LIBLINEAR. In such cases, extending these methods with Python may not be possible.

paragraphs: Scikit-learn integrates well with many other Python libraries, such as matplotlib and plotly for plotting, numpy for array vectorization, pandas dataframes, scipy, and many more.

paragraphs: Scikit-learn was initially developed by David Cournapeau as a Google summer of code project in 2007. Later Matthieu Brucher joined the project and started to use it as a part of his thesis work. In 2010 INRIA, the French Institute for Research in Computer Science and Automation, got involved and the first public release (v0.1 beta) was published in late January 2010.

paragraphs: The timeline of there releases is depicted in the following chart.


title: Natural Language Toolkit

paragraphs: The Natural Language Toolkit, or more commonly NLTK, is a suite of libraries and programs for symbolic and statistical natural language processing (NLP) for English written in the Python programming language. It was developed by Steven Bird and Edward Loper in the Department of Computer and Information Science at the University of Pennsylvania. NLTK includes graphical demonstrations and sample data. It is accompanied by a book that explains the underlying concepts behind the language processing tasks supported by the toolkit, plus a cookbook.

paragraphs: NLTK is intended to support research and teaching in NLP or closely related areas, including empirical linguistics, cognitive science, artificial intelligence, information retrieval, and machine learning.

paragraphs: NLTK has been used successfully as a teaching tool, as an individual study tool, and as a platform for prototyping and building research systems. There are 32 universities in the US and 25 countries using NLTK in their courses. NLTK supports classification, tokenization, stemming, tagging, parsing, and semantic reasoning functionalities.