3

I was wondering if it was possible to run/convert/compile/recompile a small c# program, tasked with invoking a webservice and passing it the usual xml file with, for unix. The unix version if HP ux 11.23(released in 2003).

Wherever I looked for it the only reasonable answer was "mono". However while searching I also came across this: http://www.mono-project.com/Mono:HPUX

Currently only the Mono Interpreter (mint) will work on HPUX. At this time, Mono's JIT does not work with HPUX.

Only thing keeping me screaming I guess is my ignorance on the matter. What would this change for me or keep me from compiling and running my little program?

btw the references I use are:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml.Serialization;
using System.Net;

Is there any way I can get myself out of this with a "few" bruises, as opposed to completely trashed and with every bone broken?

j0k
  • 22,600
  • 28
  • 79
  • 90
iris
  • 103
  • 3
  • 11

2 Answers2

3

You can still use mono, however you are not able to use the JIT engine. This means that optimizations that run at the interpretation layer don't get run.

Mono has two modes of running JIT and interpreter runtime. The interpreter runtime is created on platforms before the JIT platform since its much much less complicated for the mono team, normally they move away from the interpreter runtime and switch to the JIT runtime, and as soon as that happens the interpreter runtime is no longer supported.

Also consider what you are doing, whilst you think it may be nice and simple, its actually quite a complex task, just looking at your using statements you are not only asking a program to interact with your network card (load drivers, create sockets, do host-name lookups, but are looking to work with anonymised advanced language features of c# 3.0. Theres a lot of backend work that needs to go on for this too work).

I'm sure the Mono team will support hpux eventually, you can get a list of the current supported platforms here

John Mitchell
  • 9,653
  • 9
  • 57
  • 91
  • Yea I see your point but I don't think I can really wait that long(the mono team might also fix the compatability by tomorrow for all I know). – iris Jul 04 '12 at 11:52
  • What about looking at python in the mean time, it runs on most systems and can do a lot of the things C# can do without a massive overhead. At least until the mono team gets HPUX support going – John Mitchell Jul 04 '12 at 14:24
3

a small c# program, tasked with invoking a webservice and passing it the usual xml file with, for unix

Honestly? Write a simple script in a scripting language supported by your server. It'll save you the loss of quite some blood, sweat and tears.

That is of course, if you've tried it and it doesn't work. If it does: just use Mono.

CodeCaster
  • 147,647
  • 23
  • 218
  • 272
  • Sometimes the simplest solutions are the easiest. – Simon Halsey Jul 04 '12 at 09:46
  • C# is great, however picking the right tool for the right job is so much better. You wouldn't use a screwdriver to pull out a nail, or a hammer to tighten a nut (you could but it'd be painful!) – John Mitchell Jul 04 '12 at 09:52
  • Honestly I really don't see how bash scripting, it's what's comming to mind right now, might acomplish this. Was also considering about writing the program in java which shouldn't have the compatability issues c# faces on unix systems. – iris Jul 04 '12 at 11:55
  • @iris you can use [cURL](http://stackoverflow.com/questions/1444705/bash-script-for-downloading-files-with-curl) in bash, or install some other interpreter like [Perl](https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=PERL) or [PHP](http://stackoverflow.com/questions/4430/how-to-easily-consume-a-web-service-from-php) or any other scripting language. It will be easier to rewrite a relatively simple program than to get the C# version running on Mono. – CodeCaster Jul 04 '12 at 12:13
  • PERL. definitely PERL. simple switch from C# – JJ_Coder4Hire Mar 07 '14 at 22:45