Shop OBEX P1 Docs P2 Docs Learn Events
GCC / Eclipse and Propeller 2 - seeking developers - Page 2 — Parallax Forums

GCC / Eclipse and Propeller 2 - seeking developers

2456722

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2011-05-06 13:04
    Chris or Roy,

    Just so I'm clear on the facts: how necessary is .NET to the implementation of a GCC/Eclipse dev platform? Are they separable or hopelessly intertwined? How compatible is Mono on other platforms with .NET in Windows? Do programs have to be tweaked for each new platform? Can it run under any desktop manager that the user chooses (e.g. Gnome, KDE, XFCE), or is it tied to one? Does it have to run under X on OS/X, or is it a native OS/X platform? Will it run on PowerPC Macs?

    Thanks,
    -Phil

    Phil,

    Please remember I wasn't replying on the main topic of the discussion. I was only speaking in terms of how perception overrides logic when you don't have the facts, and that Roy is aware of that from the same source I am. I use VB.NET to create application interfaces for the Propeller and BASIC Stamp, but until recently I didn't care one way or another what was used.

    It turns out though my video card drivers for my Quad-Core Dual-SLI system require .NET framework for the control panel to function. These are NVIDIA cards which are arguably the most popular. So from one stand-point I am seeing the need for .NET in software more frequently. I'm pretty sure my video editing applications also require it.

    On another note, many other applications I have installed in the last year (including games) have installed (or tried to re-install) the Visual C# 2005 components required by the applications. As I said I don't feel qualified to debate the need for .NET software other than the limited experience I have. But it does seem we're moving in that direction faster than not.

    All PCs in my house have it by default (several Windows 7 64-bit systems and a Windows 7 32-bit system). We only have one Windows XP machine left and it is a laptop. It is there to run the few things that aren't Windows 7 friendly.
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2011-05-06 13:05
    Phil,
    My suggestion for the .NET stuff is independent of the Eclipse/GCC stuff. There might be some shared low level code (likely in C/C++) or executables. The Exclipse/GCC tools would not require .NET, and the .NET tools would not require Java/GCC.

    As for Mono compatibility, you can make it as compatible or not compatible as you want. It supports through .NET 4.0, and then has extensions beyond that for working with the different OS features (like cocoa on mac) You can make an application using Windows.Forms and get it running on all the platforms (with the drawback, for some, that it will look like a windows app when running on Linux or mac). You have to be careful with Endian dependent code and with file system paths (case sensitivity) and directory delimiters, but they provide mechanisms to support one code base working cross platform in those areas as well. There are some parts of MS .NET that are not implemented in Mono, but they are things that are very windows specific and not something that this effort would use. Things like System.Management or System.EnterpriseServices, and much of the WPF or WF stuff.

    Mono on Mac is OSX (there isn't official support for the PowerPC based Macs, but it is an open source project, and I would not be surprised if there is some PowerPC Mac support someplace). It uses X11 if you want the Windows.Forms GUI stuff to work, but you can also use cocoa# (for mac specific gui) and Gtk# (which works on Windows, Linux, & Mac).

    The Mono runtime on Linux doesn't care about the desktop manager as far as I know. There may be some .NET libraries that have dependencies on specific desktop managers, but that's third party (not inside Mono itself). If you want to use MonoDevelop to build .NET apps on Linux then I believe that uses/requires Gnome. However, you can use the command line tools and whatever editors you want to develop for Mono while using other desktop managers.

    There is a wealth of information at http://www.mono-project.com/Start

    Did I mention that Mono also runs on Nintendo Wii, Sony PS3, Android and Apple iPhone? It's possible that in the long run we could even get Mono running on a Prop 2 based platform. :D

    Roy
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-05-06 13:15
    Chris and Roy,

    Than you for taking the time to bring me up to date with this stuff. As a dyed-in-the-wool Perl/Tk programmer, I've pretty much been able to ignore "mainstream" dev tools for the PC, Mac, and Linux. I made the switch from VB to Perl/Tk many years ago when the over-inflated VB6 came out and haven't looked back (although Perl/Tk has to run under X11 on OS/X, so it's not totally portable there).

    -Phil
  • Heater.Heater. Posts: 21,230
    edited 2011-05-06 13:38
    Roy Eltam,

    As far as I can make out from a quick google around "A Mono for Android license will cost $399 for an individual developer. A one-seat enterprise license costs $999."

    I may be out if touch but I thought a lot of the .NET stuff was Windows specific. So although C# is available as mono on Linux one night get stuck on the GUI stuff.

    I have yet to be convinced I want ,NET or Mono on my machine. I for sure don't want any cross-platform tools to require me to have it.
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2011-05-06 13:38
    Phil,
    No problem, and I want to be clear, I am for providing as many options as possible for Propeller development. I'm not suggesting to exclude one way (that I dislike) in favor of another. I want both or all. :D The more paths that people can choose to build code for the Prop, the more likely they are to end up with the Prop. Of course, we need to make sure the Spin/PASM source code itself remains compatible across all these paths so that we don't have sharing problems, but that's another matter.
  • Sal AmmoniacSal Ammoniac Posts: 213
    edited 2011-05-06 14:10
    Heater. wrote: »
    Sal Ammoniac,
    I can't work out if you are joking or not. Is that a twisted version of the famous statement by Henry Spencer "Those who don't understand UNIX are doomed to reinvent it, poorly."

    You know of course that .Net is basically a reinvention of Java.

    I'd forgotten about Henry's statement--mine is a parody of "those who don't understand history are bound to repeat it", and I was only half joking. Of all the development environments I've used and seen on various platforms, .NET is one of the nicer ones. It's extremely well documented, the tools are nice (and free in the case of the Express versions), and the .NET run time is already installed on PCs running Windows Vista or 7. It doesn't matter if .NET is a reinvention of Java, because IMO it's Java done right.

    Whatever environment happens to be chosen for this effort, I'd suggest keeping it simple and straightforward. Eclipse has gotten too large and includes everything, even the kitchen sink. I remember using it back in its infancy and performance was horrid on machines of the time. Increasing system speeds have alleviated this to a large extent, but it's still a monster.

    I use Rowley CrossWorks for most of my development work, and it's lean and mean by comparison. That should be the model of a good development environment, not Eclipse or MPLAB X.
  • Heater.Heater. Posts: 21,230
    edited 2011-05-06 14:27
    Sal Ammoniac,

    Can I take your .NET development ebvironment and run it on Mac or Linux or my new ARM based machine? No.
    Can I be sure that any program you create in .NET I can take and run on Mac or Linux or etc etc? No.

    My conclusion is therefore that .NET is not Java done right at all. It does not do what Java does. Admittedly the C# language itself looks like a nice improvement over Java but that's only the tip of the iceberg.
  • Sal AmmoniacSal Ammoniac Posts: 213
    edited 2011-05-06 14:35
    Heater. wrote: »
    Sal Ammoniac,

    Can I take your .NET development ebvironment and run it on Mac or Linux or my new ARM based machine? No.
    Can I be sure that any program you create in .NET I can take and run on Mac or Linux or etc etc? No.

    1. Yes. Mono.
    2. You can probably code a .NET app that won't run under Mono, but why would you intentionally do that?
  • Heater.Heater. Posts: 21,230
    edited 2011-05-06 14:43
    Sal Ammoniac,
    1. Yes. Mono.
    OK, I'll try.it. I actually have mono installed here. Where do I download the .NET IDE?
    2. You can probably code a .NET app that won't run under Mono, but why would you intentionally do that?
    Hopefully one would not try to do that. Perhaps I'm out of touch with progress here but I thought there was a lot of GUI stuff that did not exist for Mono under Linux/Mac etc.
  • Sal AmmoniacSal Ammoniac Posts: 213
    edited 2011-05-06 14:47
    Right here: http://www.microsoft.com/express/Windows/

    Your choice of VB, C#, or C++ (or all three if you like).
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2011-05-06 14:47
    Heater, you can get MonoDevelop from here: http://monodevelop.com/

    That's the cross platform IDE tool you can use for .NET development with Mono.
  • Heater.Heater. Posts: 21,230
    edited 2011-05-06 14:57
    @Sal Ammoniac,

    That stuff from Microsoft does not install into my Debian. Not that I expected it would.

    @Roy,

    Damn, looks like my weekend is now fully booked in trying that out:)
    Thanks for the pointer.
  • Sal AmmoniacSal Ammoniac Posts: 213
    edited 2011-05-06 15:04
    Heater. wrote: »
    @Sal Ammoniac,

    That stuff from Microsoft does not install into my Debian. Not that I expected it would.

    Well, you did say ".NET IDE", not MonoDevelop. ;-)
  • Heater.Heater. Posts: 21,230
    edited 2011-05-06 15:29
    Yes I did say that, on purpose. If I can get that .NET IDE up and running on Linux with mono then C# is not doing what Java does.
    The idea of the byte code based systems is "compile once run anywhere".
  • jazzedjazzed Posts: 11,803
    edited 2011-05-06 15:46
    I wish we didn't have to go through this .Net discussion in this forum, but it happens. Other groups have similar discussions I guess so it just shows our level of interest in the subject.

    At our first exploratory meeting, some of these topics may get discussed.

    I'm committed to giving a 10 minute presentation to help everyone understand what is GNU/GCC (and friends). Hopefully someone else can present what Eclipse is. Perhaps people who feel strongly about other solutions will have their 10 minutes at some point if they want it. Hopefully presentations can be made with regard to education rather than persuasion so that people can remain objective and not end up feeling manipulated.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-05-06 23:10
    Ken, this is a great step forward :)

    I would love to help. However, this area is way out of my league.
  • micman2micman2 Posts: 18
    edited 2011-05-07 02:12
    I think that would be perfect if you use ANSI C/ C++ and plus a debugger as an example ICD3 of microchip . In this mode is perfect developement with parallax propeller !!!!
  • Jorge PJorge P Posts: 385
    edited 2011-05-07 07:01
    @Roy
    I agree with the .NET development you propose. but dont forget that cygwin's GCC can be used to compile any sources that these guys release. I wouldn't worry too much about that untill they release a stable version. Hope it is open source!
  • Heater.Heater. Posts: 21,230
    edited 2011-05-07 07:13
    @Roy,

    I know this is totally off topic but as we got to this point I'd like to ask my last question on the subject.
    I now have monodevelop installed on Debian and it compiles "Hello World".
    Do you have any suggestions for C# tutorials and introductions to the whole framework that are covering what I can do with this particular set up.
    A quick google provides an overwhelming response. Remember I want stay within the confines of what can be done in a cross platform manner.

    To keep this slightly on topic, in my admittedly brief play with mono develop I can see that it is quite simple for a beginner. Which is what I am here. That "hello world" was achieved with no more than a view of a two minute video on YouTube. Somewhat easier than my experience starting out with installing and using Eclipse for Android or XMOS.

    So that prompts the question, is anyone thinking of adopting monodevelop as a Prop II C/C++ or Spin/PASM IDE?

    It was a bloated huge 80MB download but hey that's only "apt-get install monodevelop" and a short wait. I still have most of a terabyte disk left:)
  • Mike GMike G Posts: 2,702
    edited 2011-05-07 07:29
    I've been working with the Spinneret so here's a simple HTTP GET tester. Create a C# console application project and paste the code below in the generated project file. I'm not sure about a good tutorial on the framework. It's pretty large. The windows specific stuff should be relatively obvious. MSDN is your friend. http://msdn.microsoft.com/library/default.aspx
    using System;
    using System.Net;
    using System.IO;
    
    
    namespace HTTPConsole
    {
        class Program
        {
            static void Main(string[] args)
            {
    
                string url = "http://spinneret.servebeer.com:5000";
    
                Console.Write("Enter a url: ");
                string userInput = Console.ReadLine();
    
                url = string.IsNullOrEmpty(userInput) ? url : userInput;
                
                Uri uri = new Uri(url);
              
                // Create a request using a URL that can receive a post.
                WebRequest request = WebRequest.Create(uri);
                
                // Set the Method property of the request to GET.
                request.Method = "GET";
    
                // Set the ContentType property of the WebRequest.
                request.ContentType = "application/x-www-form-urlencoded";
    
                // Get the response.
                WebResponse response = request.GetResponse();
    
                // Display the status.
                Console.WriteLine(((HttpWebResponse)response).StatusDescription);
    
                // Get the stream containing content returned by the server.
                Stream dataStream = response.GetResponseStream();
    
                // Open the stream using a StreamReader for easy access.
                StreamReader reader = new StreamReader(dataStream);
    
                // Read the content.
                string responseFromServer = reader.ReadToEnd();
    
                // Display the content.
                Console.WriteLine(responseFromServer);
    
                // Clean up the streams.
                reader.Close();
                dataStream.Close();
                response.Close();
            }
        }
    } 
    

    Here's code to test UDP connections.
    using System;
    using System.Text;
    using System.Net;
    using System.Net.Sockets;
    
    namespace UDPConsole
    {
        class Program
        {
            static void Main(string[] args)
            {
                
                //192.168.10.75:5000
                Console.Write("Enter the Spinneret's IP address (ex. 111.222.333.444): ");
                string userInput = Console.ReadLine();
                IPAddress ip = IPAddress.Parse(userInput);
    
                Console.Write("Enter the Spinneret's port (ex. 5000): ");
                userInput = Console.ReadLine();
                int port = int.Parse(userInput);
    
                //IPAddress ip = new IPAddress(new byte[] { 192, 168, 1, 120 });
                //int port = 5000;
    
                IPEndPoint ipEndPoint = new IPEndPoint(ip, port);
                UdpClient udpClient = new UdpClient(port);
                string request = String.Empty;
                bool again = true;
    
                try
                {
                    udpClient.Connect(ipEndPoint);
    
                    while (again)
                    {
                        Console.Write("Send: ");
                        request = Console.ReadLine();
                        Console.WriteLine();
    
                        // Sends a message to the host to which you have connected.
                        Byte[] sendBytes = Encoding.ASCII.GetBytes(request);
    
                        udpClient.Send(sendBytes, sendBytes.Length);
    
                        //IPEndPoint object will allow us to read datagrams sent from any source.
                        IPEndPoint RemoteIpEndPoint = new IPEndPoint(IPAddress.Any, 0);
    
                        // Blocks until a message returns on this socket from a remote host.
                        Byte[] receiveBytes = udpClient.Receive(ref RemoteIpEndPoint);
                        string returnData = Encoding.ASCII.GetString(receiveBytes);
    
                        Console.WriteLine(String.Format("Received: {0}\nFrom: {1}:{2}", returnData.ToString(), RemoteIpEndPoint.Address.ToString(), RemoteIpEndPoint.Port.ToString()));
    
                        Console.WriteLine();
                        Console.Write("Quit (y/n)?  ");
                        if (Console.ReadLine() == "y") { break; }
                        Console.WriteLine();
    
                    }
    
                    udpClient.Close();
    
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.ToString());
                }
    
    
            }
        }
    }
    
    
  • Heater.Heater. Posts: 21,230
    edited 2011-05-07 08:16
    Mike G,

    Well I presume those code snippets were intended for me. Thank you. They work well.

    Thing is console apps are not an issue. I can do that with Vim and the command line compiler.

    GUI apps seem to be a whole different problem. monodevelop uses GTK# which I read everywhere looks bad on Windows. Haven't tried it yet.
    On the other hand Win Forms apparently is not quite there yet for Linux and Mono.

    Is this a correct view?

    I'd love to be able to use this like Qt. One source code, pretty much the same looking result on all platforms. Of course you have to compile for each platform separately.

    Is there away to write cross platform GUI apps, say like a BST Propeller tool in monodevelop and C# that looks good and behaves well on all platforms.
  • jazzedjazzed Posts: 11,803
    edited 2011-05-07 09:30
    Heater. wrote: »
    GUI apps seem to be a whole different problem. monodevelop uses GTK# which I read everywhere looks bad on Windows. Haven't tried it yet.
    On the other hand Win Forms apparently is not quite there yet for Linux and Mono.
    ...
    Is there away to write cross platform GUI apps, say like a BST Propeller tool in monodevelop and C# that looks good and behaves well on all platforms.

    Heater I use VC# Express to make GUI programs and have run them using mono and they worked perfectly (except for the dang'd serial port). Hanno's serial port driver seems to work though, so maybe it just takes a tweak.

    Can we start another topic somewhere for this kind of discussion? Many of us have questions and answers about C#, and I do really enjoy C#, but as you said, it is OT here.
  • Heater.Heater. Posts: 21,230
    edited 2011-05-07 09:39
    Yep. Thanks all.
  • jazzedjazzed Posts: 11,803
    edited 2011-05-07 10:03
    Heater. wrote: »
    Yep. Thanks all.
    Heater I wasn't trying to cut you off ! I was just trying to move the conversation not stop it. C# is really a good language.
  • Heater.Heater. Posts: 21,230
    edited 2011-05-07 10:21
    Jazzed,

    No problem, I don't want to clutter up a serious debate here.

    I've toyed with C# console programming over the years and don't have any problem with it. I do worry about the hold MS has over it. That's the same worry about the hold Oracle has over Java. (Oracle is now suing Google over Java use).

    Anyway I just wanted to get a handle on how well it would work out if there were a Spin or C/C++ IDE written in C#.

    Never mind, I don't really have anything constructive to contribute to this debate.
  • Jorge PJorge P Posts: 385
    edited 2011-05-07 10:27
    Heater. wrote: »
    GUI apps seem to be a whole different problem. monodevelop uses GTK# which I read everywhere looks bad on Windows.

    The windows port of the G.I.M.P. uses GTK and it works and looks great, only disadvantage, windows users need to install the GTK port for windows, its a fairly quick download and install
  • Heater.Heater. Posts: 21,230
    edited 2011-05-07 11:16
    OK. That's good, I'll try it out when I get back to a Windows machine.
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2011-05-07 11:19
    Heater,
    There was a lot of information about what can and can't be done and some tutorial stuff on the www.mono-project.com pages. All of my C# and .NET dev has been with Visual Studio, and I learned via the MS Press C# intro book (several years old now) and MSDN.

    The thing I would like to see is Prop Tool redone using C# (and mono compatible). I think there is a lot to be said for having the Prop Tool setup. We might even be able to get some code from Hanno's ViewPort in order to help along the way.

    Again, I don't think this should be done at the exclusion of the other options being discussed here. I really like the multi-option path for appealing to the widest audience of developers.

    Roy
  • Heater.Heater. Posts: 21,230
    edited 2011-05-07 11:33
    Thanks again Roy. You are going to keep me busy this weekend:)

    A Prop Tool in C# would be cool, the multi-path option is of course good if there are the resources available to do so.
  • jazzedjazzed Posts: 11,803
    edited 2011-05-07 12:25
    Hi. I've started a .net friendly thread here. I hope some of the productive things mentioned here can be discussed in the new thread.

    Thanks.
    --Steve
Sign In or Register to comment.