SlideShare a Scribd company logo
1 of 44
Download to read offline
Bibliotech - smart cafe; strikead club. 
Programming Languages: 
Some news for the last N 
years. 
Ruslan Shevchenko 
<ruslan@shevchenko.kiev.ua> 
@rssh1 
https://github.com/rssh
Programming languages: 
❖ Industry/Academic 
❖ what’s hot now: 
❖ academic research from 70-th 
❖ ‘freaky’ things from 2000 
Where is progress ? 
What we will see in industry from today-s academic ? 
from today-s freaks ?
Statement from 80-th: 
Full change of language and tools during 2-3 years 
Actual situation in 2014: 
Top 11 languages are the same: 2010 - 2014 
http://dou.ua
Can we track progress in PL ? 
❖ Estimations 
❖ Code size / project duration
Evolution is slow
If we think about ideal language ?
Make all good 
What is: 
❖ all ? 
❖ good ? 
❖ make ? 
• Object and processes from real world, 
represented in computer 
• Operations with this representation. 
• Mapping of result back to real world
Syntax [parsing/ast manipulation] 
Semantics [type systems] 
“New” functionality
Syntax 
Traditional approach: context free grammars 
Syntax structure is fixed 
Now in practice: 
Context-dependent keywords (C++ ) 
Multi-language programming
Extensible syntax 
Seed 7: Syntax definitions of operations with priority 
syntax expr: .(). + .() is -> 7; 
syntax expr: .loop.().until.().do.().end.loop is -> 25; 
Nemerle: macroses 
macro for (init, cond, change, body) 
syntax ("for", "(", init, ";", cond, ";", change, ")", body) 
XL Compiler plugins
Extensible syntax 
// Idris 
boolCase : (x:Bool) -> Lazy a -> Lazy a -> a; 
boolCase True t e = t; 
boolCase False t e = e; 
syntax "if" [test] "then" [t] "else" [e] = boolCase test t e; 
syntax "for" {x} "in" [xs] ":" [body] = forLoop xs (x => body) 
// introducing new binding 
// DSL — map object to Idrix language constructions
XL: Concept programming 
Active library = Library + compiler plugin 
Concept in real life. In computer - representation 
Metrics: 
Syntax noise / signal 
Bandwidth 
what part of code is about business 
what part of concept is represented 
Complexity source
Articulate programming 
Avail: SmallTalk-based, static typing 
Try to deduce ‘needed’ value from context. 
like scala implicit, but *all* is implicit
Syntax 
Multi-language programming 
❖ Do nothing (mess) 
❖ Embed all in one language [lifted evaluation] 
❖ (like LINQ or scala slick or idris DSL) 
❖ Define and use ‘part of grammar’ with type.
Wyvern: https://www.cs.cmu.edu/~aldrich/wyvern/ 
//Type-specific tokens 
let imageBase : URL = <images.example.com> 
let bgImage : URL = <%imageBase%/background.png> 
new : SearchServer 
def resultsFor(searchQuery, page) 
serve(~) (* serve : HTML -> Unit *) 
>html 
>head 
>title Search Results 
>style ~ 
body { background-image: url(%bgImage%) } 
#search { background-color: ..
Wyvern: https://www.cs.cmu.edu/~aldrich/wyvern/ 
//Type-specific tokens 
let imageBase : URL = <images.example.com> 
let bgImage : URL = <%imageBase%/background.png> 
new : SearchServer 
def resultsFor(searchQuery, page) 
serve(~) (* serve : HTML -> Unit *) 
>html 
>head 
>title Search Results 
>style ~ 
body { background-image: url(%bgImage%) } 
#search { background-color: ..
Wyvern: https://www.cs.cmu.edu/~aldrich/wyvern/ 
//Type-specific tokens 
let imageBase : URL = <images.example.com> 
let bgImage : URL = <%imageBase%/background.png> 
new : SearchServer 
def resultsFor(searchQuery, page) 
serve(~) (* serve : HTML -> Unit *) 
>html 
>head 
>title Search Results 
>style ~ 
body { background-image: url(%bgImage%) } 
#search { background-color: ..
Type Systems 
Static/Dynamic —-> Gradual 
Dynamic: 
❖ clojure -> core.typed 
❖ python -> type annotations 
❖ groovy -> type annotations 
Static: 
❖ Dynamic type 
fromDynamic[T]: D => Option[T] 
toDynamic[T](x: T) => Dynamic 
needed for reflective typing
Clojure: core/typed. 
(ann clojure.core/first 
(All [x] 
(Fn [(Option (EmptySeqable x)) -> nil] 
[(NonEmptySeqable x) -> x] 
[(Option (Seqable x)) -> (Option x)])) 
) 
- static empty -> nil 
- static non-empty -> not-nil 
- unknown -> x or nil,
Type Systems 
typing => static analysis at compile-time 
compilation => optimization of interpretation
Type Systems
Type Systems 
Dependent types
Non-dependent types example 
trait CInt { type Succ <: CInt } 
trait CPos extends CInt 
trait CSucc[P <: CPos] extends CInt { 
type Succ = CSucc[CSucc[Int]] 
} 
final class _0 extends CPos { 
type Succ = CSucc[0] 
} 
type _1 = _0#Succ 
type _2 = _1#Succ 
// church numeration
Non-dependent types example 
trait LimitedVector[+A, N<:CInt] 
{ 
………… 
def append[B <: A, NX <:CInt](x: LimitedVector[B,NX]): 
LimitedVector[B,Plus[N,NX]] 
………….. 
} 
// shapeless full of such tricks
Dependent types example 
trait LimitedVector[+A, n:Int] 
{ 
………… 
def append[B <: A, nx:Int](x: LimitedVector[B,nx]): 
LimitedVector[B, n+nx] 
……………. 
} 
// warning: pseudocode, impossible in scala
Dependent types example 
data Vect : Nat -> Type -> Type 
where 
Nil : Vect 0 a 
(::) : a -> Vect k a -> Vect (k+1) a 
// Idris 
Calculus of constructions: Idris, Coq, Agda
Dependent types: 
Track properties, which can be proven by structural induction 
Function, which call SQL inside no more than 3 times. 
Resource with balanced acquire/release for all execution paths. 
Type depends from value <=> Type must be available as value 
data Parity : Nat -> Type where 
even : Parity (n + n) 
odd : Parity (S (n + n))
Dependent types: 
intuitionistic logic 
absence (p || ~p) 
Type:Type - logical bomb
// note: it is possible to make efficient type-level numbers in scala 
Details: Stefan Zeiger. Type-Level Computations in Scala 
❖ slides 
❖ http://slick.typesafe.com/talks/scalaio2014/Type-Level_Computations.pdf 
❖ code: 
❖ https://github.com/szeiger/ErasedTypes 
❖ idea: 
❖ define type-alias with argument for operation. 
❖ perform term-level computation and ‘unsafe cast’ to this alias. 
abstract class CNat 
{ 
type Succ 
type + [T <: CNat] 
def value: Int 
…………….. 
def +[T <: CNat](x:n): +[T] = CPos(value+x.value).asInstanceOf[+T] 
}
Effects tracking: 
No more IO monads !!!! 
List of effects as part of type. 
• Idris 
• Eff
Effects: 
- calculated as extension to ‘normal’ type. (as type-index or yet another 
dimension) 
• possible traces of operations 
• set of operations. 
• set of resources 
• set of exceptions 
• atomicity 
• delimited specs 
• …. 
type channel = effect 
operation read : unit -> string 
operation write : string -> unit 
end 
// Eff 
//Handler - effects interpreter 
let accumulate = handler 
| std#write x k -> let (v, xs) = k () in (v, x :: xs) 
| val v -> (v, [])
Knowledge-based programming 
Let’s add structured information about problem domain. 
Wolfram Alpha: 
Mathematics domain. Near 5000 built-in functions. 
Household lexicon: approx 4000 
Differ from community repository: all interfaces are consistent
Wolfram: 
Tweet-a-program
Wolfram: 
Tweet-a-program
Make all good 
- Syntax, defined in problem-domain specific library 
- Vocabulary simular to one in natural language 
- Advanced type theory with refinement specs.
Implementation
Implementation 
Compilation/Interpretation [both - hard] 
VM/System 
JVM no continuations (?) 
LLVM non-trivial gc (?) 
Complexity. 
both - impossible without divergence 
Let’s rewrite all with callbacks, because it’s more easy than fix JVM/OS
CORBA story: 
Let’s do remote and local call undistinguished (1996) 
Local calls: fast 
Remote calls: slow 
Common antipattern: build fine-grained object model in RPC 
Akka: 
Let’s do remote and local call undistinguished (2014) 
// hope, now things will move forward more accurate
So, we must 
choose one level of abstraction 
or 
build family of systems 
otherwise — abstraction leaks
Ok, assume we build ideal language. (in academia or as freaks) 
When it will be in industry ? 
❖ Success in sense of adoption => evolution slowdown 
Haskell: 
❖ avoid success of all costs => be open for evolution, 
live in a water 
Scala: from research to engineering 
(LMS, attempt to remove skolem types, … etc )
Sociology of programming languages 
Leo Meyerovich 
Average ‘incubation’ period before wider adoption: 12 years 
before - specialized in some niche 
Adoption => social, marketing ….., not technical.
What will be in industry tomorrow: landscape now. 
General purpose: need some time for current adoption 
JVM land: scala, clojure 
Trends: integrating other paradigms 
System: D / Rust instead C++ (?) 
Application/ Scripting: [ place is vacant ] 
// JavaScript successor [?]
What will be not in industry tomorrow: 
academic/OSS 
Better VM-s 
New paradigms 
Depends from you 
// niche as social issue
Thanks. 
ruslan@shevchenko.kiev.ua 
https://github.com/rssh 
@rssh1 
If you build something interesting - ping me.

More Related Content

What's hot

Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to ScalaSaleem Ansari
 
Aggregate Programming in Scala
Aggregate Programming in ScalaAggregate Programming in Scala
Aggregate Programming in ScalaRoberto Casadei
 
Reactive Programming in the Browser feat. Scala.js and PureScript
Reactive Programming in the Browser feat. Scala.js and PureScriptReactive Programming in the Browser feat. Scala.js and PureScript
Reactive Programming in the Browser feat. Scala.js and PureScriptLuka Jacobowitz
 
A Field Guide to DSL Design in Scala
A Field Guide to DSL Design in ScalaA Field Guide to DSL Design in Scala
A Field Guide to DSL Design in ScalaTomer Gabel
 
Oscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simpleOscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simpleMartin Odersky
 
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)Brendan Eich
 
Value objects in JS - an ES7 work in progress
Value objects in JS - an ES7 work in progressValue objects in JS - an ES7 work in progress
Value objects in JS - an ES7 work in progressBrendan Eich
 
The Evolution of Scala
The Evolution of ScalaThe Evolution of Scala
The Evolution of ScalaMartin Odersky
 

What's hot (9)

Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Aggregate Programming in Scala
Aggregate Programming in ScalaAggregate Programming in Scala
Aggregate Programming in Scala
 
Reactive Programming in the Browser feat. Scala.js and PureScript
Reactive Programming in the Browser feat. Scala.js and PureScriptReactive Programming in the Browser feat. Scala.js and PureScript
Reactive Programming in the Browser feat. Scala.js and PureScript
 
A Field Guide to DSL Design in Scala
A Field Guide to DSL Design in ScalaA Field Guide to DSL Design in Scala
A Field Guide to DSL Design in Scala
 
Web futures
Web futuresWeb futures
Web futures
 
Oscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simpleOscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simple
 
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
 
Value objects in JS - an ES7 work in progress
Value objects in JS - an ES7 work in progressValue objects in JS - an ES7 work in progress
Value objects in JS - an ES7 work in progress
 
The Evolution of Scala
The Evolution of ScalaThe Evolution of Scala
The Evolution of Scala
 

Similar to Programming Languages: some news for the last N years

F# for functional enthusiasts
F# for functional enthusiastsF# for functional enthusiasts
F# for functional enthusiastsJack Fox
 
TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesEelco Visser
 
The openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query LanguageThe openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query LanguageNeo4j
 
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...InfluxData
 
iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)Netcetera
 
PRINCE PRESENTATION(1).pptx
PRINCE PRESENTATION(1).pptxPRINCE PRESENTATION(1).pptx
PRINCE PRESENTATION(1).pptxSajalKesharwani2
 
Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...Andreas Dewes
 
Introduction to clojure
Introduction to clojureIntroduction to clojure
Introduction to clojureAbbas Raza
 
Building DSLs On CLR and DLR (Microsoft.NET)
Building DSLs On CLR and DLR (Microsoft.NET)Building DSLs On CLR and DLR (Microsoft.NET)
Building DSLs On CLR and DLR (Microsoft.NET)Vitaly Baum
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#Talbott Crowell
 
Software Architecture: Principles, Patterns and Practices
Software Architecture: Principles, Patterns and PracticesSoftware Architecture: Principles, Patterns and Practices
Software Architecture: Principles, Patterns and PracticesGanesh Samarthyam
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
 
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Chris Adamson
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMManuel Bernhardt
 
Kyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfFlavio W. Brasil
 

Similar to Programming Languages: some news for the last N years (20)

Return of c++
Return of c++Return of c++
Return of c++
 
F# for functional enthusiasts
F# for functional enthusiastsF# for functional enthusiasts
F# for functional enthusiasts
 
TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific Languages
 
The openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query LanguageThe openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query Language
 
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
 
iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 
PRINCE PRESENTATION(1).pptx
PRINCE PRESENTATION(1).pptxPRINCE PRESENTATION(1).pptx
PRINCE PRESENTATION(1).pptx
 
Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...
 
Introduction to clojure
Introduction to clojureIntroduction to clojure
Introduction to clojure
 
Effective Object Oriented Design in Cpp
Effective Object Oriented Design in CppEffective Object Oriented Design in Cpp
Effective Object Oriented Design in Cpp
 
N flavors of streaming
N flavors of streamingN flavors of streaming
N flavors of streaming
 
Building DSLs On CLR and DLR (Microsoft.NET)
Building DSLs On CLR and DLR (Microsoft.NET)Building DSLs On CLR and DLR (Microsoft.NET)
Building DSLs On CLR and DLR (Microsoft.NET)
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#
 
Software Architecture: Principles, Patterns and Practices
Software Architecture: Principles, Patterns and PracticesSoftware Architecture: Principles, Patterns and Practices
Software Architecture: Principles, Patterns and Practices
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
 
Oops lecture 1
Oops lecture 1Oops lecture 1
Oops lecture 1
 
Kyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdf
 

More from Ruslan Shevchenko

Embedding Generic Monadic Transformer into Scala. [Tfp2022]
Embedding Generic Monadic Transformer into Scala. [Tfp2022]Embedding Generic Monadic Transformer into Scala. [Tfp2022]
Embedding Generic Monadic Transformer into Scala. [Tfp2022]Ruslan Shevchenko
 
Papers We Love / Kyiv : PAXOS (and little about other consensuses )
Papers We Love / Kyiv :  PAXOS (and little about other consensuses )Papers We Love / Kyiv :  PAXOS (and little about other consensuses )
Papers We Love / Kyiv : PAXOS (and little about other consensuses )Ruslan Shevchenko
 
Scala / Technology evolution
Scala  / Technology evolutionScala  / Technology evolution
Scala / Technology evolutionRuslan Shevchenko
 
{co/contr} variance from LSP
{co/contr} variance  from LSP{co/contr} variance  from LSP
{co/contr} variance from LSPRuslan Shevchenko
 
SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.Ruslan Shevchenko
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisRuslan Shevchenko
 
Java & low latency applications
Java & low latency applicationsJava & low latency applications
Java & low latency applicationsRuslan Shevchenko
 
Jslab rssh: JS as language platform
Jslab rssh:  JS as language platformJslab rssh:  JS as language platform
Jslab rssh: JS as language platformRuslan Shevchenko
 
Behind OOD: domain modelling in post-OO world.
Behind OOD:  domain modelling in post-OO world.Behind OOD:  domain modelling in post-OO world.
Behind OOD: domain modelling in post-OO world.Ruslan Shevchenko
 
scala-gopher: async implementation of CSP for scala
scala-gopher:  async implementation of CSP  for  scalascala-gopher:  async implementation of CSP  for  scala
scala-gopher: async implementation of CSP for scalaRuslan Shevchenko
 
JDays Lviv 2014: Java8 vs Scala: Difference points & innovation stream
JDays Lviv 2014:  Java8 vs Scala:  Difference points & innovation streamJDays Lviv 2014:  Java8 vs Scala:  Difference points & innovation stream
JDays Lviv 2014: Java8 vs Scala: Difference points & innovation streamRuslan Shevchenko
 
Ruslan.shevchenko: most functional-day-kiev 2014
Ruslan.shevchenko: most functional-day-kiev 2014Ruslan.shevchenko: most functional-day-kiev 2014
Ruslan.shevchenko: most functional-day-kiev 2014Ruslan Shevchenko
 
Web architecture - overview of techniques.
Web architecture - overview of  techniques.Web architecture - overview of  techniques.
Web architecture - overview of techniques.Ruslan Shevchenko
 

More from Ruslan Shevchenko (20)

Embedding Generic Monadic Transformer into Scala. [Tfp2022]
Embedding Generic Monadic Transformer into Scala. [Tfp2022]Embedding Generic Monadic Transformer into Scala. [Tfp2022]
Embedding Generic Monadic Transformer into Scala. [Tfp2022]
 
Svitla talks 2021_03_25
Svitla talks 2021_03_25Svitla talks 2021_03_25
Svitla talks 2021_03_25
 
Akka / Lts behavior
Akka / Lts behaviorAkka / Lts behavior
Akka / Lts behavior
 
Papers We Love / Kyiv : PAXOS (and little about other consensuses )
Papers We Love / Kyiv :  PAXOS (and little about other consensuses )Papers We Love / Kyiv :  PAXOS (and little about other consensuses )
Papers We Love / Kyiv : PAXOS (and little about other consensuses )
 
Scala / Technology evolution
Scala  / Technology evolutionScala  / Technology evolution
Scala / Technology evolution
 
{co/contr} variance from LSP
{co/contr} variance  from LSP{co/contr} variance  from LSP
{co/contr} variance from LSP
 
SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with this
 
Scala jargon cheatsheet
Scala jargon cheatsheetScala jargon cheatsheet
Scala jargon cheatsheet
 
Java & low latency applications
Java & low latency applicationsJava & low latency applications
Java & low latency applications
 
Csp scala wixmeetup2016
Csp scala wixmeetup2016Csp scala wixmeetup2016
Csp scala wixmeetup2016
 
IDLs
IDLsIDLs
IDLs
 
R ext world/ useR! Kiev
R ext world/ useR!  KievR ext world/ useR!  Kiev
R ext world/ useR! Kiev
 
Jslab rssh: JS as language platform
Jslab rssh:  JS as language platformJslab rssh:  JS as language platform
Jslab rssh: JS as language platform
 
Behind OOD: domain modelling in post-OO world.
Behind OOD:  domain modelling in post-OO world.Behind OOD:  domain modelling in post-OO world.
Behind OOD: domain modelling in post-OO world.
 
scala-gopher: async implementation of CSP for scala
scala-gopher:  async implementation of CSP  for  scalascala-gopher:  async implementation of CSP  for  scala
scala-gopher: async implementation of CSP for scala
 
JDays Lviv 2014: Java8 vs Scala: Difference points & innovation stream
JDays Lviv 2014:  Java8 vs Scala:  Difference points & innovation streamJDays Lviv 2014:  Java8 vs Scala:  Difference points & innovation stream
JDays Lviv 2014: Java8 vs Scala: Difference points & innovation stream
 
Ruslan.shevchenko: most functional-day-kiev 2014
Ruslan.shevchenko: most functional-day-kiev 2014Ruslan.shevchenko: most functional-day-kiev 2014
Ruslan.shevchenko: most functional-day-kiev 2014
 
Web architecture - overview of techniques.
Web architecture - overview of  techniques.Web architecture - overview of  techniques.
Web architecture - overview of techniques.
 
R scala 17_05_2014
R scala 17_05_2014R scala 17_05_2014
R scala 17_05_2014
 

Recently uploaded

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 

Programming Languages: some news for the last N years

  • 1. Bibliotech - smart cafe; strikead club. Programming Languages: Some news for the last N years. Ruslan Shevchenko <ruslan@shevchenko.kiev.ua> @rssh1 https://github.com/rssh
  • 2. Programming languages: ❖ Industry/Academic ❖ what’s hot now: ❖ academic research from 70-th ❖ ‘freaky’ things from 2000 Where is progress ? What we will see in industry from today-s academic ? from today-s freaks ?
  • 3. Statement from 80-th: Full change of language and tools during 2-3 years Actual situation in 2014: Top 11 languages are the same: 2010 - 2014 http://dou.ua
  • 4. Can we track progress in PL ? ❖ Estimations ❖ Code size / project duration
  • 6. If we think about ideal language ?
  • 7. Make all good What is: ❖ all ? ❖ good ? ❖ make ? • Object and processes from real world, represented in computer • Operations with this representation. • Mapping of result back to real world
  • 8. Syntax [parsing/ast manipulation] Semantics [type systems] “New” functionality
  • 9. Syntax Traditional approach: context free grammars Syntax structure is fixed Now in practice: Context-dependent keywords (C++ ) Multi-language programming
  • 10. Extensible syntax Seed 7: Syntax definitions of operations with priority syntax expr: .(). + .() is -> 7; syntax expr: .loop.().until.().do.().end.loop is -> 25; Nemerle: macroses macro for (init, cond, change, body) syntax ("for", "(", init, ";", cond, ";", change, ")", body) XL Compiler plugins
  • 11. Extensible syntax // Idris boolCase : (x:Bool) -> Lazy a -> Lazy a -> a; boolCase True t e = t; boolCase False t e = e; syntax "if" [test] "then" [t] "else" [e] = boolCase test t e; syntax "for" {x} "in" [xs] ":" [body] = forLoop xs (x => body) // introducing new binding // DSL — map object to Idrix language constructions
  • 12. XL: Concept programming Active library = Library + compiler plugin Concept in real life. In computer - representation Metrics: Syntax noise / signal Bandwidth what part of code is about business what part of concept is represented Complexity source
  • 13. Articulate programming Avail: SmallTalk-based, static typing Try to deduce ‘needed’ value from context. like scala implicit, but *all* is implicit
  • 14. Syntax Multi-language programming ❖ Do nothing (mess) ❖ Embed all in one language [lifted evaluation] ❖ (like LINQ or scala slick or idris DSL) ❖ Define and use ‘part of grammar’ with type.
  • 15. Wyvern: https://www.cs.cmu.edu/~aldrich/wyvern/ //Type-specific tokens let imageBase : URL = <images.example.com> let bgImage : URL = <%imageBase%/background.png> new : SearchServer def resultsFor(searchQuery, page) serve(~) (* serve : HTML -> Unit *) >html >head >title Search Results >style ~ body { background-image: url(%bgImage%) } #search { background-color: ..
  • 16. Wyvern: https://www.cs.cmu.edu/~aldrich/wyvern/ //Type-specific tokens let imageBase : URL = <images.example.com> let bgImage : URL = <%imageBase%/background.png> new : SearchServer def resultsFor(searchQuery, page) serve(~) (* serve : HTML -> Unit *) >html >head >title Search Results >style ~ body { background-image: url(%bgImage%) } #search { background-color: ..
  • 17. Wyvern: https://www.cs.cmu.edu/~aldrich/wyvern/ //Type-specific tokens let imageBase : URL = <images.example.com> let bgImage : URL = <%imageBase%/background.png> new : SearchServer def resultsFor(searchQuery, page) serve(~) (* serve : HTML -> Unit *) >html >head >title Search Results >style ~ body { background-image: url(%bgImage%) } #search { background-color: ..
  • 18. Type Systems Static/Dynamic —-> Gradual Dynamic: ❖ clojure -> core.typed ❖ python -> type annotations ❖ groovy -> type annotations Static: ❖ Dynamic type fromDynamic[T]: D => Option[T] toDynamic[T](x: T) => Dynamic needed for reflective typing
  • 19. Clojure: core/typed. (ann clojure.core/first (All [x] (Fn [(Option (EmptySeqable x)) -> nil] [(NonEmptySeqable x) -> x] [(Option (Seqable x)) -> (Option x)])) ) - static empty -> nil - static non-empty -> not-nil - unknown -> x or nil,
  • 20. Type Systems typing => static analysis at compile-time compilation => optimization of interpretation
  • 23. Non-dependent types example trait CInt { type Succ <: CInt } trait CPos extends CInt trait CSucc[P <: CPos] extends CInt { type Succ = CSucc[CSucc[Int]] } final class _0 extends CPos { type Succ = CSucc[0] } type _1 = _0#Succ type _2 = _1#Succ // church numeration
  • 24. Non-dependent types example trait LimitedVector[+A, N<:CInt] { ………… def append[B <: A, NX <:CInt](x: LimitedVector[B,NX]): LimitedVector[B,Plus[N,NX]] ………….. } // shapeless full of such tricks
  • 25. Dependent types example trait LimitedVector[+A, n:Int] { ………… def append[B <: A, nx:Int](x: LimitedVector[B,nx]): LimitedVector[B, n+nx] ……………. } // warning: pseudocode, impossible in scala
  • 26. Dependent types example data Vect : Nat -> Type -> Type where Nil : Vect 0 a (::) : a -> Vect k a -> Vect (k+1) a // Idris Calculus of constructions: Idris, Coq, Agda
  • 27. Dependent types: Track properties, which can be proven by structural induction Function, which call SQL inside no more than 3 times. Resource with balanced acquire/release for all execution paths. Type depends from value <=> Type must be available as value data Parity : Nat -> Type where even : Parity (n + n) odd : Parity (S (n + n))
  • 28. Dependent types: intuitionistic logic absence (p || ~p) Type:Type - logical bomb
  • 29. // note: it is possible to make efficient type-level numbers in scala Details: Stefan Zeiger. Type-Level Computations in Scala ❖ slides ❖ http://slick.typesafe.com/talks/scalaio2014/Type-Level_Computations.pdf ❖ code: ❖ https://github.com/szeiger/ErasedTypes ❖ idea: ❖ define type-alias with argument for operation. ❖ perform term-level computation and ‘unsafe cast’ to this alias. abstract class CNat { type Succ type + [T <: CNat] def value: Int …………….. def +[T <: CNat](x:n): +[T] = CPos(value+x.value).asInstanceOf[+T] }
  • 30. Effects tracking: No more IO monads !!!! List of effects as part of type. • Idris • Eff
  • 31. Effects: - calculated as extension to ‘normal’ type. (as type-index or yet another dimension) • possible traces of operations • set of operations. • set of resources • set of exceptions • atomicity • delimited specs • …. type channel = effect operation read : unit -> string operation write : string -> unit end // Eff //Handler - effects interpreter let accumulate = handler | std#write x k -> let (v, xs) = k () in (v, x :: xs) | val v -> (v, [])
  • 32. Knowledge-based programming Let’s add structured information about problem domain. Wolfram Alpha: Mathematics domain. Near 5000 built-in functions. Household lexicon: approx 4000 Differ from community repository: all interfaces are consistent
  • 35. Make all good - Syntax, defined in problem-domain specific library - Vocabulary simular to one in natural language - Advanced type theory with refinement specs.
  • 37. Implementation Compilation/Interpretation [both - hard] VM/System JVM no continuations (?) LLVM non-trivial gc (?) Complexity. both - impossible without divergence Let’s rewrite all with callbacks, because it’s more easy than fix JVM/OS
  • 38. CORBA story: Let’s do remote and local call undistinguished (1996) Local calls: fast Remote calls: slow Common antipattern: build fine-grained object model in RPC Akka: Let’s do remote and local call undistinguished (2014) // hope, now things will move forward more accurate
  • 39. So, we must choose one level of abstraction or build family of systems otherwise — abstraction leaks
  • 40. Ok, assume we build ideal language. (in academia or as freaks) When it will be in industry ? ❖ Success in sense of adoption => evolution slowdown Haskell: ❖ avoid success of all costs => be open for evolution, live in a water Scala: from research to engineering (LMS, attempt to remove skolem types, … etc )
  • 41. Sociology of programming languages Leo Meyerovich Average ‘incubation’ period before wider adoption: 12 years before - specialized in some niche Adoption => social, marketing ….., not technical.
  • 42. What will be in industry tomorrow: landscape now. General purpose: need some time for current adoption JVM land: scala, clojure Trends: integrating other paradigms System: D / Rust instead C++ (?) Application/ Scripting: [ place is vacant ] // JavaScript successor [?]
  • 43. What will be not in industry tomorrow: academic/OSS Better VM-s New paradigms Depends from you // niche as social issue
  • 44. Thanks. ruslan@shevchenko.kiev.ua https://github.com/rssh @rssh1 If you build something interesting - ping me.