What Elixir related stuff are you doing?

I’m building a new site in phoenix and considering a rewrite of another site, provided I can find or build implementations of a few features I’d need.

2 Likes

@hunterboerner you may be interested in posting in this section

1 Like

Right now

  • I am reading Programming Phoenix
  • Building a card game based on war, but each card is a shape, the game is for kids who are starting to learn geometry (War Game)
  • The game has a lobby and when two sockets joins same channel, a new game is started.

The game, in fact, is a migration of a NodeWebkit we did the last year, I am so excited about how the state is kept in ahother process, no global variables.

4 Likes

Working on a Telegram API client

2 Likes

Working on a website for a teaching institution to unify a lot of very disparate backend systems.

3 Likes

Working on a Phoenix + OAuth2 + Fitbit API app.

2 Likes

I am building https://github.com/rawcodehq/webmonitor an open source Phoenix app to monitor other webapps. Would love to get your feedback.

5 Likes

I’m half way in Programming Elixir book. I’m reading it through my company’s online resource. There is a lot of stuff that I need to learn about OTP. About what it does and how it works. After all of that, I’m planning on moving to Programming Phoenix book. And when most of the things about Erlang/Elixir ecosystem make sense to me, I want to introduce it to my team. I’m sure they will be happy with the power of BEAM concurrency and move on from Rails that currently hurt me everyday as the app grows to become a nasty monster. Hahaha

3 Likes

I’m learning/reviewing Elixir for an internal monitoring/remote control system for a museum exhibition. Still a lot to learn but so far the promise of a modern syntax for Erlang plus a growing community seems enticing!

2 Likes

I am learning Elixir and I wrote this small library https://github.com/10Pines/ex_matchers that provides expectation matchers around ExUnit assertions. Feedback is welcome!

3 Likes

Eh, guess I should say what libraries I’ve publicly released. While making the project for the above institution that I mentioned before, a couple of little libraries got ‘done’ enough for me to release, those are:

LDAPEx -> This is a binary instead of char_list version of the stock Erlang :eldap library.
It currently is read-only stuff, but easier to use, and I imported the entire LDAP ASN1 spec so I could (or a PR could be given) that adds writing functionality too, perhaps even build a server on it if the need arises.

PermissionEx -> It is a permission matcher library, you can do things like:

    iex> PermissionEx.test_permissions(%PermissionEx.Test.Structs.Page{action: :show}, [true])
    true

It integrates really well with libraries like Canada or similar ones so I end up using it in my own code like (actual code):

conn |> can?(edit(%Perms.Student{uid: uid}))

I have the canada :action set an existing :action variable on the permission if it exists, else it throws an error, can pass a ‘nil’ action to specify no action. But it just grabs the user off the connection, grabs their permissions if already cached, else it looks in the database for that user for the ‘Perms.Tag’ type permission and grabs it (I usually preload all of them in the usual case, may optimize that later if really a need), then compares it to what is required. Combined with Vic’s excellent Happy library I get to write code like this:

  def update(conn, %{"id" => id_param, "student" => student_params}) do
    happy_path!(else: handle_error(conn)) do
      {:ok, {cnum, uid, obj}} = verify_cnum_uid(id_param)
      @perm true = conn |> can?(edit(%Perms.Student{uid: uid}))
      query = from s in Student, where: s.uid == ^uid
      {:ok, student} = verify_single_record(Repo.get(query, uid))

      changeset = Student.changeset(student, put_in(student_params["uid"], uid))
      case Repo.update(changeset) do
        {:ok, _student} ->
          conn
          |> put_flash(:info, gettext("Student record successfully updated: %{cnum}", cnum: get_full_cnum(cnum)))
          |> redirect(to: student_path(conn, :index, id: id_param))
        {:error, err_changeset} ->
          conn
          |> render(:edit, changeset: err_changeset, obj: obj, id: id_param)
      end
    end
  end

Thanks to the happy_path (think Elixir 1.3’s with on steroids, easier to use, and works on older Elixir version) default else handler it drops down into a large tree I’ve setup to handle error cases. For example if the permission is actually false then it redirects them to a login page while telling them to log in with an account that has permission to do that function as per:

def handle_error({:perm, false}, conn)              ,do: do_unauthorized(conn)

If the verify_cnum_uid/1 fails to sanitize and convert the passed in UID param and confirm the account actually exists then the default error handler does this based on the exact error:

def handle_error({:error, :not_a_number}, conn)     ,do: do_bad_request(conn)
def handle_error({:error, :invalid_uid}, conn)      ,do: do_not_found(conn)

So it all works really well together. :slight_smile:

I have some other little libraries (mostly integrations, like Ecto.Interval, Ueberauth.LDAP, Dynamic Module detection and plugin system (great for building things like Menus on webpages dynamically), etc…) that have basically no documentation whatsoever, so not what I consider release-worthy. But maybe someday.

5 Likes

Still learning elixir and on the proccess of trying to convince my very small team (me and 2 others) to write our next API with phoenix, we currently use Laravel/PHP :cry:

4 Likes

Trying to finish Elixir in Action, already 70% through the ebook :slight_smile:

3 Likes

I’m writing an app for my wife to ease burden of managing small law firm. And an umbrella app with separate storage app, slack bot, and phoenix frontend, so at work we can tell the bot that coffee/cookies etc need to be bought, so our office manager can buy it :slight_smile:

3 Likes

Currently still using Elixir at work, looking at bucklescript for a possible front-end. Really have hope in ElixirScript too. :slight_smile:

3 Likes

Doing a survey web app, and currently making all reports work. :slight_smile:

2 Likes

Wow this is very impressive

2 Likes

Nothing serious yet, just the exercises at http://exercism.io/. I’m about 80% of the way through. You can get the list of what I’ve done at http://exercism.io/davearonson – I’d appreciate (constructive) feedback.

1 Like

I am digging into the Ecto codebase.

1 Like

I wanted to learn elixir and understand tcp/ip better, so I decided to write a tcp/ip stack in elixir. Since this a learning project I’m taking my time to dig through the elixir/erlang platform.

2 Likes