I have been considering taking the plunge and installing Linux on my Playstation 3. As C# is my current language of choice, the next logical step would be to install Mono.
I have done a little research and found that http://psubuntu.com/wiki/InstallationInstructions has instruction on installing Ubuntu and links to download an ISO containing a PS3 specific version of Ubuntu. There is also this cool project at http://code.google.com/p/celldotnet/ that has developed some code to utilize the 6 additional SPU cores of the CPU, not just the general-purpose one that you have access to by default.
The problem is that the project documentation seems a little thin. Has anyone set up a PS3 to develop .NET code? If so, what problems did you encounter? Does anyone have any code samples of how to even partially load up one of these monster processors?
Update:
I do realize that basic .NET/Mono programming will come into play here. The part I am fuzzy on is what sort of data structures do you pass to a specialty core? If I am reading this right, the 6 SPU cores have 128 registers at 128 bits each. I haven't seen any discussion on how to go about coding effectively for this.
Update 2:
IBM has announced that further development on the Cell processor has been cancelled. While this pretty much kills any desire I might have to develop on the platform, hopefully someone else might add some useful info.
Just found this posting from Miguel de Icaza's blog. Promising that as recently as Feb 2008 he was looking into this. As he is a member of the SO community now, I hope he can shed some further light on the topic.
The PS3 features a PPC general purpose CPU.
You can try to cross compile mono to ppc and go from there.
Mono from svn has received a lot of attention regarding the ppc port, so I would advise using it instead of the 2.0 release.
Related
There are various questions (mainly around 2009 to early 2010) discussing use of the Mono framework to write apps in C# and deploy them to iPhone. Also there is some discussion of the Unity Framework, but I'm more interested in a fairly standard UI app.
Has anyone successfully developed and released a commercial quality app using C#/Mono? If so, what were the lessons learnt? Pain points? If you know of other people who have done so, how have they fared?
Thanks!
Mark
The basic answer is yes, there are a lot of applications out there that have been developed using MonoTouch. You can find some nice numbers on Novell's site but there are a ton of games and other application is the AppStore that were developed using MonoTouch.
I would start your investigation by going to review articles that walk through the good and bad of MonoTouch. For example, here is a good starting place:
http://www.bryanthankins.com/techblog/2010/01/17/monotouch-review-porting-an-obj-c-app/
http://www.devproconnections.com/article/mobile-development/review-monotouch-enterprise
Then I would look through some tutorials to see how exactly this is done so you can see if it will fit in your environment. There are a lot out there that show off how to use MonoTouch, including these:
http://vimeo.com/6689472
http://blog.keen-edge.com/category/monotouch/
Finally, I would look at what is happening currently with Attachmate and the takeover of Novell. There are some real issues there that may cause you to reconsider going with MonoTouch. For example, while Mono's future may be unclear at Attachmate, it seems that it might be continued through another company:
http://ostatic.com/blog/mono-continues-without-novell-attachmate
This uncertainty might not be what you want in a project you are counting on so you need to work through that before committing.
I'm a c# programmer by trade and looking to move my wares over to Ubuntu as a business concern. I have some experience of Python and like it a lot. My question is, as a developer which would be the best language to use when targeting ubuntu Mono c# or python as a commercial concern.
please note that I am not interested in the technical aspects but strictly the commercials of where Ubuntu is heading, I see that there is a lot of work done within using Python and thinking that maybe with the whole Mono issue of who "might" purchase them.
Both Python and Mono are installed by default on recent Ubuntu, and will likely continue to be for the foreseeable future.
Mono is removable since it is currently only used by a few desktop apps. Python is not reasonably removable as a lot of core scripts and GNOME tools depend on it. (The same is true of Perl.)
The popularity contest shows Python to be installed somewhat more often than Mono but both are widespread:
21 python-minimal 1584305 182870 1381149 20211 75 (Matthias Klose)
577 mono-gac 1403534 25795 1323328 54159 252 (Debian Mono Group)
As for commercial potential, it's difficult to say without any idea what sector you might be working in. If you are targeting servers, especially running older versions of Ubuntu, Mono will be less widespread. If you are selling simple consumer desktop apps... well, it has yet to be demonstrated that there is really a market for this!
I cannot say much about the market for Ubuntu. And since business is your primary concern, the programming language is, as you say yourself, secondary. I would say that in any business, choose the language and tools that solves the business problem most effectively. When release comes do your end users really care?
That said, if you can do it with Mono/C# I would encourage you to do so since you already have C# and .Net experience. But knowing a second language and development environment will only make you stronger.
I want to learn C# because... It seems to be a pretty marketable language these days. More than C, not so much as PHP/MySQL in my area, but I'd rather be a software developer than a web developer. Anyways, I'm running linux, and I have no hope of working on a windows platform until I buy a new computer. So, are there any drawbacks to learning C# under linux? If so, are there any good lessons online for doing such a thing? Any good tutorials online for learning C# in general?
update
so what I'm getting is that the main drawback is that although the full C# language spec is implemented in mono, the full .Net framework isn't. But, until I can get a new system and run windows, I guess lacking the full framework will have to do.
The language spec is fully implemented but the framework itself is not. So learning C# the language will be no different (ignoring the benefits of using visual studio as your IDE). Writing against the framework will be a bit different.
edit> It also depends on what kind of programming you intend to do. Much of the parts of mono that aren't complete are also often edge cases for beginners that you aren't likely to run into. So if you're just learning C#, there's a very good chance that you won't come across the parts of the framework that haven't been implemented yet (and I mean yet, they are very fast at updating mono from what I've seen so far, so by the time you're ready to really explore the framework and all that it entails, there's a good chance that it might be completed by then)
learning C# on linux may actually be good, when you start doing it on windows, you will know both. The IDE will not be as modern, but I'll bet there are not many people that can do it on both.
You'll be able to concentrate on the actual C# language and you can learn the microsoft IDE when you get to use C# on windows.
The major drawbacks that I see are:
The latest .NET versions are not supported
Different tools between Mono and Visual Studio
In spite of that, I think you can learn a lot about C# on Mono.
Any good tutorials online for learning C# in general?
Here's a tutorial I wrote:
http://www.csharp-station.com/Tutorial.aspx
Feedback has indicated that all of the code in the tutorial runs fine on Mono.
Joe
Learning the language should not hurt, I would not depend on it to land you a job. However, keep in mind that many of the runtime services that are accessed via C# may not be available. Knowledge of those services is perhaps just as, if not more, important the language itself.
The main problem with C# on Linux is that your development system will not be as good, in most people's estimation. But you may get really good at vi(1)...
On MonoDevelop you won't have all the newest features of the .NET framework, it's somewhere between 2.0 and 3.5.
It supports C#3.0 though.
Mono is gaining traction very, very quickly. I've heard rumblings that MS is silently supporting Mono (see their approach with getting SL to run on Linux). In some cases, mono actually outperforms .net on a windows based server.
The downside would be the IDE and features, as many have already mentioned. Visual Studio is by far the best IDE out there.
It does support Asp.Net MVC IIRC though.
Mono overcomes the single biggest drawback to using .NET from Microsoft for many developers, the requirement to run on the Windows platform. By bringing the shared source release of the .NET Framework to multiple platforms and then building an open source project around extending it, The Mono Project has made the strengths of .NET available to a wide range of developers. The ability to develop using a variety of languages, all using a common interface and deployable on a number of platforms is a very compelling development strategy.
As far as the web services aspects of Mono are concerned, nearly all of the Framework is complete meaning a developer can begin developing web services today using Mono. Mono features nearly complete implementations of ASP.NET, ADO.NET and Web Forms, along with almost all of the SYSTEM namespace. For more a detailed visit mono's official site,mono-project.com check out these articles on Cool Solutions for Developers:
Well there is nothing wrong if we learn something & probably we might end up improving it which will be more useful to the future users.Probably that is the power of open source.I think all developers will agree to this point :)
I love programming with .NET, especially C# 3.0, .NET 3.5 and WPF. But what I especially like is that with Mono .NET is really platform-independent.
Now I heard about the Olive Project in Mono. I couldn't find some kind of Beta.
Does it already work? Have any of you made any experiences with it?
Edit: I know about Moonlight. But I want a standalone WPF application. And because of Moonlight I hope WPF on Linux will become true.
You'll have better luck working with Moonlight, which targets the Silverlight API, which is a subset of full WPF.
edit: Sure, Silverlight isn't "intended" for the desktop, but there's no reason why you can't embed a silverlight engine in your application. It's been done before, such as for the Mac NY Times Reader
more edit: see Miguel's post on Standalone Silverlight Applications
Update: Since people keep upvoting this, I want to point out it is long since out of date. Mono got acquired by MS years ago, and their posture regarding open-source has changed, so consider this post obsolete. (As obsolete as the WPF framework itself, heh).
Mono is in a bit of an uncomfortable position when it comes to Microsoft APIs such as Winforms and WPF. A subset of the .Net technology is an ECMA standard, but free implementations of these APIs are probably on shakier legal ground. I believe this was a large factor in the covenant between Novell and Microsoft, which is good for Novell customers. But people who use Mono that aren't customers of Novell aren't protected. For this reason a lot of people in the F/OSS community look askance at Mono despite its technical merits.
For this reason, Gtk# will always be preferred, since it is truly Free. Many people consider it to be superior to Winforms anyway. As far as WPF is concerned, it will almost certainly be a low priority for Novell. They may implement it eventually, but I would expect Moonlight to be the closest you could get for the forseeable future.
Since posting this, Microsoft has extended their covenant to anybody who implements the ECMA 334 & 335 standards.
From the mono website
At this point, the Mono project does
not have plans to implement Windows
Presentation Foundation APIs as
part of the project.
Moonlight is an implementation of silverlight, which is a browser based flash like technology based on a subset of WPF.
In my opinion the choice to not implement WPF is monos biggest mistake. As WPF is fast becoming the default choice for new .net user interfaces. See this blog for more.
There is a library called Silverform SDK that aims to provide cross-platform WPF and Silverlight implementation.
The library is implemented in managed code and currently works with OpenTK and Unity3D as render backends. Major functionality, such as binding, layout, main controls and primitives, has already been implemented (check Unity web player demos here). Initially it has been focused on Unity3d render, while support for standalone Mono applications will be added as a separate build in the future.
Disclaimer: I am one of the developers of the library.
If you check Known bugs of this link(also includes steps needed to install .NET onto Ubuntu)or this you may find that some(may be buggy) version of WPF works on Wine as for now. I did not find any definite test done as for now, but worth to try to run WPF "Hello world".
UPDATE2:
I have run latest IlSpy on latest Wine for Ubuntu 16.04. With 32 bit version of dotnet45 and corefonts installed via winetricks with windows 7 compatibility.
For this time no crashes and all things work fine. Fonts look really good.
IlSpy is shown via WPF and for person who loves programming with .NET is essential tool - the decompiler.
I downloaded latest portable SharpDevelop(build using WPF) with no extra. It started. Failed to create WPF project. Created WinForms. After opening some cs files and evidencing some glitches, tried to type - and it crashed.
UPDATE
I followed steps and got latest ILSpy.exe running on Ubuntu 14.4.
Next items to note:
wine stated that dotnet40 is not supported by 64 configuration, changed to 32 bit
fonts are ugly, but readable
basic functional works fine - I can see decompiled code - which is good enough for some development, but View -> Search and View -> Options -> Display crash.
Conclusion:
WPF on Linux is possible. But need some way to tackle issues.
From the Olive home page:
Olive is unsupported, should be
considered as experimental software,
and since it implements a shifting API
there are no guarantees of any kind
about the stability of the API.
I doubt anyone would have used it in a real project.
Yes, it is possible using NoesisGUI a real-time multi-platform XAML implementation. There are a few games already released using this technology in Linux, like VoidExpanse
Disclosure: I am one of the developers of this product.
I heard a podcast interviewing miguel de icaza (the mono lead) maybe a few weeks ago, so that would have been maybe mid-december 2008, and he said that they had no WPF support at all yet.
Theoretically, a stripped version of WPF COULD be compiled against WinPR or LibWine to run on Linux.
Currently there is no such setup, so someone would need to make one. Hopefully this might change soon.
As of running against or in a full Wine environment, I think that is seriously overkill and will result in too much bloat to be worth making a very small number of additional programs work.
My company has an existing established WinForm application which in running on WinXP. The application does alot of sound processing using DirectSound.
My company would like to evaluate Mono, as an alternative on a per workstation cost to Vista/Win Server 2008.
I've heard that different estimates, ranging from 'it will work easily on Mono' to 'it could take months of recoding in certain cases to get a WinForm app to run with Mono on Linux'.
Does anyone have a good real world experience with this?
A good link reference?
I would like to get a better idea before I commit to testing.
Thanks!
The WinForms part will be easy, you may have to do very little as Mono now claims to support Winforms 100%, however all the DirectSound calls will have to be rewritten to use an API available on Linux, ALSA being the obvious choice.
I have written small apps in VS 2005 and ported them with ease to Mono. If you do a lot of P/Invokes, then you'll have to take that into account, as those may have to be completely rewritten or rethought.
Also, check out MOMA: "The Mono Migration Analyzer (MoMA) tool helps you identify issues you may have when porting your .Net application to Mono. It helps pinpoint platform specific calls (P/Invoke) and areas that are not yet supported by the Mono project."
Mono can help you move the managed code, but it will not help you move the audio layer.
Sadly, the .NET framework does not provide a comprehensive API for audio processing. It merely provides a way of playing back a small sound sample, and it is not even very good at this (See Jeroen's post about audio gaps when running the C64 emulator under IKVM).
You will have to research which Linux API maps best to what your audio application is doing.
Lennart Poettering blog entry on audio is an excellent starting point:
http://0pointer.de/blog/projects/guide-to-sound-apis.html
Once you decide on an API, just like in Windows, you will have to P/Invoke the API that is right for you.