Page 1 of 1

IDE help

PostPosted: Sun Nov 28, 2010 1:47 pm
by Dr_Asik
Hello,

first I think Cobra looks absolutely awesome, thanks a lot to all involved in its creation!

I am having the following problems with it:
I have compiled hello world, but I try to run it, the runtime throws an exception: cannot find Cobra.Lang.dll.
To compile a program composed of multiple source files, is it as simple as cobra file1 file2 file3 ?
I have installed the auto-completion plugin suggested at http://cobra-language.com/trac/cobra/wiki/Notepad%2B%2B , but when I started Notepad++ it said it "This ANSI plug-in is incompatible with your Unicode version of Notepad++". Should I even continue using Notepad++ or is there a better alternative for Cobra on Windows?

Re: IDE help

PostPosted: Sun Nov 28, 2010 2:44 pm
by Dr_Asik
Ok I found the answer to my first question on this forum. I re-ran the install_from_workspace as administrator (am on Windows 7 64-bit) and it fixed the problem.

Re: IDE help

PostPosted: Sun Nov 28, 2010 4:39 pm
by Charles
Sorry about the installation problem. We need to do something to detect that situation and report it. Patches are welcome.

The ANSI vs. Unicode issue is a general Notepad++ issue. If you search the web for it, you'll find more information, such as this solution here. Also, maybe you can open the files in some editor and save them back as Unicode to address the issue.

We don't have an official editor recommendation for Windows. I've tried a few and they all have pros and cons. Also, I always have to take a few trips through any editor's options before I get it behaving the way that I prefer. Currently, I'm using gedit and PSPad. I used to strongly prefer gedit but I have had a couple issues with it lately: copy-and-paste stops working after awhile and syntax highlighting is sometimes erroneous. I have hadn't had time to look into these.

Matthew Strawbridge has gotten syntax highlighting working for Visual Studio 2010 which should make for a nice editing experience. I have not yet investigated if it works with the free Express Edition which would be interesting to know.

Re: IDE help

PostPosted: Sun Nov 28, 2010 9:14 pm
by Dr_Asik
Thanks a lot for the support, I will look into the VS integration.

If I may make a suggestion, I'd venture to say the lack of IDE integration is a major gripe for several developers (such as myself). To me, for instance, C# is productive not simply because the language is clean and logical, but also because intellisense works reliably and I don't have to leave the editor to do most things. So I'd say it should be a priority to get at least debugging and code completion working under a popular editor like eclipse or vs.

I know it's easy to say that when you're not contributing to the project, but take it as a "first impressions" of someone encountering Cobra. "This language is awfully nice. DAMN no debugger!" :mrgreen:

On the positive side I was so pleased with this warning: "Unnecessary parentheses. You can remove them." That made my day. :D

Re: IDE help

PostPosted: Sun Nov 28, 2010 9:52 pm
by Charles
Glad you like the language. Debugging is there for the most part as .NET/Mono debuggers work from the byte code. So autocompletion/Intellisense is the big gap.

A trick you should know is that if you compile something like "obj.co" where "co" is an incomplete method name, then the Cobra error will include suggestions based on it. Not as slick as autocompletion, but still comes in handy.

You should find other errors and warnings also come with helpful hints.

Re: IDE help

PostPosted: Sun Nov 28, 2010 10:22 pm
by Dr_Asik
Yeah I noticed the compiler suggests similarly named methods, it did help me several times already.

Charles wrote:Debugging is there for the most part as .NET/Mono debuggers work from the byte code.
Do you mean it is possible to actually debug a Cobra program under a specific editor right now? I didn't see any reference to that in the wiki pages.

Re: IDE help

PostPosted: Sun Nov 28, 2010 11:00 pm
by hopscc
If you haveknow or use an editor that has integrated .Net/Mono debug support then it should be able to debug cobra source with it just as if it was C# source( cobra source gets translated to C# source and compiled, line number info etc is all preserved).

I dont use such an editor but I've had mixed results with the standalone debugger (mdbg) but I put that down to platform, system and Wndows general weirdness.

Theres more on IDE support on the wiki page IDESupport

Re: IDE help

PostPosted: Mon Nov 29, 2010 12:42 am
by Charles
Also see the Debugging Topics wiki page.

And if you make any discoveries along the way, please feel encouraged to contribute to the wiki. The login is the same as your forums username and login.

Re: IDE help

PostPosted: Mon Nov 29, 2010 1:38 am
by Dr_Asik
Charles wrote:Also see the Debugging Topics wiki page.
Holy cow. It works. So now I got syntax highlighting + debugging in VS2010. This is starting to smell good. :mrgreen: