How do I use Eclipse for Scheme development? - eclipse

Has anyone succeeded in running and debugging Scheme with Eclipse?
I've tied several plug-ins (scheme 48, schemeway) and couldn't get them working. I'm not sure why they won't work; I downloaded an interpreter (kawa, mit-scheme) and tried to configure it in the plugin but nothing happened (except that mit-scheme threw some errors).
I know there is another way - Racket, but I prefer not to use another IDE. I work with many languages and I'd like to be able to use one IDE for all of them.
Any suggestions?
EDIT:
I tried to run the simplest .scm file (that has only (+ 1 1) in it). By configuration of the plug-ins I mean that I choose an external interpreter and then choose the kawa/mit-scheme interpreter exe file. When I choose kawa with schemeway it open a new window and waited for my input (I didn't have any input - JUST wanted to run the file...). When I did it with mit-scheme interpreter I got this error...
I am using linux-centOS 6.

Found the solution - here it is if someone else will encounter the same error:
There are 2 step when trying to work with Scheme 48 in Eclipse:
install the plugin - just follow http://s48.org/sdt/
install the interpreter - I finally found 2 that I can work with :
Scheme 48 (I use ubuntu so I typed scheme48 in the command line and it gave me the package that I need to install (I think it was
sudo apt-get install scheme48)). Then open the preferences in
Eclipse and go to scheme48->interpreter and check that the
command line is scheme48.
guile - I think that it is supported by gnu. It also the one I prefer. It had less errors and more understandable error output in the consul. Again, to install it I just typed guile in the command line and it gave me 3 versions. I installed 1.8. after installation I created a scheme project and a simple file. go to the preferences and changed the command line to "guile" and the working directory to the path of the project I just created. to load the file just search for the load file into interpreter button (or press Ctrl+F6).

Related

Can't install neovim in windows

I want to have neovim. I installed it with choco install neovim in the PowerShell (admin). Then I followed a lot of tutorials, like the one of theprimeagen, but I can't get pass the first steps. Maybe is because I don't have Linux, as everybody does, but I don't think is that.
I created a folder like so: C:/users/myusername/.config/nvim. Then, in this folder I type nvim . to open the Explorer of neovim and start creating the .lua files. The problem is that I always get a stupid .nvimlog every time I enter neovim, I think is the reason why I can't install plugins correctly or remap some keys.
In the .nvimlog every time I enter neovim appears a new line that says:
ERR 2023-02-12T12:55:04.800 nvim.15716.0 terminfo_start 374: uv_tty_set_mode failed: invalid argument. And I swear I followed every tutorial in the exact way, and even without creating any file the .nvimlog is always there.
In windows, the default config directory is ~/AppData/Local, based on their official documentation. I don't know if there is a way to change that, but that is how i configured it.
To find out where your config directory is you can also use :echo stdpath('config').

use c++11 on mac os x mountain lion with eclipse (Juno or Kepler)

hey everyone I am just starting to use c++11, which I need for uni, a have a mac and I am familiarise with eclipse (I have both Juno or Kepler with CDT), but as much as I tried I can not run properly any c++11 features in eclipse or compile any code, there is someone that has been in my same position and please help me, seriously I already try all the previous threads about, but for my frustration i am still compiling everything on terminal and editing all in gedit with is not the most confortable way, by the way I have to compile with g++-4.7 as command not g++ meaning that still I have the old OS gnu,please someone just explain me step by step what to do I am terribly frustrated, I beg!!!!
ps. just clarify i install gcc 4.7 with homebrew but the path is different than the original (/usr/local/bin instead of the regular /usr/bin which I believe eclipse use and the reason I can't work with it, thank you for all guys)
Well after trying different things and expending tedious time fixing my issue I will answer my own question with the hope someone with my same needs will not experiment such annoying situation.
First as in a lot of forums remark and is well know the gcc compiler provided for the Mac OS is old and obsolete (more than 5 years old is a lot in computing terms), so first step to work with c++11 is to get a new version of the gcc.
There are two options with the packets common managers (homebrew and macports), I have to say that I was that frustrated that i tried both to see if was a problem of the version in the packet manager even thought should be the same, but for my surprise there is a small difference which later I will explain, which bring me to suggest use macport because with macports the eclipse will work as smooth as with the old c++ while with the installation with homebrew the compilation will be the same than the macport but eclipse will complain about the new grammar in the c++11 (eclipse will tell you that the resource couldn't be resolve, even do compile properly ).
The steps for this are assuming you have the command line already:
download the appropriate macports from the official web page(google it)
in terminal type the following commands
sudo port selfupdate
sudo port upgrade outdated
sudo port install -d gcc47
port select --list gcc
with this you have gcc and will show you which are the gcc installed in you mac now just missing select as defauld the new gcc, do it with.
- sudo port select gcc mp-gcc47
3 having install in my case eclipse kepler create a new C++ project, but instead to left everything standar do the next:
- in the wizard window select as toolchain the cross GCC as the toolchain(for example ni the executable Hello World c++ project), put a random name and next , following window press next now here in the window for the selection of the compiler give the path for the new gcc(the default is /opt/local/bin) as prefix leave it empty and press now the finish bottom.
4 Now go to project properties and in c/c++ build select settings and in the tool settings tab go to miscellaneous in cross g++ compiler and in other flags add -std=c++11.
5 by the last go to c/c++ general -> paths and symbols and select the tab symbols and in select the gnu c++ language and press add to type GXX_EXPERIMENTAL_CXX0X as name just that and press ok.
Now just press apply and ok, after that your mac should be running c++11 in eclipse.
Hope works for you as for me see you around guys.
Note probably you will be to configurate the run but it is more simpler than you thing just go to run -> run configurations and double click in c/c++ application now almost everything is generate for you just you have to fill up the first label with the path to the out put of the compiler (I asumme that you already build the project which will generate the executable file ) normally that file is in the debug folder of the project with the same name than the file compiled n does all.
have a good one guys.

How to open Eclipse -- tegra development pack -- in ubuntu

After i installed "tegra development pack" on my ubuntu, the installation opened eclipse IDE for me and then i closed and then figured out that there isn't any shortcut or anything i could launch it from.
Update:
I followed "Venzen" solution till step 3 and used the filtering command. That showed me that there is another folder named "NVPACK" is located in username > NVPACK > eclipse which I didn't know about, I kept locking tipping in "eclipse" in the terminal.
Also, there is something stupid I did I would like to share; what happened here is that I kept looking at NVPACK installation folder at windows files not in linux files. (I'm using ubuntu in windows).
You could open a terminal and try to launch Eclipse from the command line:
$ eclipse
If this does not work it could mean that the eclipse binary was installed somewhere outside of your PATH and you will have to look for it. I am not familiar with Tegra, but here is a general purpose "process of elimination" to find a file in *nix:
update the locate database
$ sudo updatedb
use the which command to interrogate the updated locate database
$ which eclipse
you should have found it by now. If you haven't all is not lost - run the locate command just for good measure
$ sudo locate eclipse
locate could potentially output lots of matches since it outputs any match to your search term whether its a file or a folder. If the output of locate scrolls off the screen then use grep to filter out only matches where eclipse is a file:
$ sudo locate eclipse | grep '.*eclipse$'
If this produces several matches then choose the eclipse file which resides in a bin folder.
If, by now, a file called eclipse has not yet shown itself, then there are 2 more options left - a long way and a short way...
use the find command
post the method (or source) from where you installed
either way, kindly post here should steps 1-3 above not reveal eclipse.

Emacs + GDB + SCons + Step through Debugging

When compiling a project via a makefile using the Emacs compile command, when gdb is run on the resultant binary the application can be stepped through. However, when building using a large project with SCons, attempting to step through does not work in that Emacs doesn't seem to know which files to load or how they're related to the binary.
What does one have to do to do step through in Emacs? If Emacs can't support SCons natively then how can this be done manually; make must be using some mechanism to alert Emacs to a file's presence.
Are you sure your make and scons compile options are the same? It sounds like your scons build is lacking debug symbols (in gcc, use the -g option).
I don't use Scons. I can't help but ask if you have done the Scons IDEIntegration as given in the Working within Emacs and XEmacs section. It says Scons builds in a different directory that Emacs does not look at by default, so you have to move the files to make Emacs look at them. But that is for navigating through build error messages. I hope it works for gdb too.

How can I make Pygame work with Pydev?

I'm working off the latest Mac OS trying to set up my programming environment. Right now what I want to do is to get Pygame working with Pydev so I can do my Python programming from Eclipse. What I've done so far is installed Python 2.6 from python.org and then installed pygame 1.9 from the site.
What happens is that when I try running Python from the command line, I am able to import pygame without a hitch, but when I try to do the same thing from Eclipse, it doesn't work.
I think it might be because Pydev doesn't know where to find Python, in which case I would like some help on how to make sure it's pointing to the right one.
Thanks!
I work with Eclipse on Windows, but I believe that the Mac version eclipse should be the same.
In Eclipse,
click Windows > Preferences,
expand PyDev from left side,
find Interpreter - Python,
switch to Libraries tab,
click New Folder on the right hand,
navigate to your pygame path, and
click Apply and OK.
Turn to your Python project in eclipse,
right click on it,
choose PyDev - Interpreter/Grammar,
choose Python as Project type,
choose 3.0 or your correspond Python version from Grammar,
at last make sure the Interpreter you are using is the same as the one you just configured.
Build your project from eclipse, and it should work.
In Eclipse, Window->Preferences, expand Pydev and choose Interpreter - Python. Then specify your python path. Try first by clicking "Auto Config" to auto-locate your python installation. Then click Apply and Ok.
Make sure this much works by creating a new Python project (without worrying about Pygame yet).
I tested these instructions from Eclipse Helios on Windows. Hope it works for you.
http://www.vogella.de/articles/Python/article.html
If autoconfig is not finding 2.6 you can add it manually at Preferences/PyDev/Interpreter - Python. There you have to press New and set the path for your Python executable.
For Python2.6 the path is: /System/Library/Frameworks/Python.framework/Versions/2.6/bin/Python2.6
For Python2.7 (and higher), the path is different:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Those paths work on OS X 10.6.8, might change for other versions.
Do what the people says, and if that does not work, make sure that you have downloaded the development package.
On menu Window > Preferences > PyDev > Interpreters > Python Interpreters
If your python interpreter config have a pygame and don't work, try to put on force bultins the new keyword "pygame"
Python part
Install Python 3.5.2 32 bits (From python.org)
Download the right pyGame library for 3.5.x 32 bits (It will be pygame-1.9.2b1-cp35-cp35m-win32.whl)
Open the system console and go to the folder where the library was download.
Write in the console: pip install pygame-1.9.2b1-cp35-cp35m-win32.whl
This should install the pygame library.
Note: If the pip version is not the last one, upgrade it. (In this step you should know how, just pay attention.)
Eclipse Part
Open Eclipse
Go to Help>Install new software.
Look for the botton "Add" in the right top corner.
In Location put http://pydev.org/updates. Put a cute name, too. Then click OK.
Check pyDev checkbox. Go next, Finish. Accept licenses. In simple words: Install it.
Go to Window>Preferences>pyDev>Interpreters>Phyton interpreter.
In the Python interpreters part, click Quick Auto-Config.
Note: If you want to do this manually, you should know the path where you installed Python and search for python.exe
Some libraries should manifest in the libraries tab. Click apply.
In the libraries tab, click New Folder.
Search for PyGame installation path (In my case, C:\Python\Python35-32\include\pygame but it's always on Python installation path plus include\pygame, ok?)
Click Accept.
Go to Forced Builtins tab. Click New... and add 'pygame'.
Apply again ! (You should know that I do this only for safety. You can apply just one time.
Click OK.
Test
File> New> Proyect...> PyDev> PyDev Proyect.
Click Next
Complete the Proyect Name. On Grammar Version combobox, select 3.0 - 3.5 and in interpreter choose python.
Note: "Quick Auto-Config" named "python" to the interpreter. If you did this part manually, you should know the exact name because you named it.
Try simple code
import pygame
print(pygame.ver) # This should print the pygame version.
pygame.init() # This does nothing by now, just checking code.
I wasted forever trying to get this to work as well..
I eventually found these steps (you don't need them all just part of my struggles shared).
in Python Shell:
import sys
print (sys.path)
Noticed NO PYGAME in path.
Eventually I GAVE UP on the .exe binaries and was told to use .WHL files and Python PIP to install. but was told NOT VALID wheel file. (frustrating).
what EVENTUALLY WORKED was to (in windows, but similar should work in other OS's).
run Command Prompt as Administrator (just to be sure) Maybe same in other OS's. you'd have to try.
from C:> i Changed Dir to my Python.exe (or the python program itself).
from my python directory in command prompt I typed the following (Like I would a Linux apt-get install command):
**
python.exe -m pip install pygame
**
Shortly after, there were hash marks ##### indicating a download was taking place (Linux type progress bar in shell).
in ECLIPSE without ever changing the Libraries folder to include PyGame folders I was able to run a sample Python PYGAME Script sample (I got a white screen but haven't gone further yet). I was just HAPPY to not have to see the trace back error message :)
now I am finished typing this to you I will be going to test it out further.
Just thought this would help someone :0)
I met such problem in Python 3.6 using LiClipse (which should be similar as Eclipse). It's solved by import pygame as
import pygame
from pygame.locals import *
Then add the pygame folder to Window>Preferences>PyDev>Interpreters>PyDev>Libraries, type in 'pygame' in the Forced BuiltIns tab at the same page, also right click the project, change Properties>PyDev-PYTHONPATH>Source from {proj_dir_name}/ to {proj_dir_name}/src
Maybe some above steps are not necessary. Anyway doing all aboves solves the problem in my case.