Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
15 crawler(s) on-line.
 119 guest(s) on-line.
 1 member(s) on-line.


 BigD

You are an anonymous user.
Register Now!
 BigD:  3 mins ago
 retrofaza:  7 mins ago
 kolla:  21 mins ago
 OlafS25:  53 mins ago
 edwardsjethro:  1 hr 13 mins ago
 joeyunderwood:  1 hr 14 mins ago
 Sikharubel:  1 hr 17 mins ago
 Musashi5150:  1 hr 39 mins ago
 MagicSN:  2 hrs 7 mins ago
 Gunnar:  2 hrs 14 mins ago

/  Forum Index
   /  Amiga Development
      /  Mono C# on Amiga?
Register To Post

Goto page ( 1 | 2 | 3 | 4 | 5 Next Page )
PosterThread
Steady 
Mono C# on Amiga?
Posted on 8-May-2015 2:12:19
#1 ]
Regular Member
Joined: 1-Nov-2004
Posts: 211
From: Melbourne, OZ

I know there has been some talk of porting Mono (open source .NET) to Amiga before and nothing much came from it.

I think that makes sense in that a straight up port of Mono including the .NET components etc probably isn't realistic or worthwhile and from what I saw Mono on OS X needed X11 to run which is not very native and really just facilitates the running of Windows apps rather than the true development of native apps. Even running Windows apps is, of course, not a guarantee because the moment '\' is hardcoded or there is a breakout to the Win32/64 API then it isn't runnable on other OS's without changes. Plus, there is no support for screens!!!

Instead, I think it would be handy to port only the C# compiler, runtime/jit and base .NET classes (strings, Int32 etc) that are not so tied to Windows. We could then design our own Framework to implement Amiga programs with cooperation from all the Amiga camps, releasing incrementally so there is half a chance of getting something out there.

The result of doing this could allow us to make use of the CIL code to dynamically target various Amiga models and Operating Systems, targetting the processor directly. This way the same program can be written once for AmigaOS 3.x, AmigaOS 4.x, MorphOS and AROS. Also, Altivec can be dyamically added etc. PPC and x86 translators already exist and a 68K one can be added.

In cases where implementing some parts of the framework is unfeasible (usually in the case of actual Amigas), they can be made clear in the class documentation.

The idea is that one piece of software can target the maximum audience and we can all run the variant we want with the preferred native interface (MUI, Reaction, BOOPSI/Intuition) without being forced to use MUI or reaction. Those details would be implemented as the framework's native interface. We can continue using the Amiga variant we prefer without missing out on available software due to fragmentation.

Fanciful? Probably, but let's open up the discussion.

Firstly, these questions would have to be successfully answered ... and we may not get past 1.
1) Is it possible at all?
2) Is it feasible?
3) Is there enough interest?
4) Is there enough developer interest to start a proper project?
5) Other things my crazy imagination hasn't dreamed up yet ...

My thoughts are:
a) Port the C# compiler 4.0.0 from Mono
b) Port the CIL interpreter
c) Port enough classes to produce "Hello World".
d) Port the base .NET classes that would be applicable to the solution
e) Produce a proof of concept
f) Collect underpants
g) ???
h) Profit
i) Sorry, ignore f-h
j) Design and implement a basic framework that allows application development without flashy features as a 1.0
k) Implement interpreter JIT
l) Create 68K CIL Interpreter
m) Create 68K CIL JIT (let's face it, 68K has no chance without this)
k) ... design additions and release subsequent versions incrementally as well as keeping up with appropriate Mono changes

Let the constructive discussion begin!!!

 Status: Offline
Profile     Report this post  
DiscreetFX 
Re: Mono C# on Amiga?
Posted on 8-May-2015 3:09:38
#2 ]
Elite Member
Joined: 12-Feb-2003
Posts: 2480
From: Chicago, IL

@Steady

One of the nice features of AmigaOS is that it doesn't have C# or .NET. I know MS is playing that they are open but based on their past performance no thanks. Better tools not tied to a convicted monopolist already exist so why bother with potential future vendor lock in.



_________________
Sent from my Quantum Computer.

 Status: Offline
Profile     Report this post  
Steady 
Re: Mono C# on Amiga?
Posted on 8-May-2015 3:14:00
#3 ]
Regular Member
Joined: 1-Nov-2004
Posts: 211
From: Melbourne, OZ

@DiscreetFX

I agree with that sentiment, but I am primarily talking about making use of the underlying CPU-independent code with and Amiga-specific framework.

 Status: Offline
Profile     Report this post  
KimmoK 
Re: Mono C# on Amiga?
Posted on 8-May-2015 6:18:21
#4 ]
Elite Member
Joined: 14-Mar-2003
Posts: 5211
From: Ylikiiminki, Finland

I have been programming with C# for a year (for x86/.net target). (so, I'm still a newbie with it)
To me it's power is currently in good tools (MSStudio), but under the hood it's a mess. Slow, "bloated" and unpredictable results etc... when compared to normal binaries.

For amigans, good tools (IDE, debugger, libraries) are more important than some specific language.

CPU ISA independent binaries are also "only" nice to have, as long as PowerPC is our main platform and it's available. Tools that can build fastest possible NATIVE binaries for all amiga flavours + mainstream are as usefull and more amigalike (IMHO).

_________________
- KimmoK
// For freedom, for honor, for AMIGA
//
// Thing that I should find more time for: CC64 - 64bit Community Computer?

 Status: Offline
Profile     Report this post  
OlafS25 
Re: Mono C# on Amiga?
Posted on 8-May-2015 9:07:04
#5 ]
Elite Member
Joined: 12-May-2010
Posts: 6321
From: Unknown

@DiscreetFX

what is your problem with .NET? I do PHP programming and in comparation .NET is better. And there is the MONO project that is opensource and now even officially supported by Microsoft. It is the fight for content why they have changed their mind, because content decides about success or failure, not OS features.

 Status: Offline
Profile     Report this post  
OlafS25 
Re: Mono C# on Amiga?
Posted on 8-May-2015 9:08:57
#6 ]
Elite Member
Joined: 12-May-2010
Posts: 6321
From: Unknown

@KimmoK

Really? I am not a specialist and have only basic experience with it right now (do mostly PHP right now) but at least ASP.NET is not bad from what I have seen up to now.

 Status: Offline
Profile     Report this post  
OlafS25 
Re: Mono C# on Amiga?
Posted on 8-May-2015 9:09:59
#7 ]
Elite Member
Joined: 12-May-2010
Posts: 6321
From: Unknown

@KimmoK

yes good class libraries are a must

 Status: Offline
Profile     Report this post  
itix 
Re: Mono C# on Amiga?
Posted on 8-May-2015 9:59:10
#8 ]
Elite Member
Joined: 22-Dec-2004
Posts: 3398
From: Freedom world

@KimmoK

[quoteTo me it's power is currently in good tools (MSStudio), but under the hood it's a mess. Slow, "bloated" and unpredictable results etc... when compared to normal binaries.[/quote]

Perhaps you just cant code in C#

I am working on large Finnish technology company and web are using C# in our real time camera systems. 500 FPS, HE cameras and real time image processing. No problem with C# to handle that.

And it is faster to develop software in C# than in C/C++.

_________________
Amiga Developer
Amiga 500, Efika, Mac Mini and PowerBook

 Status: Offline
Profile     Report this post  
TRIPOS 
Re: Mono C# on Amiga?
Posted on 8-May-2015 10:07:59
#9 ]
Super Member
Joined: 4-Apr-2014
Posts: 1204
From: Unknown

@KimmoK

I'm sorry, but if that comment represents your knowledge and insight of C# and .NET then you are completely clueless!

The framework is very powerful, high quality, it reduces developing time and thus time to market a great deal, and the Visual Studio is a dream to work in. It's not without reason it has become an industry standard!

 Status: Offline
Profile     Report this post  
itix 
Re: Mono C# on Amiga?
Posted on 8-May-2015 10:18:31
#10 ]
Elite Member
Joined: 22-Dec-2004
Posts: 3398
From: Freedom world

@Steady

I started porting Mono to MorphOS in 2010 nuo gave up due to lack of time. It iso doable but you need GDI+ and few other important Windows APIs. Yet I am not sure if it could work efficiently in Amiga environment.

I wrote some reasons to MorphZone but cant remember what they were.

Last edited by itix on 08-May-2015 at 10:20 AM.

_________________
Amiga Developer
Amiga 500, Efika, Mac Mini and PowerBook

 Status: Offline
Profile     Report this post  
Steady 
Re: Mono C# on Amiga?
Posted on 8-May-2015 11:24:23
#11 ]
Regular Member
Joined: 1-Nov-2004
Posts: 211
From: Melbourne, OZ

@itix

I agree with c# being easier to code. I like it, and Visual Studio too, but to expect something as immense as that on our platform is definitely not achievable. Plus, I like Codebench and reckon it is a good example of what a modern Amiga app can be.

Since you were looking at porting this before What do you make of the difficulty in decoupling the .net framework from the c# language, to implement our own. Does that seem realistic to you?

Last edited by Steady on 08-May-2015 at 11:25 AM.
Last edited by Steady on 08-May-2015 at 11:24 AM.

 Status: Offline
Profile     Report this post  
michalsc 
Re: Mono C# on Amiga?
Posted on 8-May-2015 11:46:09
#12 ]
AROS Core Developer
Joined: 14-Jun-2005
Posts: 377
From: Germany

@KimmoK

Quote:
To me it's power is currently in good tools (MSStudio), but under the hood it's a mess. Slow, "bloated" and unpredictable results etc... when compared to normal binaries.


I never noticed. Our whole software in laboratory drives a lot of sophisticated software and communicates with each other all the time. All of that is written in C#, many of that by myself. And I really can't complain. The code works reliable, performance is sufficient, there is not a lot of bloat.

Sure, some people misuse c# features. Some try to code but forget to separate data from presentation. I have seen a lot of funny code which was slow by design. Not because of c# but rather because of the programmer.

Having c# on amigos (let it be AmigaOS, AROS, Morphos or whatever) would be a big deal for me. IMHO it would be much better than having java :)

 Status: Offline
Profile     Report this post  
KimmoK 
Re: Mono C# on Amiga?
Posted on 8-May-2015 13:33:24
#13 ]
Elite Member
Joined: 14-Mar-2003
Posts: 5211
From: Ylikiiminki, Finland

C# & NET

At least with instrumentation and NI tools, it gave me a lot of headache. NI used one version of .NET, our SW used another and drivers was build with another...
NI forums mainly told to stay away from .NET, especially if there are some realtime needs.
For me things usually work when I put 100-500ms delay every now and then in my code...


Just an example (a thing I must learn to do better): I write some data to a file, close the file. Open the file elsewhere in the executable, the file does not exist untill I wait some 200ms...

(also one instrument driver has same issues when it dumps data to disk + it jams often)

_________________
- KimmoK
// For freedom, for honor, for AMIGA
//
// Thing that I should find more time for: CC64 - 64bit Community Computer?

 Status: Offline
Profile     Report this post  
itix 
Re: Mono C# on Amiga?
Posted on 9-May-2015 18:35:32
#14 ]
Elite Member
Joined: 22-Dec-2004
Posts: 3398
From: Freedom world

@KimmoK

Quote:

NI forums mainly told to stay away from .NET, especially if there are some realtime needs.
For me things usually work when I put 100-500ms delay every now and then in my code...


When using C# for realtime needs it need to be considered that Windows has its own limitations. Especially resolution for timers (Sleep(), AutoResetEvent() etc) have 16 ms resolution. They always wait at least 16 ms, thus short delays in .NET are not possible. You can circumvent this with use of native Windows API but it is really a workaround.

Memory management can be also an issue in C# applications because it is fully automatic. Usually it is good but sometimes it can work against you.

Quote:

Just an example (a thing I must learn to do better): I write some data to a file, close the file. Open the file elsewhere in the executable, the file does not exist untill I wait some 200ms...


I dont think it has anything to do with .NET framework unless you forgot to close/dispose filehandle. If you dont do that it does not necessarily get written to the disk until object is disposed by GC.

_________________
Amiga Developer
Amiga 500, Efika, Mac Mini and PowerBook

 Status: Offline
Profile     Report this post  
itix 
Re: Mono C# on Amiga?
Posted on 9-May-2015 18:49:14
#15 ]
Elite Member
Joined: 22-Dec-2004
Posts: 3398
From: Freedom world

@Steady

Quote:

Since you were looking at porting this before What do you make of the difficulty in decoupling the .net framework from the c# language, to implement our own. Does that seem realistic to you?


Not at all. Our framework would not run faster and it would develop slower and have more bugs.

It could have something like System.Amiga.MUI or System.Amiga.Reaction to build native user intrfaces. But even that is not necessary, most Windows Forms controls could be mapped to existing Amiga UI frameworks.

Mapping other native Amiga API to C# does not make much sense because C# is managed language. Although it could be interesting to access Exec message ports from C# there would be way too many IDisposable objects...

_________________
Amiga Developer
Amiga 500, Efika, Mac Mini and PowerBook

 Status: Offline
Profile     Report this post  
Tomppeli 
Re: Mono C# on Amiga?
Posted on 9-May-2015 22:42:54
#16 ]
Super Member
Joined: 18-Jun-2004
Posts: 1652
From: Home land of Santa, sauna, sisu and salmiakki

@KimmoK

Quote:
NI forums mainly told to stay away from .NET, especially if there are some realtime needs.

The garbage collector of .net is not realtime.

@Steady
Amiga-E# ?!
C++ wrapper classes around Amiga system libraries to make usage of them more object oriented like.

_________________
Rock lobster bit me. My Workbench has always preferences. X1000 + AmigaOS4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." -Seymour Cray

 Status: Offline
Profile     Report this post  
CodeSmith 
Re: Mono C# on Amiga?
Posted on 10-May-2015 4:11:09
#17 ]
Elite Member
Joined: 8-Mar-2003
Posts: 3045
From: USA

@Steady

Unless there already happens to be an MSIL JIT compiler for PPC, it's not going to happen. There are probably less than 10 people in the entire amiga community who have the skills to write one, and as DiscreetFX has shown there are other factors that shrink the pool of people willing to do it probably down to zero.

 Status: Offline
Profile     Report this post  
CodeSmith 
Re: Mono C# on Amiga?
Posted on 10-May-2015 4:23:16
#18 ]
Elite Member
Joined: 8-Mar-2003
Posts: 3045
From: USA

@Tomppeli

Yep, .net is designed to write end user apps and server backend code. It's got a ton of bells and whistles for app writers and pretty good throughput for server code. It wasn't designed to have low latency (the JIT overhead alone would kill that).

 Status: Offline
Profile     Report this post  
Kronos 
Re: Mono C# on Amiga?
Posted on 10-May-2015 7:46:50
#19 ]
Elite Member
Joined: 8-Mar-2003
Posts: 2553
From: Unknown

@Tomppeli

Quote:

C++ wrapper classes around Amiga system libraries to make usage of them more object oriented like.


I think there are allready plenty of those on Aminet, but they are all pretty pointless as most of the Amiga-API just isn't object oriented.

Even for BOOPSI based parts these don't add any real value, as all they do is force you ton do some mental translation from documentation to C++ classes.

_________________
- We don't need good ideas, we haven't run out on bad ones yet
- blame Canada

 Status: Offline
Profile     Report this post  
Massi 
Re: Mono C# on Amiga?
Posted on 10-May-2015 8:40:00
#20 ]
Cult Member
Joined: 2-Feb-2011
Posts: 627
From: Rome, Italy

@All

From my professional experience, C# is not even up to GUI applications, where the GUI has to be updated according to strict time requirements (soft real time).

C# is in many cases overestimated.

_________________
SAM440EP-FLEX @ 733 Mhz, AmigaOS 4.1 Update 1

 Status: Offline
Profile     Report this post  
Goto page ( 1 | 2 | 3 | 4 | 5 Next Page )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle