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


Groups > comp.lang.misc > #11844

Write Once, Run Anywhere (was Re: What’s Your Least Favourite Programming Language?)

From Kragen Javier Sitaker <kragen@canonical.org>
Newsgroups comp.lang.misc
Subject Write Once, Run Anywhere (was Re: What’s Your Least Favourite Programming Language?)
Date 2026-08-28 16:43 -0300
Organization A noiseless patient Spider
Message-ID <871pbido8z.fsf_-_@debian> (permalink)
References <10e1m38$8ukd$1@dont-email.me> <20251031081742.00003c76@gmail.com> <87ik4vdrxw.fsf@debian> <116r3k4$218ss$5@dont-email.me>

Show all headers | View raw


Lawrence D’Oliveiro <ldo@nz.invalid> writes:
> On Thu, 27 Aug 2026 21:11:55 -0300, Kragen Javier Sitaker wrote:
>> I think that may have been true around 02001, when J2ME could run
>> more or less normal Java code on *all kinds* of fairly small feature
>> phones.
>
> Google didn’t use J2ME for Android because it had an inadequate
> protection model, and also Oracle were demanding too much money for
> it.

Yes, although J2ME is notable for what it *did* achieve, there were
excellent reasons for Google not to use it.

> But J2SE was available in an open-source form, namely OpenJDK. So they
> adapted that instead.

With respect, I think you may have gotten this wrong.  Originally they
used Apache Harmony (presumably they preferred its non-copyleft
licensing) but switched to OpenJDK in 02016 in response to the Oracle
lawsuit
<https://arstechnica.com/tech-policy/2016/01/android-n-switches-to-openjdk-google-tells-oracle-it-is-protected-by-the-gpl/>

>> Android might be the main exception; it ships with an incompatible
>> implementation of Java (without, for example, AWT), and although you
>> may be able to recompile Unix software for it, it can be difficult.
>
> You can run regular Linux distros under Android now.

I have to admit I badly blurred the clear distinction I was trying to
draw between “portable C” and “C under GNU/Linux [as opposed to Android,
which is also Linux], FreeBSD, and similar”.

What I was trying to say is that Android is not, itself, a “Unix” — in
the sense that you cannot realistically recompile Inkscape, Blender,
Audacity, or KiCad for it; you have to either do a port, or use some
kind of emulation layer, like Limbo, or like Google’s new carpetbagger
thing.

>> Unix doesn’t run on small microcontrollers, but C sure does. With
>> sdcc you can even run it on a PIC or an 8051, though you wouldn’t
>> want to.
>
> How about a Unix-like system that runs on a Z80 microprocessor:
> <https://www.dougbraun.com/uzi.html>.

Have you tried porting things like Emacs, GCC, ircII, or Inkscape to
UZI?  How do you do fork() without an MMU — write the entire contents of
memory out to disk, like PDP-7 Unix did?

There have been some Z80-compatible small microcontrollers, but
surprisingly few.  The Z80 itself didn’t include any on-chip RAM or ROM,
disqualifying it from the “microcontroller” moniker, and also required
some 500mW and had no low-power sleep, disqualifying it from
battery-powered handheld applications.  Even the TRS-80 Model 100 ended
up using the Intel 80C85 instead.

Dmitry Grinberg did boot GNU/Linux on an 8-bit AVR
<https://dmitry.gr/?r=05.Projects&proj=07.%20Linux%20on%208bit> by
writing an ARM emulator for the AVR, but he said that it “was too slow
to be practical” with a boot time of 6 hours.  The AVR is roughly 50
times faster than a Z80.

(He also built a Linux-running business card around a 48MHz ARM
<https://dmitry.gr/?r=05.Projects&proj=33.%20LinuxCard> and booted Linux
even more slowly on a 4004 emulating a MIPS CPU
<https://dmitry.gr/?r=05.Projects&proj=35.%20Linux4004>.)

Contiki is closer, but not very Unix-like.

>> This is a much less compelling choice in the last several years
>> since the Python maintainers have adopted a policy of deliberately
>> breaking standard library backward compatibility in every point
>> release.
>
> In what way?

They call it “removing dead batteries from the standard library”,
PEP 594 <https://peps.python.org/pep-0594/#rationale>, a document which
struggles to make sense as anything other than satire.  I wrote a longer
comment about this last year at
<https://news.ycombinator.com/item?id=44477966>.  Historically, you
could write apps for Python and run them in a pretty wide range of OSes
without touching the source code, but, since the adoption of this
planned-obsolescence policy, now you can’t even reliably run them on
consecutive releases of the same OS.

This makes it easy to encounter situations like this poster about
KittenTTS did, who says all of their Python versions on their various
machines are either too old or too new:
<https://news.ycombinator.com/item?id=44808718>

Contrast the stance of the Golang development team:
<https://go.dev/doc/go1compat>

Kragen

Back to comp.lang.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

What’s Your Least Favourite Programming Language? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-31 06:48 +0000
  Re: What’s Your Least Favourite Programming Language? David Brown <david.brown@hesbynett.no> - 2025-10-31 13:28 +0100
  Re: What’s Your Least Favourite Programming Language? John Ames <commodorejohn@gmail.com> - 2025-10-31 08:17 -0700
    Re: What’s Your Least Favourite Programming Language? bart <bc@freeuk.com> - 2025-10-31 22:47 +0000
    Re: What’s Your Least Favourite Programming Language? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-01 06:26 +0000
    Re: What’s Your Least Favourite Programming Language? BGB <cr88192@gmail.com> - 2025-11-03 14:05 -0600
      Re: What’s Your Least Favourite Programming Language? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-03 20:29 +0000
        Re: What’s Your Least Favourite Programming Language? BGB <cr88192@gmail.com> - 2025-11-03 14:55 -0600
          Re: What’s Your Least Favourite Programming Language? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-03 23:10 +0000
            Re: What’s Your Least Favourite Programming Language? BGB <cr88192@gmail.com> - 2025-11-04 12:02 -0600
              Re: What’s Your Least Favourite Programming Language? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-04 20:32 +0000
      Re: What’s Your Least Favourite Programming Language? John Ames <commodorejohn@gmail.com> - 2025-11-03 15:56 -0800
    Re: What’s Your Least Favourite Programming Language? Kragen Javier Sitaker <kragen@canonical.org> - 2026-08-27 21:11 -0300
      Re: What’s Your Least Favourite Programming Language? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-28 04:42 +0000
        Write Once, Run Anywhere (was Re: What’s Your Least Favourite Programming Language?) Kragen Javier Sitaker <kragen@canonical.org> - 2026-08-28 16:43 -0300
          Re: What’s Your Least Favourite Programming Language? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-28 22:37 +0000
            the history of Java in Android (was Re: What’s Your Least Favourite Programming Language?) Kragen Javier Sitaker <kragen@canonical.org> - 2026-08-28 20:27 -0300
              Re: the history of Java in Android (was Re: What’s Your Least Favourite Programming Language?) Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-29 01:30 +0000
                Re: the history of Java in Android (was Re: What’s Your Least Favourite Programming Language?) Kragen Javier Sitaker <kragen@canonical.org> - 2026-08-29 15:24 -0300
                Re: the history of Java in Android (was Re: What’s Your Least Favourite Programming Language?) Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-29 21:57 +0000
            Python deliberately breaking backward compatibility (was Re: What’s Your Least Favourite Programming Language?) Kragen Javier Sitaker <kragen@canonical.org> - 2026-08-28 21:03 -0300
              Re: Python deliberately breaking backward compatibility (was Re: What’s Your Least Favourite Programming Language?) Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-08-28 18:10 -0700
                [meta] Date-formats in postings (was Re: Python deliberately breaking backward compatibility (was Re: What’s Your Least Favourite Programming Language?)) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-08-29 06:39 +0200
              Re: What’s Your Least Favourite Programming Language? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-29 01:42 +0000
      Re: What’s Your Least Favourite Programming Language? John Ames <commodorejohn@gmail.com> - 2026-08-28 09:59 -0700
  Re: What’s Your Least Favourite Programming Language? Kragen Javier Sitaker <kragen@canonical.org> - 2026-08-27 20:09 -0300

csiph-web