Back to Project List

Fika

Fika is a modern programming language for the web. It is statically typed, functional and runs on the BEAM (Erlang VM). Fika is designed for building and maintaining scalable web apps without compromising on programmer e

Repository Video ▶️

Fika will have the following features when it grows up:

Built in web framework

Easily create HTTP API endpoints, CRUD apps and bots simply by writing functions. Fika's standard library will have the batteries included for creating modern web apps.

Live deployment

Instead of stopping an entire production app for changing a small part, Fika should apply code changes to a running system while it's live. It's like rebuilding a ship while it's sailing without ever docking.

Native support for feature flags

Instead of sprinkling if-else conditions everywhere in the code, let the runtime choose code paths based on pre-defined branching rules triggered by HTTP requests and background jobs. Fika will have compile time checks for feature flags which ensures correctness when adding or removing them.

No runtime exceptions

Fika will have a clear separation between pure and effectful functions. User-land is always deterministic and error free while side effects are isolated for safety. Fika's compiler makes the computer find edge cases during compile time so humans don't have to. If it compiles, it will run.

Beginner friendly

Fika comes with a web console and command palette which helps beginners discover and learn things interactively using a context-aware autocomplete UI. Fika's compiler gently helps new users fix errors in their programs by showing hints and pointing to documentation.

FOSS Hack 2020 goals

Compile a Fika program with functions containing arithmetic operations and run it on the BEAM.

Specifically, I'll be building a compiler in Elixir with these:

  1. Parser to parse assignments, arithmetic expressions, function definitions, function calls and types.
  2. Type inferencing and checking.
  3. Translator that converts Fika AST into Erlang abstract format.
  4. Code loader to load the Erlang forms on the BEAM.
  5. CLI that compiles and runs a Fika file.
Emil Soman

Created a demo video

September 13, 2020

Fika now comes with a webserver! Here's the "hello world" HTTP server using Fika lang:

fn routes : List(List(String)) do
  [
    ["GET", "/", "greet"]
  ]
end

fn greet : String do
  "Hello world"
end

fika start command will read this routes.fi file and start a webserver.

September 13, 2020

Fika lang now has List data type.

fn list : List(Int) do
  [1, 2, 3]
end
September 13, 2020

Fika now has strings!

``` fn hello : String do "Hello world" end

September 13, 2020

Created a CLI to execute Fika code.

September 13, 2020

Wrote the translator that translates Fika AST into Erlang abstract format. Fika can now load ".fi" files and run them on the BEAM VM!

September 12, 2020

Fika now has assignment operator.

September 12, 2020

Fika now parses and infers types of function calls.

September 12, 2020

Type checker now infers types of arithmetic expressions.

September 12, 2020

The Fika type checker is here and it now infers the return type of function bodies and ensures they're the same as the return type in their signatures. Currently only integer literals and variables are inferred. Up next - infer return type of arithmetic expressions.

September 12, 2020

Parser now understands arguments and return types as part of function definitions.

September 12, 2020

Fika now knows how to read function definitions. Args and return types coming up next.

September 12, 2020

Fika can now parse infix arithmetic expressions.

September 12, 2020

Kicking it off with a humble first step. Fika lang can now parse integers. Fika uses parser combinators instead of using yecc(an Erlang parser generator used by Elixir and many other BEAM languages). We do this hoping that this will give us more control over error messages. Arithmetic operations come next.

September 12, 2020

Project created by Emil Soman

August 31, 2020