Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Runtimes and Open Source? 43

Caoch93 asks: "I recently read the Mono project's rationale and have found it compelling in the way it shows the Mono project as being the result of engineering concerns rather than concerns of siding with Microsoft. One thing that it has strongly bolstered in me is my belief that runtimes which interpret intermediary languages are going to play an increasingly important role in programming in the years to come, and it makes me wonder- should the open source community consider developing its own runtime (ala JVM or CLI) which would thus be totally open to the public? Currently, it seems like the options for a runtime are the JVM, which is still dominated by Sun with respect to its design future, and CLI, which is an ECMA standard but is critical to the Microsoft .NET platform. It would seem to me that having an open source runtime (and languages that compile to it) could be critical to moving with the times, and the freedom from proprietary influences would seem to be important to keeping such a system truly in the interest of its programmers. I don't know...is CLI already achieving this? I an ECMA standard enough, or is an ECMA standard really just codification of proprietary interests. If so, should the open source community consider its own itermediary language runtime...and what would be proper goals for such a project?"
This discussion has been archived. No new comments can be posted.

Runtimes and Open Source?

Comments Filter:
  • Parrot (Score:4, Informative)

    by phnx90 ( 208011 ) <amayil@@@sdf...lonestar...org> on Friday January 31, 2003 @05:47PM (#5199567) Homepage
    Parrot [parrotcode.org] the VM for Perl6 is being developed w/ multiple languages in mind.
    • You beat me to it. More information here: Slashdot Article on Parrot [slashdot.org]
    • Re:Parrot (Score:5, Insightful)

      by Graelin ( 309958 ) on Friday January 31, 2003 @06:00PM (#5199698)
      Yeah, that's what I was thinking.

      Parrot seems to achieve this goal to a degree. I don't know if the Parrot folk see it as an OS universal runtime and that may hinder it (in this capacity).

      As you say, they're planning for multi-language support. I think they're trying to make it Python ready, that right there is two of the major OS languages.

      I don't think Parrot will be adopted too quickly though. Look at Apache, 2.0 adoption has been slow due to lack of 3rd party modules. Now think about CPAN - same thing.
      • Re:Parrot (Score:4, Informative)

        by babbage ( 61057 ) <cdevers.cis@usouthal@edu> on Friday January 31, 2003 @06:48PM (#5200088) Homepage Journal
        Yes, Python is a target language, as are PHP and Ruby. I understand that there have also been toy implementations of languages like Scheme & Forth on top of Parrot as well -- I don't know much about language design, but apparently those were good proof of concept languages early on. In addition, there is work underway on a mod_parrot Apache modules which would allow any Parrot capable language to run with Apache the way that mod_perl can today.

        Parrot support seems likely to catch on because the plan is for Perl6 to run on top of it, and chances are very good that Perl6 will be adopted pretty widely in time. If other target languages have enough faith in Parrot to embrace it as well, then even better, but Perl alone should be strong enough to guarantee widespread distribution in due course. And everyone knows that all the current [by then "legacy"] code is going to have to be supported somehow, so backwards compatibility in one form or another is a very strong possibility -- which means that the problems Apache2 is having hopefully won't be so bad for Perl6. Hopefully.

        The problem between now and then is that the three main Perl6 developers -- Larry Wall (language designer), Damian Conway (co-language designer & evangelist), and Dan Sugalski (low level implementation, including Parrot) -- are all out of work right now. They're all in the unfortunate position of being ridiculously over-qualified for most Perl hacker jobs, and finding an employer that would be willing to sponsor them to do Perl6 development right now is proving to be tricky. If anyone could give a hand to these guys, they and their families would appreciate it today, and the whole Perl community would appreciate it in the long term -- having them focusing on paying the bills kind of forces Perl6 to wait... :(

        • And everyone knows that all the current [by then "legacy"] code is going to have to be supported somehow, so backwards compatibility in one form or another is a very strong possibility

          Not only is it a strong possibility, it's assured. There will definitely be a Perl5 interpreter for Parrot as well, so all that old Perl5 code won't necessarily have to be ported or tossed out.
        • Re:Parrot (Score:3, Interesting)

          by bwt ( 68845 )

          I think that Parrot needs more buzz about it. The real impact of Parrot would be that if Perl, Python, and Ruby all use it as their VM, then the triplication of effort in library building can be reduced. That is a powerful possibility!

          Think about something like the Eclipse SWT. It uses native GUI calls and provides a platform independent java wrapper around them, and emphasizes a nice set of programming patterns. That could be naturally extended to any of Perl, Python, or Ruby. So build a gui kit directly in Parrot and presto -- you've got all three.

          Additionally, work spent optimizing parrot benefits perl, python, and ruby simultaneously. Things like JIT and hotspot compilers can be developed for the benefit of all. I'd expect us to see a gcp counterpart to gcj as well.

  • I don't see what the problem is with Java. I believe an open-source JVM and compiler for Linux are available.
    • Currently, it seems like the options for a runtime are the JVM, which is still dominated by Sun with respect to its design future

      Pretty much sums it up I think. From an OS perspective having Sun invovled (as much as they are) is a bad thing. Remember, in the end it's all about money to Sun - in a pinch you bet they'll piss of the community.

      OTOH, one must ask if this is such a bad thing? Something like this was need an absolute authority. Absolute Authority goes against the grain of open source, the GPL at least.

      What good would a common-runtime be if you needed 19 [slightly] different versions of it to run everything?
    • Re:Java? (Score:5, Insightful)

      by Gerry Gleason ( 609985 ) <gerry@@@geraldgleason...com> on Friday January 31, 2003 @06:11PM (#5199802)
      One of the big problems cited in the past was that Sun would not certify OS JVMs, without a big fee. In most cases, this is impractical for OS projects that need to spend limited resources on development and infrastructure. I know some have suggested a certification "scholarship" idea, but I don't know if that has gone anywhere. I'm more willing to trust Sun and their long history of promoting open systems, if not open source, but others remain very skeptical.
  • by manyoso ( 260664 ) on Friday January 31, 2003 @06:02PM (#5199710) Homepage
    While I can certainly understand the patent concerns, it is important to note that discussions have taken place between the DotGNU Portable.NET [dotgnu.org] project and the people working on the next generation perl runtime. This provides a very good way out in case Microsoft goes after Mono and Portable.NET with patent claims.
  • by kevin lyda ( 4803 ) on Friday January 31, 2003 @06:07PM (#5199758) Homepage
    you mean like squeak? or perl's parrot?

    since open source people don't worry about distributing source, scripting languages like perl, python, ruby and others fill this niche to some degree as well. binary vm's exist to a large degree to allow people to hide their source and still have portable apps.

    plus i remember there being work long ago to have gcc's intermediate language done as a runtime. someone more knowledgable then me could mention that. and elisp precompiles (so does python).
  • by Jerf ( 17166 ) on Friday January 31, 2003 @06:08PM (#5199773) Journal
    A lot of VMs already exist, even if you don't always see them. Anything that "compiles" to anything other then direct machine code is already running on some virtual machine.

    I believe current Perl already does this, just completely internally. IIRC, OCaml does this, along with the option of compiling to a "true" executable. Python compiles to a Python virtual machine; the ".pyc" files are the virtual bytecode for that machine and are cross-platform; any Python 2.1 .pyc will work on any other Python 2.1 install. In addition, Jython will take Python code and convert it to JVM code.

    VMs aren't that hard to build, as evidenced by the profusion of them. Standardizing on one has strong implications for the kind of language that can be run on top of it; witness the recent disappointment in the dynamic language community with some of the .NET decisions, which would have hampered the execution speed of those languages. (Which I believe Microsoft wants to fix.)

    In fact, building a VM is often the best solution anyhow, as it give you a controllable layer for optimization, a controlled abstraction, and relatively easy cross-platform building. And for a skilled programmer already working with parsing and compiling some language, it's not that much extra effort to build overall.

    VMs seem to me to be like programming languages; they aren't that hard to make. What's hard is making a really good one, and what's even harder is making one that everyone likes, which may not even be possible since I still here people bitching about RISC vs. CISC, despite the fact that the debate is nearly moot on modern processors. At the very least, true standardization into "One True Virtual Machine" is very, very premature; what I believe is that it's as bad an idea as trying to standardize into "One True Language", with almost a one-to-one correspondence for the reasons why they are a bad idea, and it should not happen ever.

    (Which of course should not be confused with saying that any given VM should not standardize; that's obviously OK.)
    • You raise the question, and suggest a pessimistic answer. Yes, there are a lot of important measures of success for a VM (good match to real machines, good match for language set, managability, etc.). I agree that standardizing on "One True Language" is a bad idea, and probably so is "One True VM", but I think this is less obvious.

      I think the problem is that there are so many issues involved. First, there is the desire to distribute machine independent code, then there are the runtime environments which is where things get really complex. Stripping away all the libraries of the environment, there are still a lot of issues relating to calling conventions (these are critical to maintaining the integrity of the user code "sandbox" (e.g. Java)), and data types (i.e. raw data structures of basic types vs. objects and strings, and the implications of this for memory management).

      What may be possible is to settle on a small number of optional aspects of the VMs, but still have a single framework so that code from language systems that require different option sets can all be accomidated. The single unified VM that supports everything would probably be pretty big and complex, but at least it would be possible and practical, and the VM could manage the interfacing requirements to enable integration of sub-systems from radically different languages. Many choices in VM implemetation won't change the VM, but make a big difference in how well it runs. JIT technology, and other speed/space or even run/startup speed tradeoffs are part of it. Management interfaces is another area for variation that may also be visible in the environments (i.e. library APIs).

      Seems possible, but it doesn't make sense from a single vendor with a single vision. I have always taken it to be axiomatic that no vendor should "own" a language. Writing code for a language system that can't be freely implemented by other vendors puts you and your organization at the mercy of a 3rd party. In most cases, this is folly bordoring on incompetence. I claim the same is true for VMs; don't give the vendor power to contol your future path/options.

    • I don't really think this is true... .pyc files for example are not some Python bytecode, they are just parsed Python code, so the only thing that's being saved when you execute .pyc or .pyo files is syntax-checking and start-up time, not interpretation per se. AFAIK, the same is true for Perl. And as far as I can tell from recent articles, Parrot is (unfortunately) all but dead.

      I think the only viable solution is for OSS languages to develop interpreters for the main VMs... Python has the excellent Jython interpreter that lives completely in the JVM and is fully compatible with the CPython interpreter. Active State has Perl.NET which does the same thing for Perl on the CLI. It's a very good start (now, if only Python.NET was actually completed, I'd be happy...)
  • As always (Score:2, Funny)

    by Kickasso ( 210195 )
    Emacs is the answer!

    (Emacs is a VM for running elisp code)

  • Competition... (Score:4, Interesting)

    by DarkDust ( 239124 ) <marc@darkdust.net> on Friday January 31, 2003 @06:18PM (#5199862) Homepage

    Well, someone else already meantioned it, Parrot [parrotcode.org] is Perl's way of doing a VM and looks really nice. So there already is a VM... beside other languages which use VMs already.

    But I also think that too much competition in this field wouldn't be that good either. Don't get me wrong, competition is always good, but too much isn't since those competiting VMs targeted at the same market would stiffle its own distribution, IMHO, since it COULD happen that none gets a really broad distribution.

    And a widespread VM is a good one, at least for the programmer, because he can assume the most widespread VM to be avaible to most to users, that is they already have it and don't need to install it first so that you're able to install your software. And requiring the user to install as few files as possible is a Good Thing(tm) :-)

    And this is the reason why I think CLI will succeed, despite me not liking MS: it will be widespread, users won't have to install it since it already comes with your Windows. And others can use either MS's FreeBSD implementation or Mono. Would Parrot or another VM be included in Windows this one would succeed. It already was the reason for Javas success so far: the reason you already had it in you Netscape and former IE (AFAIK) made it very easy to use for end users. Had MS distributed an up-to-date JVM in XP, Java would have left no room for CLI, I guess.

    Having others VM would be nice but with many people focussing on one VM the avaibility of good tools is better for that VM, thus enabling programmers to more easily write good programs.

    On the other side there should always be an alternativ, just because there is no one true way of doing things and every application has a different need and thus you could choose the VM that fits your need more closely :-)

    • Re:Competition... (Score:3, Interesting)

      by aminorex ( 141494 )
      > And this is the reason why I think CLI will succeed, despite me
      > not liking MS: it will be widespread, users won't have to install
      > it since it already comes with your Windows.

      Learn from the example of Java. The biggest problem with
      deploying Java applications and applets is that there is no
      good JVM available on client machines. The situation with .NET
      is no better -- in fact, it is worse. While (due to usoft's
      illegal monopoly brigandage) 99% of all computers sold going
      forward will run Windows XP and hence have a .NET runtime,
      computer sales are slow, and the number of Win95, Win98,
      NT4 and W2K installations out there is probably growing just
      as fast as XP (almost all illegal), and is much bigger to begin
      with -- vast, even. As a result, you can't deploy an app or
      a control over the net without incurring an enormous start-up
      overhead to download the .NET runtime. It's a non-starter.

      It will be many, many years before .NET is reliably available
      on Windows machines, and in the meantime, a *modern* JVM will
      be shipping with Windows (and in Windows Update), so that .NET
      is in no better condition than the JVM.

      Frankly, even the 800 lb. gorilla isn't going to be able to
      push .NET hard enough to make it appealling as a platform
      for general deployment for a long, long time. Now for an
      enterprise that has foolishly cast all of its eggs into the
      Microsoft basket, and paid licenses or XP everywhere (or
      administratively enforced the installation of .NET on all the
      9x/NT/2000 desktops and laptops in the organization), .NET
      may be an appealling platform -- but I would much prefer to
      avoid vendor lock-in and use a standard JVM, personally.
      Especially when the servers run J2EE, so there is in-house
      Java development expertise anyhow...
  • One of the problems with CLI is its arbitrary choice not to allow languages and libraries to distinguish mixed-case identifiers. More precisely, it doesn't allow them to export mixed-case identifiers; they can use them internally, but not for interoperability.

    It's kind of silly, because they could have just mandated that languages that don't distinguish case should export lower-case identifiers, and then note that libraries that one wants callable from such languages should only export identifiers they can see.

    Oh well, maybe next time somebody'll get it right.

    • I can see why you consider this a problem - an oversight on the part of the CLI developement team, but you fail to follow through and explain just how this issue makes the CLI unsuitable.
      • borgboy writes: " I can see why you consider this a problem - an oversight on the part of the CLI development team, but you fail to follow through and explain just how this issue makes the CLI unsuitable."

        It wasn't an oversight, it was a deliberate choice. It makes the CLI unsuitable as a language-independent platform because it forces a choice that is the province of the language designer. It is just the grossest example of a detail that makes it impossible to export libraries written in in common languages in a natural way. Of course there are myriad more subtle gotchas with the same effect.

        To understand how hard this sort of thing really is, look at what is done in Gcc so that it is possible to call and throw exceptions between C++ and Java. Imagine doing that for languages that are interestingly different from one another when you don't even know them. Then consider that you have to specify portable semantics of dozens of libraries that have to hide platform differences. It's no wonder this sort of thing doesn't really work.

        It's very clever of MS to promote something that will appear to be portable, making people feel safe, but can never really be. They have got those Mono people completely flummoxed, and the Mono people are unwittingly helping to flummox everybody else. We can only hope that people's experience with Java will prepare them to examine the C#/Mono details carefully enough not to be burned again.

    • You'd think case sensitivity could be specific to the language of the library. Ok, you need a convention for calling out from a case-insensitive library or program, and that would make entry points that use mixed case or one different than the "common" convention inaccessable to the case-insensitive code, but nothing would break.

      If you need to support one-case environments, it's going to be hard to fully link these to more flexible environments. This goes for any mismatch in legal characters in external identifiers unless you have some complex standard for creating mappings or something.

  • Isn't this what proprietary companies are so often accused?

    "Not Invented Here! Re-invent the wheel plz k thnx."

    Microsoft may be the source of the .NET platform and C# language, but it is in the industry's interests to diversify upon a common standard. There's no point in introducing an incompatible standard just because it didn't originate as Open Source. That there is an Open Source implimentaiton (which will be be essential to the new platform's vitality) makes the whole question prude.

    The potential problems just come right back to software patents...

    I think the biggest serious danger is the existance of a homogenous software platform. A homogenous software environment is deadly vulnerable to exploits, malicious and accidental. Already some bad security assumptions in the standard are known to the Mono project. I'm a bit concerned, but I think Mono is a Good Thing. The question requires you to disagree, and I don't.
  • I really feel that in this day and age we don't need a VM in the traditional sense. I think it would be much better if Java just compiled to native code and we had FAT binaries then people would just need libs like Java141.so and everything would work, and no one would bitch about java being slow.

    What am i missing? Why the VM and not just a good all ecompasing class lib?

    • by yerricde ( 125198 ) on Saturday February 01, 2003 @12:08AM (#5201813) Homepage Journal

      I think it would be much better if Java just compiled to native code

      There's a reason that intermediate representations such as JVM, MSIL, and Parrot exist. They act as a base from which the operating environment can recompile the code, optimized for a particular microarchitecture.

      and we had FAT binaries

      That may have worked for Mac OS 7, where a binary typically had two architectures' code (68020 and PowerPC) code, but for portability beyond the Mac, you need more architectures in the binary, to the point where it's bloated beyond belief. Do you really want to have to compile the same code for Alpha, ARM, Athlon 64, IA32, IA64, MIPS32, MIPS64, PowerPC, SPARC, and UltraSPARC architectures every time you release a milestone build to the public?

      and no one would bitch about java being slow.

      Java technology on the whole isn't slow. Implementations of the Swing GUI are slow. The Microsoft implementation of Windows.Forms GUI isn't nearly as slow as Swing, which is why the .NET framework seems to "feel faster" than Java technology.

      • I totally agree with you about java not being slow. But, check out the mac users who bitch about limewire because it is writen in java. If my app was going to be an in house job, sure, java is great. but consumers think you are some how ripping them off when you ship a java app.

        • One of the reasons LimeWire may seem slow is because of Java's traditional handling of sockets, though, which was heavily synchronized. NIO changes that.

          Also, don't rule out people ranting about slowness because they know a program is in Java and believe Java is slow. I once fell victim to this misperception until some performance numbers set me straight. ;)

    • You can profile and reoptimise using JIT, so a JIT VM should always be faster than a precompiled binary (after the application/library has been used a few times)
  • Platform-independent runtime environments seem more interesting than they are because the devil is in the details. Most of the interesting details that differ between platforms are not, in fact, standardized by the *VM and its library, so for interesting, ambitious programs you only get the appearance of compile-once / run-anywhere without the fact.

    The range of differences may be seen easily when you run ./configure after unpacking a typical tarball. Given those differences, the differences induced by the CPU architecture in the semantics of (e.g.) C++ are not very significant, and are easily coded around. The result is that our familiar tarballs provide better portability than the *VMs, because when you encounter a problem, you can fix it, where with a bytecode file you're just stuck.

    The advantages of free software are not just political, they are bone-crushingly practical. The promises of *VMs tempt us to forget those advantages, but we keep getting reminded.

  • More compilers (Score:3, Insightful)

    by Mr. Shiny And New ( 525071 ) on Friday January 31, 2003 @08:02PM (#5200581) Homepage Journal
    Rather than invent more VMs, why not just make a compiler that targets whatever platform you need? We'll always need compilers that target a real platform; we'll always need a compiler for each language that we want; a VM is just another platform... in the end the most popular language/platform combinations will have good compilers. Actually trusting a VM for anything non-trivial is bad. You can never be sure how a java program will run on another Java platform. I suspect that the same is/will-be true of C#/CLI/.Net. In the end, supporting a java program on two platforms is as much trouble as supporting a C program on two platforms.
  • okay I guess that is not the noise that a parrot makes.... http://www.parrotcode.org/
    " Parrot is a virtual machine used to efficiently execute bytecode for interpreted languages - specifically, Perl 6, although we would like to keep the door open for other languages in the future. As such, Parrot will be the core of the Perl interpreter; it will be the target platform to which Perl 6 code is compiled."

    I think this would cover a CLI / JVM kinda thing.

  • I'm a Java developer. I'm really looking forward to Mono and Parrot. Hopefully they will provide the Open Source community an alternative to the de-facto C language, which seems to be universally applied to everything as low level as kernels, to as high level as GUI interfaces, other than Java which many developers seem allergic to, and to be fair does have its share of drawbacks, being proprietary apprently being foremost.

    Not to mention that many of the tool languages of the Open Source world are interpreted and each have to maintain their own interpreter implementation.
  • There is a GNU vm out there, it just seems to need a little work thou.
    http://www.gnu.org/software/lightning/light ning.ht ml
  • by Karellen ( 104380 ) on Saturday February 01, 2003 @07:25PM (#5206695) Homepage
    The Gnu Compiler Collection is a set of front ends that all convert the source code you feed them into an intermediate form called RTL (Register Transfer Language) which (as far as I've been able to work out) is a sort of pseudo-assembly language for an idealised CPU with an infinite number of registers and a whole bunch of other generalised rules.

    This RTL is then put through transformations (generic optimisations & stuff) before being sent to a particular GCC back end that generates machine code for a specific CPU from the RTL.

    So - why not save the RTL? It's an IL (Intermediate Language). If you added the ability of GCC back ends to run the code they generate directly, you've got an instant RTL VM.

    Well, according to the docs, it's an internal form, doesn't contain all the program info, and is already partly optimised for specific platforms. (http://gcc.gnu.org/onlinedocs/gccint/Reading-RTL. html), so you could use Trees, but I think they're only used for C and C++ so far.

    But I'm sure there's got to be a mid-point somewhere in GCC that you could create a language->IL and VM/Processor pair out of.

    K.
  • Lucent developed an experimental Distributed VM cum OS.

    The idea is that the whole machine / OS is virtualised and thus standard across architectures rather than Java's seemingly halfway house. With users & groups and plenty of runtime features.

    Better to take a look yourself [vitanuova.com] than rely on my patchy description.

    The source code is available if you pay. [& other stuff]

Money will say more in one moment than the most eloquent lover can in years.

Working...