Skip to content

fin-language/fin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fin - a language for embedded systems

image

Interesting things about fin:

  • fin is like a modern C++ that is much simpler, way safer, and already has superb tooling (IDE, debugger, refactoring...).
  • focuses on resource constrained embedded systems (no heap or garbage collector required).
  • transpiles to high quality human readable C99 so we can use it with any microcontroller.
  • has incredible testing/simulation capabilities (python like).
  • familiar C/C++ syntax (be productive day 1).
  • currently a work in progress.
  • ...

☠️ Safety Stuff

  • non-null references
  • null analysis for pointers
  • safer strings (also support c strings)
  • safer arrays (also support c naked arrays)
  • lightweight optional exceptions
  • arithmetic overflow
  • non-blocking assurances
  • data thread safety
  • selective safety escapes (for speed)

More info in video 2 or see pdf slides around slide 21.


If you prefer text over video, you can view the slides in pdf form. They lack some detail discussed in the video, but still have lots of info.

slides.pdf


I've just uploaded a youtube playlist that details fin, a bunch of stuff related to testing C embedded projects, multiple controller simulations, and the challenges that fin helps us solve.

image

Video 1 - Write Embedded C Faster, Better, Safer With Fin

Video 2 - Fin Language Features

  • 0:00 intro
  • 0:30 features covered
  • 1:30 no more headers!
  • 2:28 no null checks needed by default
  • 4:20 no pass by copy mistakes
  • 6:47 null analysis
  • 8:01 out parameters
  • 10:08 multiple returns with tuples
  • 11:38 named arguments
  • 12:48 simple generics
  • 16:50 safer strings
  • 17:47 safer arrays
  • 21:40 overflow
  • 27:10 non-blocking assurance
  • 29:58 critical section audits
  • 31:02 data thread safety
  • 32:14 safety escapes
  • 33:30 optional lightweight exceptions
  • 39:36 support code gen
  • 41:30 portable de/serialization
  • 42:53 modular and efficient code

Video 3 - Multiple Controller Simulations FTW

Video 4 - Embedded C Software Testing & Design Choices

Video 5 - Language Comparison (for embedded)

  • 0:00 intro
  • 0:56 why not C++?
  • 2:06 poor C++ tooling
  • 3:32 C++ multi project refactoring
  • 7:18 best C++ IDE?
  • 8:08 refactoring for wimps?
  • 9:06 other langs?
  • 10:44 compile to C benefits

Video 6 - Fin Implementation & Challenges


Feedback

The fin compiler isn't ready to share yet, but I do already transpile to C and js in StateSmith. I'm not too worried about the transpiling work.

What I'm looking for mostly right now is some feedback on the concept.

In the next couple weeks, I'll be adding proposals for syntax to use for stack allocating objects and other stuff. More videos too.

For the most part, I just wanted to get it out there and stop working by myself in a vacuum. Especially if there is a language I'm not aware of that already does what I'm planning.


Some intro slides

YouTube playlist above has best info (pdf is pretty good too).

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

More info

About

Write embedded C faster, better and safer with fin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages