Skip to content

Implement Erlang Standard Library calls in Elixir Standard Library #306

Open

Description

@bryanjos

Below is a list of all the known Erlang standard library functions found in Elixir's Standard Library that have not been implemented in some way yet in ElixirScript. Implementations should go here

For anyone looking to implement a function the steps would be to:

  • Pick a function or functions from the list below
  • Implement the function(s) in JavaScript according to the Erlang docs
  • Add tests for the function(s) implemented
  • Make Pull Request

Then we can check off those functions is the list below

Functions to Implement

  • erlang
    • fun_info
    • get
    • binary_to_term
    • term_to_binary
    • phash2
    • pid_to_list
    • split_binary
    • garbage_collect
    • system_info
    • spawn_monitor
    • put
    • process_flag
    • unique_integer
    • monotonic_time
    • system_time
    • convert_time_unit
    • time_offset
    • open_port
    • port_info
    • ports
    • port_connect
    • port_command
    • port_close
    • is_alive
    • nodes
    • monitor_node
    • monitor_opt
    • set_cookie
    • get_cookie
  • math
    • log2
  • calendar
    • date
    • datetime
    • valid_date
  • binary
    • copy
    • match
    • part
    • compile_pattern
    • split
    • replace
  • code
    • add_to_pathz
    • add_to_patha
    • del_path
    • ensure_loaded
    • get_object_code
    • which
    • where_is_file
    • lib_dir
    • is_loaded
  • filename
    • dirname
    • join
  • epp
    • parse_file
  • re
    • compile
    • version
    • run
    • inspect
  • ets
    • take
    • insert
    • lookup_element
    • insert
    • select
    • match_delete
    • delete_object
    • select_count
    • insert_new
    • lookup
    • member
    • new
    • test_ms
  • sys
    • get_state
    • get_status
    • trace
    • statistics
    • no_debug
    • suspend
    • resume
  • global
    • send
    • whereis_name
  • io
    • get_line
    • get_chars
    • columns
  • application
    • get_all_key
    • get_key
    • get_application
    • get_all_env
    • get_env
    • set_env
    • unset_env
    • ensure_started
    • ensure_all_started
    • start
    • stop
    • load
    • unload
    • which_applications
    • loaded_applications
  • os
    • set_signal
    • system_time
    • type
    • cmd
    • getenv
    • find_executable
    • getpid
    • putenv
    • unsetenv
  • rand
    • seed
    • uniform
  • orddict
    • store
    • find
  • supervisor
    • start_link
    • sup_flags
    • modules
  • file
    • open
    • read_file_info
    • make_dir
    • format_error
    • read_file
    • write_file_info
    • make_link
    • make_symlink
    • copy
    • rename
    • list_dir
    • write_file
    • delete
    • get_cwd
    • close
    • change_mode
    • format
    • read
    • write
  • gen
    • call
    • start
    • stop
  • filelib
    • wildcard
    • ensure_dir
  • net_adm
    • ping
  • net_kernel
    • connect_node

Activity

  1. changed the title [-]Find all Erlang Standard Library calls in Elixir Standard Library[/-] [+]Implement Erlang Standard Library calls in Elixir Standard Library[/+] on Aug 23, 2017
  2. lmiller1990 commented on Mar 29, 2018

    @lmiller1990

    Hi @bryanjos ,

    I would like to contribute to this project, and this seems like a good place to start. But I have some questions first.

    I was thinking to try doing system_time/0 and processes/0. Implementations might be something like:

    function system_time() {
      return new Date().getTime();
    }
    
    function processes() {
      child_process.exec('ps aux', (err, stdout, stdin) => {
        if (err) throw err;
          console.log(stdout);
        });
    }

    but how can I go about writing the test for such functions? Since they are relying on JS APIs and Node.js APIs.

  3. Yngwarr commented on Dec 15, 2018

    @Yngwarr

    Hmm... I think you might want to check all the filename functions off since they are implemented here.

  4. bryanjos commented on Dec 31, 2018

    @bryanjos
    CollaboratorAuthor

    I think this should be rethought a bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions