How to customize edwin editor on mac? - scheme

I was following this tutorial: https://groups.csail.mit.edu/mac/users/gjs/6.945/dont-panic/ (section 3.4.2) to get the edwin editor setup on my mac where they use the following file: http://web.mit.edu/6.945/dont-panic/.edwin for customizing the editor. However, I am unable to proceed using the instructions they have provided.
I cannot find the .edwin file on my mac and the wget command does not work. I was wondering if there was a different way of doing this. Any help would be appreciated. Thanks!

Until you create this file on your machine, it will not exist. This seems rather obvious.
Until you install a wget binary from somewhere, there is no wget binary on your mac, so of course the command "does not work".
Failing actually installing a copy of wget, use curl, which ships on the mac.
$ curl -o .edwin http://web.mit.edu/6.945/dont-panic/.edwin

Related

Mac OSX Terminal not Recognizing installed CLI Tool

I'm trying to literally download and run the ElectronNet demo (found here). I install the CLI tool, which appears to be accomplished successfully, but when I try to use the tool, terminal does not recognize it. Shown below:
% dotnet tool install electronnet.cli -g
Tool 'electronnet.cli' is already installed.
%electronize start
zsh: command not found: electronize
What could be going on here?
I guess it's something with your path&zsh,
if you try:
~/.dotnet/tools/electronize start
is that work for you?
If so, you can fix your path by editing ~/.zshrc, add this:
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet/bin"
and source the file by running: ". ~/.zshrc"

Using Bash insteal of Perl? (bashrc)

I was using a bash script in my bashrc and until now everything worked.
Today, i decided to install Perl on my computer (since I'm looking to learn the language) using the method on the website learn.pearl
curl -L xrl.us/installperlnix | bash
(urls are not accepted )
The problem is that now, my script doesn't work anymore, I'm having the error:
"no such file
export PERLBREW_BASHRC_VERSION=0.78"
I tried to use the command "perlbrew switch-off" but it seems that I don't have the program perlbrew installed, and my bashrc is starting with #!/bin/bash so I'm completely lost on you to fix the problem.
I would appreciate some help.
Thanks !
Make sure that you got everything to download the perlbrew, like curl or wget, it is simple to check, try one of theses:
which curl
which wget
If you have one of them you are able to download, otherwise you will need to install either curl or wget.
The latest realease of perlbrew is 0.78.
After theses first steps try to download it again as you did.
There is a mini tutorial which you can use as a guide:
https://perlbrew.pl/
Also I am not sure if you have it installed so you could use:
which perlbrew
To find out if you have it or not. Maybe you forgot the step as describe in the perlbrew site:
sudo cpan App::perlbrew
perlbrew init
Because it seems like your environment was not set yet.

how can I run shell script line by line [duplicate]

I'll love something like Microsoft Visual Studio's line-by-line debugging in bash, with current variables values and so.
Is there any tool or way to do it? set -x and set -v are nice but not perfect.
See bashdb.
If it's installed on your system, see man bashdb.
If it's not installed, see http://bashdb.sourceforge.net
Yes. Use "bashdb" from http://bashdb.sourceforge.net/
Latest version at time of writing
http://sourceforge.net/projects/bashdb/files/bashdb/4.2-0.8/
If you are on a Mac (like I was) then you might need to install the GNU version of Bash.
I did that using "MacPorts"
http://www.macports.org/
Once you have MacPorts...
port install bash
Then follow the instructions to
./configure (in bashdb unpacked directory)
make
sudo make install
Then add the folder where bashdb can be found in your PATH

Is it possible to debug bash scripts line-by-line?

I'll love something like Microsoft Visual Studio's line-by-line debugging in bash, with current variables values and so.
Is there any tool or way to do it? set -x and set -v are nice but not perfect.
See bashdb.
If it's installed on your system, see man bashdb.
If it's not installed, see http://bashdb.sourceforge.net
Yes. Use "bashdb" from http://bashdb.sourceforge.net/
Latest version at time of writing
http://sourceforge.net/projects/bashdb/files/bashdb/4.2-0.8/
If you are on a Mac (like I was) then you might need to install the GNU version of Bash.
I did that using "MacPorts"
http://www.macports.org/
Once you have MacPorts...
port install bash
Then follow the instructions to
./configure (in bashdb unpacked directory)
make
sudo make install
Then add the folder where bashdb can be found in your PATH

Trouble trying to install MIT-Scheme on MacOSX Snow Leopard

I am trying to install MIT-Scheme so that i can use it off my terminal instead of using an IDE, however, I am having difficulty trying to find tutorials that are actually up to date and works.
You can install MIT Scheme through Macports, and it will probably take a long time (it's compiling it from source, I think). You can also get a precompiled binary from here which will install an MIT-Scheme.app which starts Edwin an Emacs port or something which includes a Scheme debugger and REPL. But you can also start it from the command line.
Check to see where it installed to, on my machine it's here /Applications/mit-scheme.app/Contents/Resources/ but that might vary. Add this directory to your PATH by editing ~/.bash_profile and adding this:
export PATH=$PATH":/Applications/mit-scheme.app/Contents/Resources/"
Check with which mit-scheme to make sure it installed correctly.
As for Racket, there's also a precompiled binary available from here. (It might be in Macports but it might not be, or in Fink, I don't know. I try to avoid those and use Homebrew if possible.) This is a dmg file which you can extract and put wherever you want. I put mine in ~/bin and added ~/bin/racket/bin/ to my PATH as well, same process as above, but you can put it anywhere, /Applications/ or whatever.
Good luck.
This seems like a odd answer since it's about Racket for a question that was originally about MIT Scheme, but since you tried Racket too...
To run Racket from the terminal, you need to use the racket executable, which is found in the bin subdirectory. For example, if you install it at /Applications/Racket-5.1, then you'd run /Applications/Racket-5.1/bin/racket. (And you could modify your $PATH or add some symlink to make it possible to run without specifying the full path.)
You can find the detailed answer here.
Here is a short version:
Download .dmg file of MIT-Scheme. 32-bit or 64-bit based on your hardware architecture.
After installation run the following commands
For 32-bit package:
sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-i386
sudo ln -s /usr/local/lib/mit-scheme-i386/mit-scheme /usr/bin/scheme
For 64-bit package:
sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-x86-64
sudo ln -s /usr/local/lib/mit-scheme-x86-64/mit-scheme /usr/bin/scheme
To run MIT-Scheme from your terminal just type 'scheme' in the command prompt.

Resources