From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 107f24,6f568a2e6507575 X-Google-Attributes: gid107f24,public X-Google-Thread: f891f,6f568a2e6507575 X-Google-Attributes: gidf891f,public X-Google-Thread: 103376,6f568a2e6507575 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-25 03:46:36 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!195.224.53.60!nntp.news.xara.net!xara.net!gxn.net!news5-gui.server.ntli.net!ntli.net!news2-win.server.ntlworld.com.POSTED!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada,comp.lang.functional,comp.lang.misc References: <3AE67F57.722A78D8@andrewcooke.free-online.co.uk> Subject: Re: Thoughts and Opinions or something like that X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Wed, 25 Apr 2001 11:42:02 +0100 NNTP-Posting-Host: 62.253.8.134 X-Complaints-To: abuse@ntlworld.com X-Trace: news2-win.server.ntlworld.com 988195292 62.253.8.134 (Wed, 25 Apr 2001 11:41:32 BST) NNTP-Posting-Date: Wed, 25 Apr 2001 11:41:32 BST Organization: ntlworld News Service Xref: newsfeed.google.com comp.lang.ada:6914 comp.lang.functional:5281 comp.lang.misc:1125 Date: 2001-04-25T11:42:02+01:00 List-Id: Hi, > > Things I'd like from a VM (off the top of my head - I don't use VMs > directly and I have no idea whether the following are possible): > > - garbage collection Garbage collection is good in theory and in practise too. The problem is that it is complex to implement. I will be including some support for it, but i completely forgot about the technique. Thanks for reminding me Andrew. > - support for coroutines (no single stack restrictions) > I don't understand what you mean by "coroutines" but i assume from what comes next it's got something to do with multiple stacks. I suppose i could try something like having more than one SP in the RISC version and see how that goes. Pop S2, for pop stack 2. Or more generically Pop An, where An is an address register pointing to the stack. Then i could integrate more a specific, better design in the WillowVM (VM version 2). > - support for tail recursion > This is something i never got my head round. I get primitive recusion, which involves just recurring a function (e.g. a factorial function), but i know this is innefficient. Tail recursion has to do with finishing the computution before calling another smaller version of the computation. This means the system can use the same frame over for the function i think? Sounds like a good idea in theory, but how would one implement this in practise? I would implement something like this if i could, because functional programs tend to rely on tail recursion a lot. My Haskell is currently limited to only primitive recursion, but i'm still learning. > (the last two are known problems with the JVM, I believe). > > If you want to concentrate on your language, rather than writing the VM, > you could target an existing machine - apart from the obvious .net and > JVM, you might consider C-- I think i will use the simple RISC machine at the start and when i know what features are going to be in the language i will develop a VM. The good thing about the implementation of the RISC VM is that the VM is currently 100% portable Ada. There are problem coming from interface to system for files, etc. I haven't been able to think of a good way to do this yet, and all the schemes i devised for representing calls in assembly have been too complex. Need something simpler, and i've been working towards this. This too will hopefully be 100% portable Ada thanks to Ada's standard packages. I'm not holding my breathe though. Thanks, Chris.