Ocaml. Core module in OcaIDE eclipse - eclipse

I started programming with Ocaml few days ago.
I use eclipse OcaIDE, ubuntu.
When I try to use the Core module in a code :
open Core.Std
...
I get an error:
Error: Unbound module Unix
I tried to create .ocamlinit file with adds:
#use "topfind";;
#thread;;
#camlp4o;;
#require "core.top";;
#require "core.syntax";;
The same error occurs in eclipse.
Сode without the use of the modules run fine.
Please, tell me, what I have to do?
Sorry for bad english.
Thank You for your answers!

OCaIDE is not wide-spread in OCaml community, so it is not well supported. Try to use emacs or vim. If you insist on using OCaIDE, then a good place to start is to view tutorials.
P.S. Even if you manage to configure OCaIDE it will be still much worse than Emacs+Merlin.

Related

configuring the interpreter for eclipse 4.6.0

I am trying to start a new PyDev Project and first need to setup the interpreter. The auto-config does not find a "valid interpreter". And so I must manual config. Perhaps someone with experience in this procedure knows of the specific name for the Interpreter Executable I am looking for. Thanks!
To get the interpreter you need to use, start the python interactive console in a shell and then do:
import sys; print(sys.executable)
The path printed is the interpreter you should use.
As a note, PyDev 4.6.0 is pretty old already, so, my suggestion would be upgrading to the latest release as many things were improved in the meanwhile.

On using Lingua-TreeTagger-0.06

I am very, very new to NLP and the like. Therefore, I have a very basic question. I want to POS-tag an corpus of files with TreeTagger using a Mac OSX 10.6.8. I have installed TreeTagger by using the instructions provided at http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/
[I installed it in /Applications]
Then I have installed Lingua-TreeTagger-0.06 for 'for calling the TreeTagger and manipulating its output'. This took a lot of effort to do.
[I installed it in /Applications]
I think I have succeeded in the previous steps. Now what? I mean how do I call Tree-Tagger?
Thanks to anybody who could help me?
mc
Lingua::TreeTagger is a Perl module that is useful only if you want to use TreeTagger from within a Perl script. Examples of how to do so are given in the module's online documentation. Otherwise you should call the tree-tagger application from the terminal as commented by Patrick J.S. above (unless you are on Windows, where a user-friendly graphical interface is available).

Eclipse IDE: How to add this configuration during running?

For running of one of my C++ programs, using terminal(Ubuntu) I use
Note: I'm trying to Embed Python in C++. Hence, PYTHONPATH in C++.
Refer to Python/C API for more details.
$ PYTHONPATH=. ./prog_name
Sorry, I didn't know how to ask this question on Google. I want to do the same running with Eclipse. I don't know where to specify PYTHONPATH=. during running from Eclipse. How to produce the equivalent of this? I tried putting in argument list, but obviously it didn't work. Thanks!
PS. Don't downvote just because you don't understand that python scripts can be called through C++ .. Lol
Hi to all those facing the same problem, i found the solution!
setenv() is a function defined in which sets the environment variable. Just have to run it!
setenv("PYTHONPATH",".",1);
for more info on setenv:
$ man setenv
All the best :)

How to Stop Perl EPIC eclipse plugin showing errors

My eclipse tries to compile/build Perl files in my Java project and fails. I installed Perl EPIC just for syntax colouring, how can I get it to ignore errors?
I tried going into Project->Properties->Builders, and uncheck Perl Epic, this didn't change anything.
I'm using Eclipse :Helios Service Release 1
Build id: 20100917-0705
On Windows XP
I have basically the same issue as this question,
How can I set up Eclipse to edit Perl without the runtime checking?
I've been looking into similar issue for quite some time too. Apparently the Epic Perl plugin goes wildly checking anything/folder/file it finds inside the project, so like mine where I have config files, data directories, it goes inside and tries to validate "perl stuff", which evidently is an annoyance: the error log view displays a lot of useless information.
Did you try to uncheck the "Perl Auto Builder" ?
I'm not parsing this sentence in the context of your question: "My eclipse tries to compile/build perl files in my java project and fails."
Are you saying that you are running perl as a java project, and getting the inevitable error message because it is not java? Just wondering why you don't want to have your perl program set up as a perl project possibly referenced by your java project, assuming that that is what you are trying to do.
Generally, when I set up a perl project, I edit its properties and set its includes to match the current directory or local module paths. Assuming that there are self-written modules I must call, and they are not located on this machine (e.g. I wouldn't have FOO::smb on a windows machine -- it makes no sense. When I am developing for linux, I will put all my functions in there for convenience's sake)
In that case, I create a FOO directory in the workspace, and create a dummy FOO::smb module with however many stub functions in it to get me going and let my syntax highlighting and error checkign do their proper jobs for me. If I write dummy subs to match the real modules well enough, I can debug my scripts somewhat before uploading them. I figure that I should be well enough aware of what they are supposed to do anyway.
I will go so far as to dummy out CPAN modules assuming that installing them on my development workstation makes no sense or is impossible. Highlighting and syntax checking are both invaluable tools, and finding a way to make both of them work saves my sanity.

How do I enable PerlCritic support in Komodo IDE 5.1 on Windows?

I'm trying to enable PerlCritic support in Komodo.
The official word from ActiveState, the makers of Komodo IDE 5.1 (Win 32) is:
"To enable PerlCritic support, please install the 'Perl-Critic' and 'criticism' modules."
Well, installing Perl-Critic was a piece of cake:
ppm install Bundle-Perl-Critic
However, I've search every repository in PPM4, (trouchelle and the usual suspects) and they don't seem to have the module called 'criticism'. I've installed lots of modules using CPAN and PPM, but this module proves to be the most elusive so far. Am I missing something here?
Has anyone got any luck enabling PerlCritic support in Komodo 5.1 on Windows? Hope to hear from you. The feature works perfectly in MacOS and Linux though...hmmm.
The criticism module is available on CPAN, and is used as a pragma.
Basically, use of the pragma in your code runs your code through Perl::Critic before each execution, it's an alternative to using the perlcritic command-line tool.
Here's an except from the documentation:
This pragma enforces coding standards
and promotes best-practices by running
your file through Perl::Critic before
every execution. In a production
system, this usually isn't feasible
because it adds a lot of overhead at
start-up. If you have a separate
development environment, you can
effectively bypass the criticism
pragma by not installing Perl::Critic
in the production environment. If
Perl::Critic can't be loaded, then
criticism just fails silently.
ppm install criticism should work with ActivePerl. What error do you
get when you try it?
Once the two modules are installed in the current version of Perl that
Komodo is using, the Perl-Critic options in [Preferences|Language|Perl]
should be enabled.
You still can install modules on ActivePerl with CPAN shell. Of course, you would not be able to install C-based modules if you don't have MSVC (free version is available) or gcc (ppm install gcc), but in your case, criticism is a perl-only modules.
P.S. Which version of ActivePerl do you use?
I downloaded the criticism.pm directly from CPAN - criticism and copied it into the Perl library folder and now it works. However, it didn't work immediately. I had to restart Komodo a few times before the settings took effect. Weird. Anyway, thanks guys for all the suggestions.