
Development of an onboard application in Clojure for the Boeing 737 Max [video] - raspasov
https://www.youtube.com/watch?v=iUC7noGU1mQ
======
aaimnr
Isn't it amazing that they built a real-time diagnostic system for Boeing
plane in Clojure with a team that haven't previously used Clojure? They
basically were learning on the fly, coming from OO background, about
map/reduce, immutability etc. Kudos for being really open when choosing the
best tool for the job after initial research (among the reasons behind picking
Clojure the guy lists functional reactive style and being able to easily parse
DSLs). Code brevity was one of the positive side effects, which made code
reviews much quicker. Impressive

~~~
iagooar
> They basically were learning on the fly

I chuckled on this. Pun intended? :)

~~~
jakub_h
I'm getting kind of sleepy here at 2 AM and my brain misarranged the headline
words into something like _" Development of an application in Clojure onboard
the Boeing 737 Max"_. So it seems like an easy mistake to make!

------
agounaris
One of the things that is impressive, is the amount of "real life"
applications clojure is apparently capable of, compared to other relatively
new programming languages. I always was expecting that avionics software would
be created using low level languages or something like ADA for example. Really
interesting talk that opens a very wide area for clojure!

~~~
clem
Bear in mind that avionics software as a whole is a broad category that
includes everything from fly-by-wire flight controls to the onboard
entertainment system. Each system is classified under an appropriate Software
Level as specified in DO-178C:

[https://en.wikipedia.org/wiki/DO-178C#Software_level](https://en.wikipedia.org/wiki/DO-178C#Software_level)

The OMF system described in the video is Level E, meaning it's failure would
have no safety impact on the aircraft. This gives us greater latitude in
choice of software solutions. The higher levels, however, have strict
requirements regarding latency and memory management that would automatically
preclude the use of Clojure or any language with garbage collection.

So, as always, it's selecting the right tool for the job.

~~~
paulydavis
From my experience most of the work I have done in the last 5 years is in C
for Level A - C (and D but that is changing). Ada is only used on legacy
projects that started out that way. We have one level D project that uses
embedded Linux and a technicolor assortment of languages. E projects generally
are a free for all with what is used.

~~~
pron
SCADE is also used in levels A-C:

> At present, more than 98 system types have been certified using SCADE
> DO-178B/C certified tools, for more than 53 aircraft programs, by multiple
> certification authorities, worldwide, such as the FAA, EASA, Transport
> Canada, and ANAC, for Levels C to A.

[http://www.esterel-
technologies.com/industries/do-178b-and-d...](http://www.esterel-
technologies.com/industries/do-178b-and-do-178c/)

~~~
paulydavis
Yeah Simulink produces C code too. Doesn't SCADE produce c and Ada code to be
compiled for the target? I mean most Control laws (application code) is now
modeled and produces C code. I would not even call SCADE and Simulink a
language. Custom OS's that run that SCADE code is written in C.

~~~
pron
Right, SCADE compiles down to C, but the development and verification are done
in SCADE.

------
clem
I'm one of the leads who worked with Donevan on this project. Feel free to ask
me any questions and I'll answer as best I can.

~~~
dantiberian
On the video it sounded like it was 16,000 lines of code. Was that the amount
or did I mishear it? That was claimed as one of the largest Clojure codebases,
which seems unlikely.

~~~
clem
That's correct. As for size relative to other projects, we came to that
conclusion by combing large GitHub clojure projects and comparing non-blank
lines. For instance, LightTable comes in at around 12,000 lines. Clojure is a
darn terse language.

Of course, there may be private repositories which are larger (thus the weasel
words "one of"). Corrections welcome. :-)

~~~
dantiberian
From memory, CircleCI have around 100k LOC. Nonetheless, it's very cool
getting Clojure on a plane.

~~~
clem
Thanks. Found a reference to the CircleCI code base:

[http://www.ccs.neu.edu/home/samth/typed-clojure-
draft.pdf](http://www.ccs.neu.edu/home/samth/typed-clojure-draft.pdf)

I wonder how their move away from clojure.typed has impacted code size.

