Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #9429

Re: back to .Net? lesser of two evils?

From BGB <cr88192@hotmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: back to .Net? lesser of two evils?
Date 2011-11-03 00:01 -0700
Organization albasani.net
Message-ID <j8te92$3ms$1@news.albasani.net> (permalink)
References (1 earlier) <4eb0a862$0$294$14726298@news.sunsite.dk> <j8qkqm$pvh$1@news.albasani.net> <j8qqqm$41c$1@speranza.aioe.org> <j8rlqc$19m$1@news.albasani.net> <4eb1bef4$0$286$14726298@news.sunsite.dk>

Show all headers | View raw


On 11/2/2011 3:06 PM, Arne Vajhøj wrote:
> On 11/2/2011 10:58 AM, BGB wrote:
>> On 11/2/2011 12:17 AM, Cindy wrote:
>>> On 02/11/2011 1:35 AM, BGB wrote:
>>>> On 11/1/2011 7:18 PM, Arne Vajhøj wrote:
>>>>> On 10/28/2011 4:29 PM, jebblue wrote:
>>>>>> With Oracle on one side suing Google over Android
>>>>>> and on the other cooing about how many phones
>>>>>> run Java; I'm wondering if it might be worth it
>>>>>> to put my ideological views about Microsoft aside
>>>>>> and consider going back to .Net.
>>>>>
>>>>> Why should the question whether Google infringed on
>>>>> Oracle copyright or patents affect your choice of
>>>>> programming language?
>>>>>
>>>>
>>>> maybe because it asserts that Java is not a free/open technology,
>>>> and is
>>>> essentially a proprietary product owned by Oracle?...
>>>>
>>>> granted, .NET has the same basic issue (it is owned by MS, ...).
>>>
>>> .NET is much worse. Anyone can write a conforming Java implementation
>>> that people can use and anyone else can code for it, without permission
>>> from Oracle. With OpenJDK, there is a complete open source conforming
>>> implementation, in particular. The one restriction I'm aware of is that
>>> you can't actually call it "Java" unless it passes certain tests or else
>>> you're looking at a trademark infringement lawsuit, whereas you could,
>>> say, write a Lisp interpreter and call it C if you wanted to.
>>>
>>
>> yeah. however, one can't really make subsets or add extensions, which is
>> lame.
>
> You can not make a subset and call it Java. But you can call
> it something else.
>
> SUN/Oracle has not sued Google over Android being a subset
> or MS over J# being a subset.
>

fair enough, but generally one thinks of "Java" as the generic name, but 
technically this is the brand-name, and there is no good name for 
"basically the core Java language but an incomplete/subset implementation".

apparently, some people have used "coffee", but this hasn't really 
caught on.


>> Mono also can't run C++/CLI code last I checked, which sort of screws
>> over my personal motivation to use it.
>
> It should be able to run pure code. Obviously not mixed code.
>

yes, but banning mixed code sort of breaks C++/CLI's ability to... 
actually work...

even if one compiles the code itself as pure CIL, then Mono rejects it 
due to things like "can't load MSVCR80.DLL" or similar.

however, about the only real reason I would have to use it would be 
because "C++/CLI is nifty, since I can straddle the border between C# 
and plain C and C++ code".


I am technically left better off just using my own VM and language, 
since I can at least make most of this stuff work ok without 
compromising my ability to run cross-platform (and don't really all that 
much need a standardized VM and language for what I am doing).

granted, my language is mostly filling a similar role to Python or Lua 
or similar, just without my personal dislike of Python and Lua...


I had an "ARM scare" a while back (I was worried that my reliance on 
code-generation and ASM would compromise my ability to easily port my 
stuff to ARM), however I was able to address this "adequately" for now 
(partly by adding ARM and Thumb support to my assembler, and adding some 
amount of "emergency plain-C fallback logic" for cases where I wasn't 
going to bother porting the ASM code-generation logic).


>> I suspect another issue is that, at the VM level, .NET is a good deal
>> more complicated than the JVM. one can load/run JBC mostly by writing a
>> reasonably straightforward class-loader and an interpreter for the
>> bytecode.
>>
>> similar does not work as easily for MSIL / CIL, as in many respects it
>> is more complicated, and assumes the use of type-inference by a JIT,
>> meaning a plain interpreter would also need to use dynamic type-checking
>> while also faking static-type semantics.
>
> I believe Mono has a portable CIL interpreter.
>

I think it does.


I am not saying it can't be done, just a naive/"plain" interpreter wont 
perform very well (and will be more complicated than its JBC equivalent).

one can write a "less naive interpreter", which could perform better, 
but this is a bit more complicated...


basically, the "standard form" of a bytecode interpreter is something like:
while(doStuff)
{
     op=*ctx->ip++;
     switch(op)
     {
     execute-opcodes...
     }
}

but, such an interpreter will not perform well, given the way types are 
handled in CIL (CIL does not declare types with the opcodes, whereas JBC 
does).


one would need instead:
while(stillBytecode)
{
     op=*ctx->ip++;
     switch(op)
     {
     build-threaded-code...
     }
}

...

//execute code (threaded interpreter)
cur=startOp;
while(cur)
	cur=cur->fcn(ctx, cur);


however, the creation of such an interpreter is more effort...

granted, yes, with compiler or VM technology in general, one has to be 
willing to tolerate a certain level of complexity (and, with both JBC 
and CIL, the interpreter is likely to perform a lot better, as with 
switch-based interpreter loops, very often the "switch()" header will 
come to be the dominant factor in the total execution time, whereas with 
the threaded-loop, with each function pointer representing the exact 
behavior to be performed, the interpreter will generally run a fair 
amount faster).


the main difference it makes for CIL though, is that it allows largely 
avoiding the use of run-time type checking, which is one of those things 
which can eat lots of time in an interpreter (causing code to easily run 
100x or more slower than native...).

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

back to .Net? lesser of two evils? jebblue <n@n.nnn> - 2011-10-28 15:29 -0500
  Re: back to .Net? lesser of two evils? Steve Sobol <sjsobol@JustThe.net> - 2011-10-28 15:16 -0700
    Re: back to .Net? lesser of two evils? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-02 07:05 -0300
    Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-02 22:46 -0400
  Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-01 22:18 -0400
    Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-01 22:35 -0700
      Re: back to .Net? lesser of two evils? Cindy <c.thurston@frell.okb.uwa.edu> - 2011-11-02 03:17 -0400
        Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-02 07:58 -0700
          Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-02 18:06 -0400
            Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-03 00:01 -0700
              Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-03 20:48 -0400
              Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-03 20:52 -0400
                Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-09 07:21 -0700
                Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-09 20:30 -0500
                Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-09 22:48 -0700
        Re: back to .Net? lesser of two evils? coder <j-code@speak.invalid> - 2011-11-02 17:36 -0400
          Re: back to .Net? lesser of two evils? Lew <lewbloch@gmail.com> - 2011-11-02 17:13 -0700
          Re: back to .Net? lesser of two evils? Cindy <c.thurston@frell.okb.uwa.edu> - 2011-11-03 00:49 -0400
            Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-03 00:10 -0700
              Re: back to .Net? lesser of two evils? Cindy <c.thurston@frell.okb.uwa.edu> - 2011-11-03 04:41 -0400
                Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-03 05:36 -0700
          Re: back to .Net? lesser of two evils? thoolen <tholen01@gmail.com> - 2011-11-02 23:13 -0700
      Re: back to .Net? lesser of two evils? markspace <-@.> - 2011-11-02 08:28 -0700
        Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-02 10:04 -0700
          Re: back to .Net? lesser of two evils? markspace <-@.> - 2011-11-02 10:19 -0700
            Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-02 14:32 -0700
              Re: back to .Net? lesser of two evils? Lew <lewbloch@gmail.com> - 2011-11-02 17:20 -0700
                Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-02 21:34 -0700
                Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-03 20:57 -0400
                Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-09 09:25 -0700
                Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-09 20:25 -0500
                Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-09 23:05 -0700
      Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-02 17:26 -0400
        Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-02 15:01 -0700
          Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-02 18:18 -0400
            Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-02 18:20 -0400
            Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-02 22:30 -0700
              Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-03 21:30 -0400
              Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-03 21:40 -0400
  Re: back to .Net? lesser of two evils? Roedy Green <see_website@mindprod.com.invalid> - 2011-11-01 23:42 -0700
    Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-02 10:22 -0700
      Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-02 18:02 -0400
        Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-02 20:10 -0700
          Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-03 20:45 -0400
            Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-09 09:56 -0700
    Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-02 18:01 -0400
      Re: back to .Net? lesser of two evils? markspace <-@.> - 2011-11-02 15:26 -0700
        Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-02 18:35 -0400
          Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-02 20:53 -0700
            Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-03 21:45 -0400
              Re: back to .Net? lesser of two evils? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-04 05:50 -0300
                Re: back to .Net? lesser of two evils? Lew <lewbloch@gmail.com> - 2011-11-04 10:39 -0700
                Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-04 17:38 -0400
                Re: back to .Net? lesser of two evils? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-04 18:47 -0300
              Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-09 10:11 -0700
                Re: back to .Net? lesser of two evils? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-09 20:24 -0500
                Re: back to .Net? lesser of two evils? BGB <cr88192@hotmail.com> - 2011-11-09 23:42 -0700

csiph-web