What do you need to compile from source?

G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Hi all,

I wouldnt mind doing a bit of source diving and making a few little
changes, however I dont own a copy of C (or any of its varients), and
in fact have never used it. I have however done some basic programming
with Turbo Pascal and C64 basic years back.
First question is is there a... well, free compiler I can use to play
with the nethack source? (as nethack aside I cant really see myself
using it that much).
And second one, is C at all similar to the now dead languages of Pascal
and C64 basic?

Thanks,

Marky Mark
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Cyde Weys wrote:
> "Marky Mark" <mdmota@yahoo.com.au> wrote in news:1120619187.581806.76180
> @g44g2000cwa.googlegroups.com:
>
> > Hi all,
> >
> > I wouldnt mind doing a bit of source diving and making a few little
> > changes, however I dont own a copy of C (or any of its varients), and
> > in fact have never used it. I have however done some basic programming
> > with Turbo Pascal and C64 basic years back.
> > First question is is there a... well, free compiler I can use to play
> > with the nethack source? (as nethack aside I cant really see myself
> > using it that much).
> > And second one, is C at all similar to the now dead languages of Pascal
> > and C64 basic?
>
> Alrighty then. First question: what operating system are you using? From
> your lack of having a C compiler I'm guessing it's not a *NIX variant but
> rather some form of Windows. My first question is ... would you consider
> installing Linux on a separate partition (or drive) and dual-booting? It's
> great experience and it will make these compilation things a lot easier.

My bad, I am using Windows XP. Id rather not instal Linux on a seperate
partition (I wouldnt even know how to do that, but it sounds
complicated, that and Id prob only use it to play around with nethack
source, so doesnt really seem worth it).

>
> As for C and Pascal, they are somewhat similar. I don't know what C64 is.
> And Pascal isn't dead ... I'm 19 years old now and I actually had to learn
> it to (for all things) program a robot in highschool.

C64 basic is as far as I can tell more or less the same as Q basic, but
for a very special and very much dead OS, the classic Commodore 64 (of
which a still having a working C64 computer and boot it up every now
and then... it had some absolute clasic games!)
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

"Marky Mark" <mdmota@yahoo.com.au> wrote in news:1120619187.581806.76180
@g44g2000cwa.googlegroups.com:

> Hi all,
>
> I wouldnt mind doing a bit of source diving and making a few little
> changes, however I dont own a copy of C (or any of its varients), and
> in fact have never used it. I have however done some basic programming
> with Turbo Pascal and C64 basic years back.
> First question is is there a... well, free compiler I can use to play
> with the nethack source? (as nethack aside I cant really see myself
> using it that much).
> And second one, is C at all similar to the now dead languages of Pascal
> and C64 basic?

Alrighty then. First question: what operating system are you using? From
your lack of having a C compiler I'm guessing it's not a *NIX variant but
rather some form of Windows. My first question is ... would you consider
installing Linux on a separate partition (or drive) and dual-booting? It's
great experience and it will make these compilation things a lot easier.

gcc is the main compiler for Linux. I'm sure it has Windows binaries but I
don't know how successful it is at compiling Windows executables. I know
there are a good amount of people out there who have compiled Nethack for
Windows so I'd be interested in seeing what compiler they used. I imagine
Windows Visual Studio .NET could do it, but that is FAR from free.

As for C and Pascal, they are somewhat similar. I don't know what C64 is.
And Pascal isn't dead ... I'm 19 years old now and I actually had to learn
it to (for all things) program a robot in highschool.


--
~ Cyde Weys ~

Mana du vortes, mana du vortes
Aeria gloris, aeria gloris
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Cyde Weys <cyde@umd.edu> wrote:

>I know
>there are a good amount of people out there who have compiled Nethack for
>Windows so I'd be interested in seeing what compiler they used. I imagine
>Windows Visual Studio .NET could do it, but that is FAR from free.

Sure, but you don't need Visual Studio just to get the compiler.

Downloadable C compilers for Windows:

Microsoft: http://msdn.microsoft.com/visualc/vctoolkit2003
GCC (Cygwin): http://www.cygwin.com
LCC: http://www.cs.virginia.edu/~lcc-win32/
Borland C: http://www.borland.com/bcppbuilder/freecompiler/

I am using the MS compiler or GCC, and these compilers are those for
which you are most likely to get answers here in rgrn.

--
Philipp Lucas
phlucas@online-club.de
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

"Marky Mark" <mdmota@yahoo.com.au> wrote:

>My bad, I am using Windows XP. Id rather not instal Linux on a seperate
>partition (I wouldnt even know how to do that, but it sounds
>complicated, that and Id prob only use it to play around with nethack
>source, so doesnt really seem worth it).

There are also live CDs of Linux available, which have a complete Linux
system on a CD. You boot from it, and than you can access your
DOS/Windows files and thereby compile and play NetHack under Linux. (Not
that this is necessary, as explained in another message.)

>C64 basic is as far as I can tell more or less the same as Q basic, but
>for a very special and very much dead OS, the classic Commodore 64 (of
>which a still having a working C64 computer and boot it up every now
>and then... it had some absolute clasic games!)

Brief drift into off-topicness: If you enjoy playing C64 games, you may
want to join our monthly competitions on http://www.lemon64.com .

--
Philipp Lucas
phlucas@online-club.de
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Cyde Weys wrote:
>
> As for C and Pascal, they are somewhat similar.

In availability of structure yes. In functions available,
no. C was designed to supply all of the arithmatic
functions available on the LSI-11 architecture directly
as operators. Pascal was designed with minimal operators.
So in C you get stuff like pre-incrementing integers
because that was available on the PDP-11 while in Pascal
you get stuff like integer division.

> And Pascal isn't dead ... I'm 19 years old now and I actually had to learn
> it to (for all things) program a robot in highschool.

Pascal was originally designed to *teach* programming.
It's for the basic concepts and nothing more. Why it
ever even became commercially available has stumped
many over the years. I do not find it surprising that
it is still in use in schools. It *should* be used in
schools. Think of Pascal as a part of the bootstrap
process. It's the installation floppy of the
learning-programming sequence.

19. Wow. 1986. I was playing Hack or maybe Rogue.
It's the year I finally dropped developer from the list
of jobs I did and went to all sysadmin. If Nethack
were ported to C++, I'd finally need to learn more
programming ;^)
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

On Wed, 6 Jul 2005, Cyde Weys wrote:

> As for C and Pascal, they are somewhat similar. I don't know what C64 is.
> And Pascal isn't dead ... I'm 19 years old now and I actually had to learn
> it to (for all things) program a robot in highschool.

Just a few words on the C vs Pascal goo ol' fight:

I think that Pascal is a great language for teaching basis in
programmation because it's very very structured and strict about
everything, among other things typing. Plus it's imperative which is much
more easy to understand at beginning that functionnal languages since
recursivity is a great thing but hard to grasp (this year, I had to teach
Ocaml to first year student as their first programming course. That was
kind of awfull). But I don't know if Pascal is widely use "in industry".

C is certainly much more used but has not so much to do with Pascal. Its
syntax is absolutely awfull and its laxism rather anoying. Plus no garbage
collector is a real pain for beginners.

Of course, you *can* program in a very structured way in C (much like in
Pascal) but you're not forced to. That's why I think people should learn
Pascal (or similar) before C (or Java or similar): to learn the good
habits and then see the bad ones.

Both Pascal and C miss things such as automatic type inference which, when
I started using it (that is switch from Pascal to Caml when I was 18)
divided my debugging type by 3 or 4. Type inference is good :)
(that is, instead of saying
int f(int a, int b) {return a+b;}
you'll say
let f(a,b) = a+b;;
and the compiler will say
f : int*int -> int)


Concerning sourcediving to learn C, well, this seems rather hard. I think
that you [that is, the OP] will need at least basis in C such as the
awfull syntax and strange constructions. A good knowledge in algorithmics
(but I can assume you have that from your Pascal knowledge) will, of
course, help. Of course, carreful reading of doc/sources.txt is required.

Concerning C compiler for windows, google c compiler windows give a lot of
answer, certain said to be "free", so you may want to try these. Global
devellopement environment under windows may be more convenient to use that
good ol' vi(emacs)/gcc under Linux since you will automatically have some
..h browsing, error tracking or other similar things (well, I guess there
also exists global environment for linux). I've seen Borland's environment
for Java and it looks rather nice too use. I guess similar stuff exists
for C.

Actually, thinking about it, I think that Borland freely distribute its
developement tools. You may want to look for their page.

Hypocoristiquement,
Jym.
 

Chuck

Distinguished
Nov 19, 2001
1,479
0
19,280
Archived from groups: rec.games.roguelike.nethack (More info?)

Cyde Weys <cyde@umd.edu> wrote in
news:Xns968AEE482A6662galopagosterrapincy@199.45.49.11:

> "Marky Mark" <mdmota@yahoo.com.au> wrote in news:1120619187.581806.76180
> @g44g2000cwa.googlegroups.com:
>
>> Hi all,
>>
>> I wouldnt mind doing a bit of source diving and making a few little
>> changes, however I dont own a copy of C (or any of its varients), and
>> in fact have never used it. I have however done some basic programming
>> with Turbo Pascal and C64 basic years back.
>> First question is is there a... well, free compiler I can use to play
>> with the nethack source? (as nethack aside I cant really see myself
>> using it that much).
>> And second one, is C at all similar to the now dead languages of Pascal
>> and C64 basic?
>
> Alrighty then. First question: what operating system are you using? From
> your lack of having a C compiler I'm guessing it's not a *NIX variant but
> rather some form of Windows. My first question is ... would you consider
> installing Linux on a separate partition (or drive) and dual-booting? It's
> great experience and it will make these compilation things a lot easier.
>
> gcc is the main compiler for Linux. I'm sure it has Windows binaries but I
> don't know how successful it is at compiling Windows executables. I know
> there are a good amount of people out there who have compiled Nethack for
> Windows so I'd be interested in seeing what compiler they used. I imagine
> Windows Visual Studio .NET could do it, but that is FAR from free.
>
> As for C and Pascal, they are somewhat similar. I don't know what C64 is.
> And Pascal isn't dead ... I'm 19 years old now and I actually had to learn
> it to (for all things) program a robot in highschool.
>
>

Your best bet on MS (Gates inc.) would be djgpp which is free and compiles
most things gnu as for requirements, you need the basic setup for djgpp (it's
not just unzip/install, there is some modifying of your autoexec.bat),
compress, yacc, flex, termcap library. Note: this is for the console version,
for the graphics version you need more, such as allegro.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Jym <moyen@loria.fr> wrote:

> C is certainly much more used but has not so much to do with Pascal. Its
> syntax is absolutely awfull and its laxism rather anoying. Plus no garbage
> collector is a real pain for beginners.

You do realise that Pascal doesn't have a garbage collector either, do
you?

But I agree: Pascal is good for learning (and not much else). C is not a
beginners' language (but, IMO, good for most real programming).

> Concerning sourcediving to learn C, well, this seems rather hard.

Even more so since the NetHack source isn't modern C, or all that well
organised or documented.

Richard
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

"Doug Freyburger" <dfreybur@yahoo.com> wrote:

> Cyde Weys wrote:
> >
> > As for C and Pascal, they are somewhat similar.
>
> In availability of structure yes. In functions available,
> no. C was designed to supply all of the arithmatic
> functions available on the LSI-11 architecture directly
> as operators. Pascal was designed with minimal operators.
> So in C you get stuff like pre-incrementing integers
> because that was available on the PDP-11 while in Pascal
> you get stuff like integer division.

This is a myth. You get both pre- and post-incrementing operators for
_all_ scalars, not just integers but also pointers and floating points;
not because they were available on the PDP-11, but because they were in
C's predecessor, Ken Thompson's B. And B was designed for the PDP-7,
which TTBOMK didn't have them.

> > And Pascal isn't dead ... I'm 19 years old now and I actually had to learn
> > it to (for all things) program a robot in highschool.
>
> Pascal was originally designed to *teach* programming.
> It's for the basic concepts and nothing more. Why it
> ever even became commercially available has stumped
> many over the years. I do not find it surprising that
> it is still in use in schools. It *should* be used in
> schools. Think of Pascal as a part of the bootstrap
> process. It's the installation floppy of the
> learning-programming sequence.

Precisely. It served me well, in weaning me from Sinclair Basic, but it
wouldn't do for me now.

Richard
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Philipp Lucas <phlucas@online-club.de> wrote:

> Cyde Weys <cyde@umd.edu> wrote:
>
> >I know
> >there are a good amount of people out there who have compiled Nethack for
> >Windows so I'd be interested in seeing what compiler they used. I imagine
> >Windows Visual Studio .NET could do it, but that is FAR from free.
>
> Sure, but you don't need Visual Studio just to get the compiler.
>
> Downloadable C compilers for Windows:

And Dev-C++ (which, despite the name, also does C), from
<http://www.bloodshed.net/devcpp.html>; comes with Mingw, but can also
be configured with Cygwin.
If you want lcc, Pelles C, from <http://www.smorgasbordet.com/pellesc/>,
is a good choice.

Richard
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

On Wed, 6 Jul 2005, Richard Bos wrote:

> Jym <moyen@loria.fr> wrote:
>
> > C is certainly much more used but has not so much to do with Pascal. Its
> > syntax is absolutely awfull and its laxism rather anoying. Plus no garbage
> > collector is a real pain for beginners.
>
> You do realise that Pascal doesn't have a garbage collector either, do
> you?

Kinda. But you can play with strings, arrays and such in Pascal without
having to explicitely malloc and free everything. At least, I remember
using strings and arrays in Pascal but not using malloc and free... And
also Pascal has not such a need to pointers, you can do a lot of stuff
without pointers.

> But I agree: Pascal is good for learning (and not much else). C is not a
> beginners' language (but, IMO, good for most real programming).

Agree. Although I personally do not like C (and think other languages are
also good for most real programs).

> > Concerning sourcediving to learn C, well, this seems rather hard.
>
> Even more so since the NetHack source isn't modern C, or all that well
> organised or documented.

Yep, i just spend two evening in the sources and it's not always easy to
do...

--
Hypocoristiquement,
Jym.

Adresse mail plus valide à partir de septembre 2005.
Utiliser l'adresse de redirection permanente :
Jean-Yves.Moyen `at` ens-lyon.org
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Jym wrote:

> On Wed, 6 Jul 2005, Richard Bos wrote:
>
>> Jym <moyen@loria.fr> wrote:
>>
>>> C is certainly much more used but has not so much to do with
>>> Pascal. Its syntax is absolutely awfull and its laxism rather
>>> anoying. Plus no garbage collector is a real pain for beginners.
>>
>> You do realise that Pascal doesn't have a garbage collector either, do
>> you?
>
> Kinda. But you can play with strings, arrays and such in Pascal without
> having to explicitely malloc and free everything. At least, I remember
> using strings and arrays in Pascal but not using malloc and free...

You can in C too, as long as they're not dynamically allocated, just like
Pascal.

> And also Pascal has not such a need to pointers, you can do a lot of
> stuff without pointers.

Pascal has pointers. What did you have in mind that you can do in Pascal
without pointers, but not in C? My recollection of Pascal is fuzzy, but
all I can think of is Pascal's var function arguments, and these essentially
just hide the pointers from the user.

--
Benjamin Lewis

"Love is a snowmobile racing across the tundra and then suddenly it flips
over, pinning you underneath. At night, the ice weasels come."
--Matt Groening
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

On Thu, 7 Jul 2005, Benjamin Lewis wrote:

> Jym wrote:
>
> > On Wed, 6 Jul 2005, Richard Bos wrote:
> >
> >> Jym <moyen@loria.fr> wrote:
> >>
> >>> C is certainly much more used but has not so much to do with
> >>> Pascal. Its syntax is absolutely awfull and its laxism rather
> >>> anoying. Plus no garbage collector is a real pain for beginners.
> >>
> >> You do realise that Pascal doesn't have a garbage collector either, do
> >> you?
> >
> > Kinda. But you can play with strings, arrays and such in Pascal without
> > having to explicitely malloc and free everything. At least, I remember
> > using strings and arrays in Pascal but not using malloc and free...
>
> You can in C too, as long as they're not dynamically allocated, just like
> Pascal.
>
> > And also Pascal has not such a need to pointers, you can do a lot of
> > stuff without pointers.
>
> Pascal has pointers. What did you have in mind that you can do in Pascal
> without pointers, but not in C? My recollection of Pascal is fuzzy, but
> all I can think of is Pascal's var function arguments, and these essentially
> just hide the pointers from the user.

My Pascal-years are also far far aways. And my C-years do not really exist
:)
Yes, I guess, var was one of the trick. Plus, I guess I wasn't doing lots
of complicated stuff in Pascal these years.

--
Hypocoristiquement,
Jym.

Adresse mail plus valide à partir de septembre 2005.
Utiliser l'adresse de redirection permanente :
Jean-Yves.Moyen `at` ens-lyon.org
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

I dont know if you're still looking for a windows compiler but I have
used a free one called Dev-C++ for windows and it works well. Never
tried it with nethack though... just a thought.

-Thomas
RL: CHAZM
 
D

Deleted member 3023

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

To: comments
Re: Re: What do you need to compile from source?
By: comments to rec.games.roguelike.nethack on Tue Jul 19 2005 05:18 pm

> I dont know if you're still looking for a windows compiler but I have
> used a free one called Dev-C++ for windows and it works well. Never
> tried it with nethack though... just a thought.
>
> -Thomas
> RL: CHAZM

hmm, the free borland c 5.5 will compile 3.4.3 now.