Skip to content

[Feature Request]Makes executable works when not in Elixir's directory. #3

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

Closed
wants to merge 1 commit into from

Conversation

miaout17
Copy link
Contributor

Not really a pull request, just code snippets for discussion.

My scenario is:

  • The elixir repository is in ~/work/elixir
  • The elixir programs is in ~/work/elixir-testbed
  • A elixir file required another elixir file inside elixir-testbed Example

And type

cd ~/work/elixir-testbed
~/work/elixir/bin/elixir bf_hello.ex

to run the Elixir program.

Currently, here are two problems to be solved:

  • ?FILE macro cannot detect absolute directory, so the stdlib can't be loaded successfully.
  • bf_hello cannot require brainfuck because current directory is not in require path list by default.

I made a quick and dirty fix. It enables me to write Elixir code in another repository, but I think it's not good enough to be commit.

This is a low priority feature request, welcome to discuss, or give me some implementation comment.

@josevalim
Copy link
Member

Merged. It seems good for awhile. We can rework it once we have load paths working.

@yrashk yrashk mentioned this pull request Oct 27, 2012
josevalim added a commit that referenced this pull request Jul 2, 2024
Rule #1:

    Enum.reverse([1, 2, 3]) ++ [4, 5, 6]

is equivalent but slower than

    Enum.reverse([1, 2, 3], [4, 5, 6])

Rule #2:

    Enum.reverse([1, 2, 3] ++ [4, 5, 6])

is equivalent but slower than:

    Enum.reverse([4, 5, 6], Enum.reverse([1, 2, 3]))

Rule #3

    Enum.reverse(Enum.reverse([1, 2, 3]))

is the same as:

    [1, 2, 3]
wingyplus added a commit to wingyplus/elixir that referenced this pull request Sep 26, 2024
Signed-off-by: Thanabodee Charoenpiriyakij <[email protected]>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants