{"id":16550271,"url":"https://github.com/sylhare/elixir","last_synced_at":"2025-03-04T15:27:24.190Z","repository":{"id":57504931,"uuid":"137116118","full_name":"sylhare/Elixir","owner":"sylhare","description":"Experiment with Elixir","archived":false,"fork":false,"pushed_at":"2021-03-10T14:04:53.000Z","size":2798,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T15:17:30.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sylhare.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-12T19:07:00.000Z","updated_at":"2024-01-19T15:40:46.000Z","dependencies_parsed_at":"2022-09-19T10:01:16.390Z","dependency_job_id":null,"html_url":"https://github.com/sylhare/Elixir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylhare%2FElixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylhare%2FElixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylhare%2FElixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylhare%2FElixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sylhare","download_url":"https://codeload.github.com/sylhare/Elixir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241870999,"owners_count":20034381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T19:33:42.102Z","updated_at":"2025-03-04T15:27:24.167Z","avatar_url":"https://github.com/sylhare.png","language":"Elixir","readme":"![](https://github.com/sylhare/Elixir/blob/master/resources/elixir.png?raw=true)\n\n[![Hex pm](http://img.shields.io/hexpm/v/hexper.svg?style=flat)](https://hex.pm/packages/hexper)\n[![Build Status](https://travis-ci.org/sylhare/Elixir.svg?branch=master)](https://travis-ci.org/sylhare/Elixir)\n[![codecov](https://codecov.io/gh/sylhare/Elixir/branch/master/graph/badge.svg)](https://codecov.io/gh/sylhare/Elixir)\n\nElixir is a functional, concurrent, general-purpose programming language that runs on the Erlang virtual machine (BEAM).\n\nElixir also provides a productive tooling (`Mix` build tool, interactive shell)and an extensible design (scalability, fault-tolerance).\n\nInstead of thinking of object, you think of little easy to test process that you spawn and kill when needed.\n\n## Getting started\n\nGo to [elixir-lang.org](https://elixir-lang.org/install.html) and install elixir following the instruction, on MacOS with brew:\n```\nbrew install elixir\n```\n\nElixir has an interactive prompt called `iex` that you can try on the commad line. To quit the `iex` use `[command] + [c]` then `[a]`.\n\nTo run a script try with:\n```bash\nelixir hello.exs\n```\n\nTo compile your module you should use `elixirc` such as\n```bash\nelixirc hello.exs\n```\n\n## Using Mix\n\n`Mix` is a development tool for Elixir that help kick start an Elixir project:\n\n```bash\nmix new demo\n```\n\nBefore running a project you might want to update all dependency using:\n\n```bash\nmix deps.get\n```\n\nAnd a project will be generated. To test your mix project try using:\n\n```bash\nmix test\n```\n\nHowever is you want to use your project functions in the `iex`, go in your root folder and run:\n\n```bash\n# The -S is for source\niex -S mix\n```\n\n### Mix project organisation\n\nIt is adviced to follow the Mix structure in order to organise your files, ie:\n \n  - The package script should be in `lib`\n  - The test files of the scripts in `test`\n  - Configuration settings in `config`\n\nFor the other folder, usually they are populated dynamically:\n\n  - `deps` is for installed dependencies\n  - `_build` is the compiled sources of your project\n  - `doc` is for documentation that can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\n  \n```bash\nmix docs\n```\n\n### Mix project integration\n\nThe package can be installed\nby adding the package name to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:demo, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nPackage can be either download from repository or directly fron [Hex](hex.pm)\n\n### Publishing a Mix project\n\nMix projects are hosted on [Hex](https://hex.pm/docs/publish). To get started, you will need to install `hex` using:\n\n```bash\nmix local.hex\n```\n\nThen you will need an account:\n\n```bash\nmix hex.user register\n```\n\nThen follow the procedure to add the correct metadata to your `mix.exs` so that you can finally publish it:\n\n```bash\nmix hex.publish\n```\n\n## Tips\n\nThere are no multiple comments line. A comments starts like in python with `#`\n\n```elixir\n# Will print Hello world\nIO.puts \"Hello world\"\n```\n\nWhat is the difference between `.ex` and `.exs`:\n\n  - The `ex` is compiled to the erlang `.beam` code\n  - The `.exs` is more of a script that is compiled just-in-time.\n\n## Sources\n\n- [Introduction to Elixir](https://elixir-lang.org/getting-started/introduction.html)\n- [Elixir libraries](https://github.com/h4cc/awesome-elixir)\n- [Phoenix - Elixir Rest framework](http://phoenixframework.org/)\n- [Hex tasks](https://hex.pm/docs/tasks)\n- [Elixir command line app](http://asquera.de/blog/2015-04-10/writing-a-commandline-app-in-elixir/)\n- [Generate documentation with Ex_doc](https://brainlid.org/elixir/2016/09/01/phoenix-project-documentation.html)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsylhare%2Felixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsylhare%2Felixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsylhare%2Felixir/lists"}