pixie-lang / dust

Magic fairy dust for pixie, i.e. tooling around the language.
GNU Lesser General Public License v3.0
93 stars 14 forks source link

Dust command oddities in OSX 10.10.1 #2

Closed kidpollo closed 9 years ago

kidpollo commented 9 years ago

Out of the box the command seems to depend on rlwrap which does not seem to be part of osx. Also readlink shows an illegal option --f

$ dust
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname path
/usr/local/bin/dust: line 20: rlwrap: command not found

After installing rlwrap I see other weird warnings:

$ dust repl
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname path
rlwrap: warning: on this system, the getopt() library function doesn't
grok optional arguments, so '-n' is taken as an argument to the -a option
Is this what you meant? If not, please provide an argument

warnings can be silenced by the --no-warnings (-n) option
Pixie 0.1 - Interactive REPL
(darwin_x86_64, clang)
:exit-repl or Ctrl-D to quit
----------------------------
user =>

dust help does not even work:

$ dust help
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname path
Error: Cannot open '/run.pxi'

I seem to have dust in the path:

$ which dust
/usr/local/bin/dust

I built and installed the non jut pixie-vm versions so I did not get the segfaults.

$ which pixie-vm
/usr/local/bin/pixie-vm

$ pixie-vm
Pixie 0.1 - Interactive REPL
(darwin_x86_64, clang)
:exit-repl or Ctrl-D to quit
----------------------------
user =>
kidpollo commented 9 years ago

Ughh seems you would need to install brew install coreutils and detect the OS so it can use greadlink ¬¬

heyLu commented 9 years ago

that's one way, but i'm fixing it for (hopefully) everyone else. wait a minute or two. :)

edit: done, could you try again?

kidpollo commented 9 years ago

ohh wait If you remove the -f seems to work :p

kidpollo commented 9 years ago

Cool! Is there an alternative to using rlwrap?

heyLu commented 9 years ago

The readline library (which we already use a bit) could handle the history and line editing functionality, but I don't know if it can do the bracket matching as well.

heyLu commented 9 years ago

Closing this for now, rlwrap is mentioned in the README and maybe at some point pixie will take advantage of readlines capabilities by itself.