Skip to content

Instantly share code, notes, and snippets.

@shawwn
Last active December 30, 2021 08:14
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawwn/64e17ac3f7b272ce0ce16eb6a593b107 to your computer and use it in GitHub Desktop.
Save shawwn/64e17ac3f7b272ce0ce16eb6a593b107 to your computer and use it in GitHub Desktop.
# Some cliff's notes on installing empy on a new machine. Haven't tested it yet.
pip3 install userpath
# install y
git clone https://github.com/shawwn/y ~/ml/y
# add y to PATH
userpath append ~/ml/y/bin
exec $SHELL
# verify y works
y -e '(concat "foo" "bar")' # "foobar"
# set up scrap
git clone https://github.com/shawwn/scrap ~/scrap
# add scrap to PATH
userpath prepend ~/scrap
exec $SHELL
# set up emacspy
git clone https://github.com/shawwn/emacspy ~/ml/emacspy
cd ~/ml/emacspy
pip3 install cython
make
# you'll need emacs >= 27 for dynamic modules support. Ubuntu 18.04 only ships emacs 26,
# so let's build our own.
git clone https://github.com/emacs-mirror-emacs ~/ml/emacs
cd ~/ml/emacs
sudo apt-get install texinfo gnutls-dev libncurses-dev -y
make -j96 # don't you have 96 cores? https://i.imgur.com/YtJ8jF7.png
# now that we've built a custom emacs, how do we get y to use it?
#
# for convenience, y tries to use `emacs-head` if it's on the PATH, then `emacs` as a fallback.
# so let's symlink our custom-built emacs somewhere on our PATH as emacs-head:
ln -s `realpath src/emacs` ~/scrap/emacs-head
# now emacs-head --version should report 29 or so.
emacs-head --version
# fire up an empy repl
empy
# with any luck, you should be able to run F.buffer_list()
# https://i.imgur.com/X2HP4lD.png
# notes:
# call (point) using F.point()
# run (point) using E("(point)")
# make symbols using Q.point
# If you want to run e.g. (1+ 3) you can do it like: F["1+"](3)
# Access variables by e.g. V.default_directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment