From: Chris Hecker <checker@d6.com>
To: Dmitry Bely <dbely@mail.ru>, caml-list@inria.fr
Subject: Re: [Caml-list] CamlIDL question
Date: Sun, 13 Oct 2002 16:12:35 -0700 [thread overview]
Message-ID: <4.3.2.7.2.20021013154133.032e9ba0@mail.d6.com> (raw)
In-Reply-To: <wuome02k.fsf@mail.ru>
>There is "ffcall" library
>that implements trampolines for (probably) all hardware platforms where
>OCaml may run. Am I using it with OcamlIDL to do just what Youry asked
>for.
I was planning on using the ffcall library to make dynalinking to C
functions that take function pointers myself (you can see in the list
archive a year or so ago). I'm glad somebody's made it work.
However, the new bee in my bonnet is to have ocaml generate (or have it in
the asm files for each platform) a sort of meta-routine that can be called
at runtime to dynamically generate a range of different platform-specific
functions that are necessary for this kind of lowlevel work. You want some
kind of routine that can generate a closure/thunk like ffcall, or switch
the stack and cpu state like in the fiber/thread stuff, etc. The idea is
that since the ocaml runtime knows the platform (since it was compiled), it
makes sense to have it do the work of generating the necessary low level
code. This would be way better than forcing every library that wants to do
something cross-platform but low-level write asm or wacky C stuff or
include ffcall or another redundant cross-platform low level library (like
GNU pth, or whatever). If we got the generator function(s) right, you
could write a caml library that does wacky stuff and do it in a
cross-platform way (and if the meta-function was right and well debugged
you wouldn't have to exhaustively test your new library on every platform
before releasing it...well, maybe that's a bit optimistic, but you get the
idea).
The problem is to define the correct meta-function (or set of them), and
I'm not sure what that would be yet, but I'm pretty sure it's possible. I
got the idea from the concept of the "fold" function (homomorphisms)...you
can use fold to generate tons of other useful functions. I want the fold
for platform-specific low-level craziness. :)
Enough rambling,
Chris
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2002-10-13 23:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-07 14:02 Yurii A. Rashkovskii
2002-10-13 8:48 ` Xavier Leroy
2002-10-13 17:10 ` Dmitry Bely
2002-10-13 23:12 ` Chris Hecker [this message]
2005-10-25 22:26 Christian Stork
2005-10-26 5:03 ` [Caml-list] " Igor Pechtchanski
2005-10-26 11:11 ` Christian Stork
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=4.3.2.7.2.20021013154133.032e9ba0@mail.d6.com \
--to=checker@d6.com \
--cc=caml-list@inria.fr \
--cc=dbely@mail.ru \
/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