Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Erlang Standard Library calls in Elixir Standard Library #306

Open
bryanjos opened this issue Jun 29, 2017 · 3 comments
Open

Implement Erlang Standard Library calls in Elixir Standard Library #306

bryanjos opened this issue Jun 29, 2017 · 3 comments

Comments

@bryanjos
Copy link
Collaborator

bryanjos commented Jun 29, 2017

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
@lmiller1990
Copy link

lmiller1990 commented Mar 29, 2018

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.

@Yngwarr
Copy link

Yngwarr commented Dec 15, 2018

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

@bryanjos
Copy link
Collaborator Author

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
Projects
None yet
Development

No branches or pull requests

3 participants