Skip to content

Instantly share code, notes, and snippets.

View NJichev's full-sized avatar

Nikola Jichev NJichev

View GitHub Profile
defprotocol Store do
@callback new() :: t
def save(id, value)
end
defmodule InMemory do
defstruct [:pid]
@behaviour Store
import Data.IORef
main :: IO ()
main = do
putStrLn "I'm going to calculate a sum, hang on a sec"
totalRef <- newIORef (0 :: Int)
let loop i
| i > 100 = pure ()
| otherwise = do
oldTotal <- readIORef totalRef

Hi everyone!

I'm Nikola and I'll be working on the following google summer of code project. I plan on updating you guys in this thread to check out the progress and maybe return feedback :)

Week 1 13.05-19.05

I started working on generation of the basic types. Progress for this week can be seen in this branch. Added most basic types with the exceptions of the likes of functions/pids/ports and some builtin types. When I say basic types, I mean the basic/built-in and literals that elixir supports, check them out here.

// house
stroke(255, 140, 0);
strokeWeight(10);
fill(107, 63, 5);
rect(100, 100, 250, 200);
fill(0, 51, 255);
rect(251, 211, 60, 88);
fill(230, 255, 0);
rect(137, 135, 67, 59);