473,413 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

compiling a hope interpreter

Sorry if this is very basic.

I have bought a Functional Programming book that uses the language
Hope.
I have managed to locate and extract Ross Pattersons hope interpreter
from http://www.soi.city.ac.uk/~ros s/Hope/

However it seems what I have got is the C source code and I haven't got
a clue what to do with it.

Can someone step me through what i need to do to get the ball rolling -
I am on Windows XP and the docs seem to be written for a unix bod who
knows what he is doing.

Nov 15 '05 #1
6 2072
>Can someone step me through what i need to do to get the ball rolling -
I am on Windows XP and the docs seem to be written for a unix bod who
knows what he is doing.
This "unix bod" would only need to know that he should look in the
INSTALL file if he wants to install something. It would then give him
the simple instruction to type "make install" It's only non-unix folks
that have to know what they are doing :-)

The first thing I would try, to get this interpreter working, would be
to install cygwin. cygwin is a unix emulator, so you should be able to
follow the installation instructions from a cygwin prompt, just as unix
folks can follow them from a unix prompt.
I have bought a Functional Programming book that uses the language
Hope.
I have managed to locate and extract Ross Pattersons hope interpreter
from http://www.soi.city.ac.uk/~ros s/Hope/


Alternatively, try a different language. Do you have reason to be
attached to this particular language or book? The usual language for
teaching functional programming is Scheme. There are many easy to
install interpreters (and compilers). There is an active community that
you can tap into at comp.lang.scheme. There are also plenty of
functional programming books that you could use, including the Wizard
Book, which is available online at
http://mitpress.mit.edu/sicp/full-text/book/book.html

Nov 15 '05 #2

Eric Lavigne wrote:
Can someone step me through what i need to do to get the ball rolling -
I am on Windows XP and the docs seem to be written for a unix bod who
knows what he is doing.
This "unix bod" would only need to know that he should look in the
INSTALL file if he wants to install something. It would then give him
the simple instruction to type "make install" It's only non-unix folks
that have to know what they are doing :-)


Well I did get that far but make install didn't make sense in windows
hence I asked the question.
The first thing I would try, to get this interpreter working, would be
to install cygwin. cygwin is a unix emulator, so you should be able to
follow the installation instructions from a cygwin prompt, just as unix
folks can follow them from a unix prompt.

I have installed cygwin. I have moved the hope directory to be beneath
the home directory that cygwin created for me (I presume that was the
right thing to do).

When I type make install it says
bash: make: command not found.

.......

Here is what the INSTALL file says maybe u see what I mean ... it does
seem a bit terse.

INSTALLATION PROCEDURE

Unix:
make install

That will put everything under /usr/local. If you want them somewhere
else, set configure_args in the top-level Makefile.

Others:
- you will need to adjust hopelib.h for the target machine.
- copy *.[hc] and ../lib/*.hop to your machine.
- bash it till it fits.

The Hope error message:
fatal error - can't read module 'Standard'
indicates a slip-up in hopelib.h.

VARIABLES

You might wish to (un)define the following cpp variables:

REALS num.h represent numbers as double, rather than long.
STATS runtime.c produce statistics on space usage and the
garbage collector.
STATS interpret.c produce statistics on expressions entered.

There are also a number of variables in print.h which control the way
expressions, values and types are parenthesized on output.

You might also wish to adjust the variable MEMSIZE (in memory.c), which
controls the amount of data space used.

OTHER FILES

NOTES maintenance notes
HISTORY revision history

I have bought a Functional Programming book that uses the language
Hope.
I have managed to locate and extract Ross Pattersons hope interpreter
from http://www.soi.city.ac.uk/~ros s/Hope/


Alternatively, try a different language. Do you have reason to be
attached to this particular language or book?


Yes. I paid good money for it.

Seriously I wish it used a different language but it doesn't I don't
want the complication of simultaneously learning a new programming
paradigm and having to translate into another language to follow the
text or do the exercises.
The usual language for
teaching functional programming is Scheme. There are many easy to
install interpreters (and compilers). There is an active community that
you can tap into at comp.lang.scheme. There are also plenty of
functional programming books that you could use, including the Wizard
Book, which is available online at
http://mitpress.mit.edu/sicp/full-text/book/book.html


Yep am learning scheme and keep dipping into HTDP. But I am bloody
minded enough to want to read this book .... first couple of chapters
are quite readable.

So thank you for your help so far ..... if you can get me over the next
hump I'll be very grateful.

Nov 15 '05 #3
>I have installed cygwin. I have moved the hope directory to be beneath
the home directory that cygwin created for me (I presume that was the
right thing to do). When I type make install it says
bash: make: command not found.


make is a unix program. You need it. It is almost certainly included by
default in cygwin, so this error message means there is something wrong
with your cygwin installation. The first thing I would do is search
(windows start menu) for "make" and see if there is a file called make
somewhere on your computer (probably buried somewhere in the cygwin
folder). If you have it, then maybe there is some environment variable
that you need to set in order to use it. There should be some sort of
installation instructions that came with cygwin that would help you
through this issue.

Nov 15 '05 #4
"Eric Lavigne" <la**********@gmail.com> writes:
I have installed cygwin. I have moved the hope directory to be beneath
the home directory that cygwin created for me (I presume that was the
right thing to do).

When I type make install it says
bash: make: command not found.


make is a unix program. You need it. It is almost certainly included by
default in cygwin, so this error message means there is something wrong
with your cygwin installation. The first thing I would do is search
(windows start menu) for "make" and see if there is a file called make
somewhere on your computer (probably buried somewhere in the cygwin
folder). If you have it, then maybe there is some environment variable
that you need to set in order to use it. There should be some sort of
installation instructions that came with cygwin that would help you
through this issue.


<OT>
The Cygwin installer provides a multitude of options for what you want
to install. I don't remember whether "make" is included by default.
You may have to go through the menus in the installer to be sure that
you install "make" and whatever else you need. There doesn't seem to
be an easy way to tell it to install everything.

See www.cygwin.com for a pointer to the mailing list where this is
topical.
</OT>

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 15 '05 #5

Keith Thompson wrote:
"Eric Lavigne" <la**********@gmail.com> writes:
I have installed cygwin. I have moved the hope directory to be beneath
the home directory that cygwin created for me (I presume that was the
right thing to do).
When I type make install it says
bash: make: command not found.


make is a unix program. You need it. It is almost certainly included by
default in cygwin, so this error message means there is something wrong
with your cygwin installation. The first thing I would do is search
(windows start menu) for "make" and see if there is a file called make
somewhere on your computer (probably buried somewhere in the cygwin
folder). If you have it, then maybe there is some environment variable
that you need to set in order to use it. There should be some sort of
installation instructions that came with cygwin that would help you
through this issue.


<OT>
The Cygwin installer provides a multitude of options for what you want
to install. I don't remember whether "make" is included by default.


It isn't. I ran into the same problem trying to install GMP.
Unfortunately, I don't recall exactly what all the missing pieces
were. Definitely m4 in addition to make.

But here's my setup log from Cygwin. Perhaps the OP can compare
his setup log to see what I've got that he doesn't.

2005/05/28 16:37:30 Visited: 101 nodes out of 559.
2005/05/28 16:37:30 Dependency ordered install:
2005/05/28 16:37:30 ash
2005/05/28 16:37:30 aspell
2005/05/28 16:37:30 aspell-en
2005/05/28 16:37:30 base-files
2005/05/28 16:37:30 base-passwd
2005/05/28 16:37:30 bash
2005/05/28 16:37:30 bc
2005/05/28 16:37:30 binutils
2005/05/28 16:37:30 bzip2
2005/05/28 16:37:30 coreutils
2005/05/28 16:37:30 crypt
2005/05/28 16:37:30 cygutils
2005/05/28 16:37:30 cygwin
2005/05/28 16:37:30 cygwin-doc
2005/05/28 16:37:30 diffutils
2005/05/28 16:37:30 editrights
2005/05/28 16:37:30 expat
2005/05/28 16:37:30 findutils
2005/05/28 16:37:30 fontconfig
2005/05/28 16:37:30 freetype2
2005/05/28 16:37:30 gawk
2005/05/28 16:37:30 gcc
2005/05/28 16:37:30 gcc-core
2005/05/28 16:37:30 gcc-g++
2005/05/28 16:37:30 gcc-mingw-core
2005/05/28 16:37:30 gcc-mingw-g++
2005/05/28 16:37:30 gdbm
2005/05/28 16:37:30 gettext
2005/05/28 16:37:30 gmp
2005/05/28 16:37:30 gnuplot
2005/05/28 16:37:30 grep
2005/05/28 16:37:30 groff
2005/05/28 16:37:30 gzip
2005/05/28 16:37:30 less
2005/05/28 16:37:30 libaspell15
2005/05/28 16:37:30 libbz2_1
2005/05/28 16:37:30 libcharset1
2005/05/28 16:37:30 libdb4.2
2005/05/28 16:37:30 libfontconfig1
2005/05/28 16:37:30 libfreetype26
2005/05/28 16:37:30 libgd2
2005/05/28 16:37:30 libgdbm
2005/05/28 16:37:30 libgdbm-devel
2005/05/28 16:37:30 libgdbm3
2005/05/28 16:37:30 libgdbm4
2005/05/28 16:37:30 libiconv
2005/05/28 16:37:30 libiconv2
2005/05/28 16:37:30 libintl
2005/05/28 16:37:30 libintl1
2005/05/28 16:37:30 libintl2
2005/05/28 16:37:30 libintl3
2005/05/28 16:37:30 libjpeg62
2005/05/28 16:37:30 libncurses5
2005/05/28 16:37:30 libncurses6
2005/05/28 16:37:30 libncurses7
2005/05/28 16:37:30 libncurses8
2005/05/28 16:37:30 libpcre
2005/05/28 16:37:30 libpcre0
2005/05/28 16:37:30 libpng12
2005/05/28 16:37:30 libpopt0
2005/05/28 16:37:30 libreadline4
2005/05/28 16:37:30 libreadline5
2005/05/28 16:37:30 libreadline6
2005/05/28 16:37:30 libXft
2005/05/28 16:37:30 libXft1
2005/05/28 16:37:30 libXft2
2005/05/28 16:37:30 login
2005/05/28 16:37:30 m4
2005/05/28 16:37:30 make
2005/05/28 16:37:30 man
2005/05/28 16:37:30 mingw-runtime
2005/05/28 16:37:30 mktemp
2005/05/28 16:37:30 ncurses
2005/05/28 16:37:30 openssl
2005/05/28 16:37:30 pcre
2005/05/28 16:37:30 pcre-doc
2005/05/28 16:37:30 perl
2005/05/28 16:37:30 python
2005/05/28 16:37:30 readline
2005/05/28 16:37:30 ruby
2005/05/28 16:37:30 sed
2005/05/28 16:37:30 tar
2005/05/28 16:37:30 tcltk
2005/05/28 16:37:30 termcap
2005/05/28 16:37:30 terminfo
2005/05/28 16:37:30 texinfo
2005/05/28 16:37:30 w32api
2005/05/28 16:37:30 which
2005/05/28 16:37:30 X-startup-scripts
2005/05/28 16:37:30 xorg-x11-base
2005/05/28 16:37:30 xorg-x11-bin
2005/05/28 16:37:30 xorg-x11-bin-dlls
2005/05/28 16:37:30 xorg-x11-bin-lndir
2005/05/28 16:37:30 xorg-x11-etc
2005/05/28 16:37:30 xorg-x11-fenc
2005/05/28 16:37:30 xorg-x11-fnts
2005/05/28 16:37:30 xorg-x11-libs-data
2005/05/28 16:37:30 xorg-x11-xwin
2005/05/28 16:37:30 xterm
2005/05/28 16:37:30 zlib
You may have to go through the menus in the installer to be sure that
you install "make" and whatever else you need. There doesn't seem to
be an easy way to tell it to install everything.

See www.cygwin.com for a pointer to the mailing list where this is
topical.
</OT>

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.


Nov 15 '05 #6
I have found the cygwin FAQ and hopefuly will go on from there.

Thanks for all the help.

Nov 15 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: enjoylife_95135 | last post by:
Hi, I'm running RH9 on my laptop. It comes with the Python 2.2.2 RPM. Its cool because when I run the interpreter, I can use command line history. I need to upgrade, so I downloaded and...
29
by: Maurice LING | last post by:
Hi, I remembered reading a MSc thesis about compiling Perl to Java bytecodes (as in java class files). At least, it seems that someone had compiled scheme to java class files quite successfully....
1
by: Asad Habib | last post by:
Hello. I am working on Tiger and wanted to find out how to compile a Python (.py) file into a .pyc file and then into a .pyo file. Can the compilation be achieved within the interpreter? Also, I am...
3
by: MBS | last post by:
As far as I know PHP code is always a script which is interpreted by the PHP interpreter, compiled to machine code, then executed by the CPU. Much like Java, one could say. (I am not talking...
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
19
by: Simon Faulkner | last post by:
Pardon me if this has been done to death but I can't find a simple explanation. I love Python for it's ease and speed of development especially for the "Programming Challenged" like me but why...
1
by: Scheol Service | last post by:
---------- Forwarded message ---------- From: Scheol Service <scheols@gmail.com> Date: Nov 29, 2006 10:57 PM Subject: Python Question About Compiling. To: mailto:python-list@python.org Im...
0
by: winkatl1213 | last post by:
I was wondering if anyone could help me with cross-compiling Python 2.5.1 to a MIPS target. The approach I'm using is based off the suggestion in the README file that comes with the python...
62
by: Ajinkya | last post by:
As "spawnl" executes an exe through C code., similarly how can we compile a C program through another C program (on Windows platform) ?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.