Mostly technical stuff with some interesting moments of life

Scheme Way: Eclipse Plug-in

15 comments
I thought of searching for an IDE for Scheme, after being bit lazy to learn Emacs. Lucky enough I found a nice plugin for Eclipse named SchemeWay. It took me a bit of time, however, to configure and set up the plug-in to work as I like.

If you are struggling to set it up (as I did) here are few steps to help you with.

1. Download Eclipse from http://www.eclipse.org/downloads/. I chose the classic version

2. Download SchemeWay update pack from

3. Unpack the UpdateSite-1.3.0.alpha7.zip and copy the stuff inside plugins and features folders to eclipse features and plugins folders.

4. Start Eclipse and go to Help --> Install New Software.

5. Click Add on the on the Install window you get. It will give you a small window with two text boxes.

6. Click Local next to the Name text box. Now you can browse to your extracted folder of the SchemeWay update pack.

7. After couple of Ok presses Eclipse will show that it found the SchemeWay plugin. Then go ahead and install it.

8. Once everything is done, you can switch to the Scheme perspective from Window --> Open Perspective --> Other --> Scheme

9. Next task is to set the Scheme interpreter. I use the free version of Chez Scheme (i.e. Petite). So I have to set my interpreter as an external interpreter. To do this click Scheme --> Select Interpreter --> External Interpreter.

10. Now you have to give the necessary parameters to the plug-in to start your interpreter. To do this click Window --> Preferences. It will show you the preference window. On the left hand side of it you can expand the Scheme configurations. Select the External Interpreter configurations from there and set the necessary parameters.

Great! now you are good to go. Just create a new project and add a new Scheme source file. Then once you are done with typing your code, you can load it to the interpreter using CTRL+SHIFT+L.

You can play around a bit and get use to many other key short cuts.

One thing to note: you will have to set the indentation for some definitions to suit your style. You can do this by going to the same scheme configuration from Window --> Preferences.

15 comments :

  1. Thanks. I was searching for some thing similar.

    ReplyDelete
  2. I am trying to install schemeway alpha11 version somehow it doesn't work. eclipse complaining that he can't open scheme prespective. Is there a way to work this out. Thanks

    ReplyDelete
  3. Thanks - Will you tell if I can use scheme (fuzzy logic) and write a code for an expert system with 3 input and 1 output and use this output to make routing decision in a routing protocol written in C/C++. If this is true how I can connect scheme output to eclipse project in above case. Best Regards

    ReplyDelete
    Replies
    1. Khuram,

      I am not sure if I understand what you really want to do?

      Thanks

      Delete
    2. Can I install C/C++ fuzzy logic library in eclipse? I think I could not install Scheme as I need to install java. Due to some interdependence problem i want to focus on C/C++ Fuzzy library as I am working on C/C++ project.

      Delete
  4. I had encountered following error:
    Cannot complete the install because one or more required items could not be found.
    Software currently installed: SchemeScript Feature 1.3.0.alpha7 (org.schemeway.features.schemescript.feature.group 1.3.0.alpha7)
    Missing requirement: SchemeScript Plug-in 1.3.0.alpha7 (org.schemeway.plugins.schemescript 1.3.0.alpha7) requires 'bundle org.eclipse.jdt 0.0.0' but it could not be found
    Cannot satisfy dependency:
    From: SchemeScript Feature 1.3.0.alpha7 (org.schemeway.features.schemescript.feature.group 1.3.0.alpha7)
    To: org.schemeway.plugins.schemescript [1.3.0.alpha7]

    ReplyDelete
    Replies
    1. I haven't encountered this. Perhaps this might help https://wiki.appcelerator.org/display/tis/Installing+the+Java+Development+Tools

      Delete
    2. I have installed java Development Tools but now facing memory problem. Mostly, Eclipse and Omnet++ are same but after i find equivalent of eclipse.ini in omnet++, I will increase the memory size of 256MB.

      Delete
  5. Thanks Saliya Ekanayake! I have setup scheme. However, I do not know how to use interpreter. I have installed petite chez scheme and can run example in it. but how to load this interpreter so that i could write and compile scheme program is not clear to me.

    ReplyDelete
    Replies
    1. Great work Khuram!!. If you need to load petite from command line, you could just type petite to start the interpreter. Then you can use the following command to load your scheme program.

      (load "path-to-your-scheme-file")

      This is the best tutorial I know http://www.scheme.com/csug8/

      You can point to petite interpreter from Eclipse, so you can just run from it without having to call from command line. I've hardly used this feature though because I used Eclipse just as an editor only.

      Anyway, let me know if you run into issues with this.

      Delete
    2. Thanks your blog is very helping. Could you be able to send expert system example including inference engine? for example 3 input and one output, related to anything but routing would be a great help. Thanks for patience and support.

      Delete
    3. Hi Saliya, first of all thanks for your blog, its a great help.

      I have one question though, I have setup Eclipse Plugin successfully, But I am not able to run scheme programs from eclipse, I mean in above comment you told, we can point to petite interpreter from Eclipse, and we can just run from it without having to call from command line.

      I want to do that. I tried but could not succeed.
      In Eclipse Preferences, Scheme-> External Interpreter...
      It shows ..
      Interpreter Name
      Command Line
      Working Directory
      and others...

      I tried giving few values like directory where my interpreter in installed, name of command/interpreter exe name..but its not working.

      Have you tried this. Can you guide me in that direction?

      Thanks for your help again.

      Delete
    4. Hi Pramod,

      Glad to hear this helped you.

      I'll be happy to help, but could you please explain a bit on what exactly it does when you try to run your program? Does it give any error message?

      Btw. I assume you have path to petite interpreter in your PATH environment variable. Also, you'll need to type petite under Command Line.

      Let me know how it goes.

      Delete