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-26 02:06:50 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!212.74.64.35!colt.net!newspeer.highwayone.net!newspeer.clara.net!news.clara.net!news5-gui.server.ntli.net!ntli.net!news6-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> <3AE69665.63E362CD@info.unicaen.fr> <3AE6DAB3.899FF645@andrewcooke.free-online.co.uk> <3AE7E37B.F384DCDA@info.unicaen.fr> Subject: Re: Play with virtual machines (Was: Thoughts and Opinions...) 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: Thu, 26 Apr 2001 10:02:05 +0100 NNTP-Posting-Host: 62.252.137.23 X-Complaints-To: abuse@ntlworld.com X-Trace: news6-win.server.ntlworld.com 988275696 62.252.137.23 (Thu, 26 Apr 2001 10:01:36 BST) NNTP-Posting-Date: Thu, 26 Apr 2001 10:01:36 BST Organization: ntlworld News Service Xref: newsfeed.google.com comp.lang.ada:6946 comp.lang.functional:5319 comp.lang.misc:1149 Date: 2001-04-26T10:02:05+01:00 List-Id: "Jerzy Karczmarczuk" wrote in message news:3AE7E37B.F384DCDA@info.unicaen.fr... > I expressed my (partially) strong negative opinion about exploiting > the existing virtual machines for implementing a new, non-existing > yet and experimental language. I assembly here my answer to Chris > "Danx" (Campbell) and Andrew Cooke. > > Andrew Cooke quotes me: > > > > Sorry, but I am violently against this approach, if you want to do > > > something interesting, to learn new paradigms, to have some fun. Using > > > existing VPlatforms (BTW, C-- is not one) is good for the portability > > > and for the possibility of "selling" it to a wider community, but it > > > is a little boring, and you feel like putting yourself voluntarily > > > into a somebody else's straitjacket. > > > That seems a little strong. It was only a suggestion, as he's already > > working on other "new" stuff - a whole language. I agree, to learn you > > need to play, but the playing has to be fun. Making a sandcastle is > > fun, sweeping the Sahara clean is hard work. Using some kind of > > existing low-level support for your langauge might be a good way of > > keeping things light enough to be interesting. > > This "a little strong" accusation is right. I wouldn't say that, if the > author of the project was mainly concerned about coding, about making > his machine run his language in finite development time. Then, surely, > existing solutions are more than reasonable. > [Taking JVM would help him with GC; taking some models of SECD would > (perhaps...) help to implement the tail recursion, etc. But using JVM > would not teach him *how* to construct a garbage collector. This is a good point. I hadn't considered that before. Many languages i've used seem to regard the JVM as a holy grail of sorts, because of it's garbage collection. I'd rather not use it, since it has a stack based computational model, and for now i want register based one. I've been tinkering with a memory model suggested by Tucker Taft. Basically i had a problem with allocating memory, which would be somewhat restrictive in the ammount of space i could allocate. Tucker suggested i use a model close to Virtual Memory in computer OSes. I've had some difficulties with this, but i think i can make it work. The idea goes like this, you have page table:page number:offset, when a write occurs a page is either allocated (if it does not exist before hand) and written, or written to straight away. A read returns 0 for un-allocated page, or the data for an allocated one. I was thinking of having some kind of primitive GC. it goes like this: Rather than have all code and data in large contigous blocks, some (not commonly used routines) would put there data a separate page. When the routine is done, that page can be deleted. Don't know if this will work. Another scheme i thought about was adding a 32bit number to array, set, and list types. Each scope level has a number, when we go down the number increases. An array, list, set can only be deleted if the number decreases below it's own. This is just off the top of my head, so maybe it's impracticle. Not sure it would work in some cases. > Once more: I thought he wants to work in the kitchen more than just > having his meal prepared... An interesting way to put it. > > > > Also, I know C-- isn't a virtual machine, but it is a possible way of > > providing low-level support for a language, which is relevant here. > > That's right, of course. A low-level implementation language, better > structured and more portable than assemblers, and as powerful wrt. > branching and memory control, more than C, is something we will badly > need. But C-- won't give you the semantic model of your new language, > this is a different layer of description. Chris, who gives up C-- > right now because of his Windows commitment might return back one day, > but the VM construction will remain as it is. > > ******************************** > > > > "chris.danx" wrote: > > > p.s. i thought people generally ignored cross posting and let it > > stand as it is but obviously not. i don't know why folks drop them. > > is it because they think that messages posted from other groups > > won't be shown on their group? That's bolloks! That's the whole > > point of cross posting the message. > > This was not my point. Simply, some people abuse cross-posting in > a harmful, polluting way. The discussion domain, originally OK, > gets shifted, and after two days its subject has *NOTHING* to do with > the nsgroup profile. "Algorithm" groups full of postings about where > to find DirectX software, or about the status of software patents; > mutilingual programming/communication group starting to talk about > politics, etc. That's all. Filtering away all possible redundant > messages is impossible. Ah, i see. Sorry. Those people who abuse this are crappy. It's happened on one other group quite a lot. they're discussing delphi as a model for os development on two groups, it started with one guy asking what he should use but now they're arguing over delphi's features vs visual C's vs C hash vs whatever. It's quit annoying as the discussion was quite informative at the start, before all the Delphi bitching. > Chris asks also in a previous posting: > > > Fast iterators? I know what an iterator is but what is "fast > > iterator"? Just a suped up version of an iterator? > > I am an old user of array-oriented software: languages like Matlab > (or Scilab, Yorick, RLab, Tela, Octave...). What I meant is that if > you use all those tables, matrices, etc. *SERIOUSLY*, than the language > should provide you with an adequate number of high-level constructs > coded as efficiently as possible within the language kernel/standard > library. For example > *Maps and Folds: computing sums, maxima/minima, multiplying arrays > by scalars etc. Filters, transpositions. > *Comprehensions and generators: Intervals, like a .. b; Constructs > like Clean array comprehension > > {createArray 5 0 & [i]=elem \\ elem <-: {1,3,5,7,9} & i<-[0..4]} > > *Zips: scalar products, masking... > *Slicing, extracting sub-arrays. Streaming arrays (compact I/O). > > *Nice interfacing between graphic objects (bitmaps, z-buffers or > other stencils) and array manipulators. > Righty oh. That's a lot of work, but hey, i can see why it's useful. The language will be largely functional with some imperative features, and i was planning on having generators for lists and sets. I completely forgot about array generators and comprehensions, thanks. I'd only used clean a little since it can be difficult for beginners(like me). It's a nice language though. > == > > All this together permits to write a long piece of (say, Matlab) code > 10 times faster and shorter than the equivalent C code. Less bugs, and > because those operations are within the kernel, the execution speed > is very decent. You don't have to write dozens of loops (and debugging > indices...) No need to keep trace of dozens of temporary accumulating > variables... Here you are what I mean "suped up" iterators... > > Array-oriented software will be always needed by physicists, engineers, > etc. It is a pity that an array-oriented FUNCTIONAL language: Sisal > is dead. This is an ecological niche wide open. > I've never used arrays like you suggested before. I can certainly see the benefits now you've pointed it out. It seems like a good idea to include some support. This language will be almost completely developed with other people experimenting with it and sending in there results. Once the VMs working and the (more) structured assembly language (with nicer syntax, 86x and m68k aren't nice at all IMO) is working, an assembler and disassembler will be next. Then it will be the first prototype will arrive and people can tinker. I decided to do it this way since involving people will only improve it. The main problem will be die-hards who wan't me to do another Haskell, or Ada, or people who say lisp has everything and add this cos' X has it. That's not helpful, people need to make arguments for the right reasons, not for bad ones. Chris