I thought I would start a new thread for this topic.
We have a wiki page here where we can put some notes and tips.
http://cobra-language.com/trac/cobra/wiki/MonoDevelop
But in particular, it then points to the github page hosting the Cobra add-in which currently works with MonoDevelop 2.8 including syntax highlighting, compilation and interactive debugging. User nerdzero got this going.
Forums
MonoDevelop Cobra add-in
36 posts
• Page 1 of 4 • 1, 2, 3, 4
Re: MonoDevelop Cobra add-in
Feedback. In the add-in implementation, this code here:
Could first check for an env var called COBRA_EXE and if not null, not blank and not missing, use that. In this way, people can dictate the Cobra compiler the add-in uses through an env var. README.md would mention it.
- Code: Select all
if (_isWindows) {
//gross, you probably also have to run MonoDevelop as admin
proc.StartInfo.FileName = "c:\\cobra\\bin\\cobra.bat";
}
else {
proc.StartInfo.FileName = "cobra";
}
Could first check for an env var called COBRA_EXE and if not null, not blank and not missing, use that. In this way, people can dictate the Cobra compiler the add-in uses through an env var. README.md would mention it.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: MonoDevelop Cobra add-in
Feedback. I would suggest a slightly beefier Console program template:
This introduces the newbie to comments, string concatenation, assert, trace, print and @help. And it's still easy to gut for any purpose as it's only 6 extra lines.
Also, MonoDevelop's own C# project templates use tabs for indentation. The Cobra compiler, samples and how-to's also use tabs. I would prefer if the Cobra project templates do as well for consistency. Of course, the user can always edit the templates if they want, and down the road we could even have a command to switch them back and forth to make it easy. But in the mean time, I think they should be congruent with the Cobra project and the MonoDevelop C# templates.
class MyProgram
def main
# Hello
msg = 'Hello, ' + 'world.'
assert msg == 'Hello, world.'
trace msg
print
print msg
# @help msg
This introduces the newbie to comments, string concatenation, assert, trace, print and @help. And it's still easy to gut for any purpose as it's only 6 extra lines.
Also, MonoDevelop's own C# project templates use tabs for indentation. The Cobra compiler, samples and how-to's also use tabs. I would prefer if the Cobra project templates do as well for consistency. Of course, the user can always edit the templates if they want, and down the road we could even have a command to switch them back and forth to make it easy. But in the mean time, I think they should be congruent with the Cobra project and the MonoDevelop C# templates.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: MonoDevelop Cobra add-in
All good ideas. What about including a doc string in the template as well?
- nerdzero
- Posts: 286
- Location: Chicago, IL
Re: MonoDevelop Cobra add-in
What about this idea: We keep the Console Project template simple but add a new project template called something like "Cobra Tutorial". This project could then include a lot more sample code to demonstrate asserts, traces, contracts and tests, expression substitution in strings, etc.
So, the console project template would be pretty straight forward like the other console templates for C# and VB.NET
but the tutorial template would then be more comprehensive and showcase a lot of Cobra's features. What do you think?
So, the console project template would be pretty straight forward like the other console templates for C# and VB.NET
"""
Replace this text with a description of your program.
"""
class MyProgram
def main
print 'Hello, world.'
but the tutorial template would then be more comprehensive and showcase a lot of Cobra's features. What do you think?
- nerdzero
- Posts: 286
- Location: Chicago, IL
Re: MonoDevelop Cobra add-in
A doc string is a good idea.
"Console Tutorial" and "Console" project templates sounds like a great idea. It also paves the way for things like "GTK#" and "GTK# Tutorial" tempates.
"Console Tutorial" and "Console" project templates sounds like a great idea. It also paves the way for things like "GTK#" and "GTK# Tutorial" tempates.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: MonoDevelop Cobra add-in
Support for package references has been added and also a basic Gtk# project template has been added. When I get a chance, I will work on solution/project references next, then tutorial templates, then really dig into supporting MonoDevelop 3.0.
- nerdzero
- Posts: 286
- Location: Chicago, IL
Re: MonoDevelop Cobra add-in
this (monodevelop being supported for cobra) is truly wonderful news. thank you.
i'm running win 7 and have MD 3.0xxx installed. i assume you're using MD 2.8xxx?
i found this 2.8xxx alpha trunk build: http://monodevelop.com/Download/Trunk_Builds and installed it, but it immediately wanted some updates from the web. when i said "yes", it updated itself to 3.0xxx . {sigh}
would you please confirm that that trunk build, if i don't fall for the same trick again, is possibly my best bet toward getting your MD stuff to run? i realize that you don't personally Q&A every MD build on every platform, but what i mean is: is there any general likely relationship between that build and whatever version you're running on.
by the way, nerdzero, i am willing to give you some help toward supporting MD 3.0xxx. as i discussed with charles previously, i'm a pretty rotten programmer -- there's many OOP and .Net concepts that elude me. but if there's something a chimpanzee with a typewriter could do, i'd be willing to try to give you some time to help get cobra/MD3 up and running completely. let me know.
-paul
i'm running win 7 and have MD 3.0xxx installed. i assume you're using MD 2.8xxx?
i found this 2.8xxx alpha trunk build: http://monodevelop.com/Download/Trunk_Builds and installed it, but it immediately wanted some updates from the web. when i said "yes", it updated itself to 3.0xxx . {sigh}
would you please confirm that that trunk build, if i don't fall for the same trick again, is possibly my best bet toward getting your MD stuff to run? i realize that you don't personally Q&A every MD build on every platform, but what i mean is: is there any general likely relationship between that build and whatever version you're running on.
by the way, nerdzero, i am willing to give you some help toward supporting MD 3.0xxx. as i discussed with charles previously, i'm a pretty rotten programmer -- there's many OOP and .Net concepts that elude me. but if there's something a chimpanzee with a typewriter could do, i'd be willing to try to give you some time to help get cobra/MD3 up and running completely. let me know.
-paul
- DelphiGuy
- Posts: 116
Re: MonoDevelop Cobra add-in
@DelphiGuy, if you could do searches on the add-in API differences between MonoDevelop 2.8 and 3.0 for language bindings, that could help accelerate supporting 3.0. Both nerdzero and myself are interested in supporting 3.0, it's just that 2.8 comes on Ubuntu with no effort so that's where it was started.
Places to search could include:
- google
- monodevelop dev discussion archives
- irc logs
- stackoverflow
If you don't find anything, you could post a question to stackoverflow.
This should be an approachable task.
Places to search could include:
- monodevelop dev discussion archives
- irc logs
- stackoverflow
If you don't find anything, you could post a question to stackoverflow.
This should be an approachable task.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
36 posts
• Page 1 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 5 guests