Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
What if we could change programming languages?
Search
Kolja Dummann
February 02, 2014
Programming
0
2.4k
What if we could change programming languages?
Slides form my talk about haw we used language extensions to build mbeddr at FOSDEM2014
Kolja Dummann
February 02, 2014
Tweet
Share
More Decks by Kolja Dummann
See All by Kolja Dummann
Fsharp
coolya
0
820
Android insights
coolya
0
97
IoT with extensible C - Democamp
coolya
0
83
Internet of thing with extensible C
coolya
0
110
mbeddr & MPS overview
coolya
0
120
mbeddr on aruino
coolya
0
270
Other Decks in Programming
See All in Programming
Changed Rules: Architectures with Lightweight Stores
manfredsteyer
PRO
0
240
Netty Chicago Java User Group 2024-04-17
sullis
0
170
Amazon SQSコンシューマー疎結合への旅 - 出張! #DevelopersIO IT技術ブログの中の人が語る勉強会 #3
quiver
0
230
GraphQLサーバの構成要素を整理する #ハッカー鮨 #tsukijigraphql / graphql server technology selection
izumin5210
4
820
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
220
코틀린으로 멀티플랫폼 만들기
pangmoo
0
150
Node.js v22 で変わること
yosuke_furukawa
PRO
3
870
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
380
Hanami and htmx
bkuhlmann
0
200
Elm 0.19.0 Changes
bkuhlmann
0
490
AWS Application Composerで始める、 サーバーレスなデータ基盤構築 / 20240406-jawsug-hokuriku-shinkansen
kasacchiful
1
260
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
170
Featured
See All Featured
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
Unsuck your backbone
ammeep
663
57k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3k
A better future with KSS
kneath
231
16k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
322
20k
Web Components: a chance to create the future
zenorocha
305
41k
A designer walks into a library…
pauljervisheath
200
23k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
The Power of CSS Pseudo Elements
geoffreycrofte
60
5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
227
16k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
Transcript
What if we could change programming languages?
Kolja Dummann itemis AG ! @dumdidum http://logv.ws
Rocket Science? Image: mentalwanderings / CC-by-sa
Rocket Science! Image: mentalwanderings / CC-by-sa
Build your own rocket software Image: Wikipedia Commons
Image: Wikipedia Commons
Image: Wikipedia Commons sensor
Image: Wikipedia Commons sensor self destruction
Image: Wikipedia Commons sensor self destruction autopilot
Image: Wikipedia Commons sensor self destruction autopilot sensors
Image: Wikipedia Commons sensor self destruction autopilot pumps sensors
Image: Wikipedia Commons sensor self destruction vanes autopilot pumps sensors
Image: Wikipedia Commons Physical Units int16 distance = …; int16
time = …; int16 speed = time / distance; sensor self destruction vanes autopilot pumps sensor
Image: Wikipedia Commons Physical Units int16 distance = …; int16
time = …; int16 speed = time / distance; sensor self destruction vanes autopilot pumps sensor
Image: Wikipedia Commons Physical Units int16/m/ distance = …; int16/s/
time = …; int16/mps/ speed = distance / time; sensor self destruction vanes autopilot pumps sensor
Image: Wikipedia Commons sensor self destruction vanes autopilot pumps sensor
Statemachines statemachine selfdestruction initial = starting { in event update(int8 speed, int8 hight) <no binding> state starting { on update [speed > 10 && hight > 0] -> flying } state flying { do { record_flightdata(); } on update [speed > 100 && hight < 42] -> kill } state kill { entry { blow_rocket(); } } }
Image: Wikipedia Commons Components cs interface FlightRecorder { Trackpoint* process(Trackpoint*
p) pre(0) p != null pre(1) p->id != 0 pre(2) p->time != 0 s post(3) result->id != 0 } sensor self destruction vanes autopilot pumps sensor
Image: Wikipedia Commons Components II component AutoPilot extends nothing {
requires FlightRecorder flightRecorder provides CourseProvider cp int16 cp_getCourse() <= op cp.getCourse { return 0; } } sensor self destruction vanes autopilot pumps sensor
Image: Wikipedia Commons Undefined Behavior sensor self destruction vanes autopilot
pumps sensor
Image: Wikipedia Commons Undefined Behavior i *= 2 + 2
+ i--; sensor self destruction vanes autopilot pumps sensor You write:
Image: Wikipedia Commons Undefined Behavior i *= 2 + 2
+ i--; sensor self destruction vanes autopilot pumps sensor (i *= 2 + 2 + i)——; You write: GCC reads:
Image: Wikipedia Commons Testing testcase main { assert-equals(0) 10 ==
add(5, 5); assert-less(1) 20 < add(5, 10); assert(2) 30 == add(20, 10); } sensor self destruction vanes autopilot pumps sensor
Image: Wikipedia Commons Verification sensor self destruction vanes autopilot pumps
sensor
How?
Projectional Editor
int i = 42 + 23;
int i = 42 + 23;
LocalVarDecl Name = i int i = 42 + 23;
LocalVarDecl Name = i IntType Type int i = 42
+ 23;
LocalVarDecl Name = i IntType Type Plus Init int i
= 42 + 23;
LocalVarDecl Name = i IntType Type Plus Init NumberLiteral Name
= 42 Left int i = 42 + 23;
LocalVarDecl Name = i IntType Type Plus Init NumberLiteral Name
= 42 Left NumberLiteral Value = 23 Right int i = 42 + 23;
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
http://mbeddr.com
A Open Source Collection of integrated languages for embedded software
engineering
None
Core Plain C
Core Plain C Ext Components Statemachines Units
Core Plain C Ext Components Statemachines Units CC Requirements Documentation
Core Plain C Ext Components Statemachines Units CC Requirements Documentation
Debugger
Core Plain C Ext Components Statemachines Units CC Requirements Documentation
Analyses Debugger
Code Generator Text (C) Compiler
Build on JetBrains MPS Open Source Language Workbench Apache 2.0
http://jetbrains.com/mps
Questions?