tomekwojcik / elixir-calculator

Stupid calculator written in Elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

elixir-calculator

OK, this is stupid. I wrote this to get started in Elixir development. This is the very first piece of Elixir code I've ever written and I'm 100% sure it sucks :).

Oh, what does it do?

It's a calculator. It calculates things.

For example, $ ./calculator add 4 1 will add 4 to 1 and return 5. Surprise, surprise.

How do I get this thing running?

  1. Install Elixir,
  2. Clone the repo,
  3. $ mix compile && mix escriptize
  4. $ ./calculator add 4 1
  5. DISCO! (or whatever)

The return values are weird.

Yeah, I know. I'm flattening everything down to floats, so Elixir (or probably Erlang) displays output in E notation. Unfortunately I didn't find a sane workaround when I was writing this. Bummer.

The code looks stupid. Are you stupid?

I am, but that's a different story ;). As far as the code goes - look, this is my first take at Elixir, so just let it go. I promise I'll write better code next time, OK?

There's no tests.

I know and I'm not gonna write any. It's late and I feel like some CS:Source. Wanna join, maybe?

What's the license?

The usual for me - MIT License.

Who are you?

I'm Tomek Wójcik. I code for a living. The rest is irrelevant.

About

Stupid calculator written in Elixir

License:MIT License


Languages

Language:Elixir 100.0%