Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Kuba Ober <ober.14@osu.edu>
To: Will Farr <farr@mit.edu>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ocaml doesn't need to optimize on amd64??
Date: Mon, 14 Jan 2008 07:16:36 -0500	[thread overview]
Message-ID: <200801140716.36916.ober.14@osu.edu> (raw)
In-Reply-To: <ef6818c20801120820p67fb36f4j75f3546f7089eeda@mail.gmail.com>

> > Yeah, but my area of interest is really embedded realtime stuff, running
> > typically on architectures which are quite resource constrained. On some
> > of those your typical GC wouldn't even fit in the code memory. And I'm
> > not even (most of the time) using dynamic memory allocations. None of my
> > code really calls for any sort of boxing -- there's no need for it. All I
> > need is C that is more expressive and easier to optimize. No run-time
> > variants, really, all types are known and fixed, and data is at fixed
> > locations in memory, or on the stack, or occasionally on the heap which
> > is manually managed (C-like).
> >
> > Of course that pertains to the code that gets generated, because I should
> > be able to use abstract concepts while writing the code. If I pass a
> > function to a function, it doesn't necessarily mean that the compiler
> > must emit the code for the former, and that the latter should actually
> > call (as call machine instruction) the former.
>
> This may be something you have seen before and dismissed, and it's not
> really OCaml at all, but have you looked at PreScheme?  It's a scheme
> dialect (and, in fact, runs *un-modified* in a scheme interpreter),
> plus a compiler that turns it into optimized C of the type you're
> talking about.  (For example, one optimization is that all
> higher-order procedures are beta-substituted away at compile time.)
> It might not really fit your needs, but perhaps there's some ideas you
> could steal there, in any case.  (The scheme48 guys used it to write
> the VM for scheme48, which sounds to my un-expert ears like it would
> have a lot in common with the tasks you're looking at doing.)

If it turned it into C-- it'd be even better, because I can't count much on C 
compilers for my platforms either: Zilog Z8 compiler and assembler/linker has 
bugs which produce wrong code, and for SX28 there's, afaik, only one C 
compiler that isn't quite there yet anyway.

C-- would be easier to generate code from.

Right now my hackish platform runs in LISP, so Scheme wouldn't be so much 
different, but I don't really know how macros are done in Scheme, and I kind 
of depend on them.

Cheers, Kuba


  reply	other threads:[~2008-01-14 12:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-09 14:22 Kuba Ober
2008-01-09 17:14 ` [Caml-list] " Jon Harrop
2008-01-10 22:56   ` Jon Harrop
2008-01-11  0:42     ` Peng Zang
2008-01-11 13:14     ` Kuba Ober
2008-01-12 16:20       ` Will Farr
2008-01-14 12:16         ` Kuba Ober [this message]
     [not found] ` <20080110024359.GA15544@mulga.csse.unimelb.edu.au>
2008-01-10 13:56   ` Kuba Ober
     [not found]     ` <47862F53.1050605@janestcapital.com>
2008-01-10 16:36       ` Kuba Ober

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200801140716.36916.ober.14@osu.edu \
    --to=ober.14@osu.edu \
    --cc=caml-list@yquem.inria.fr \
    --cc=farr@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox