Re: C++ Compiler On FreeBSD

2007-10-07 Thread Wojciech Puchar

i complete my software engineering degree.


PHP isn't really a programming language. It's more a fancy templating


for me it's just funny thing that needs several megs of RAM to display the 
current date ;)


but as being treated as technology instead of just tool, it's used 
everythere without sense.
in 90% cases just to link common header of HTML page with different body 
and common footer.


simply using makefile with cat (possibly something SLIGHTLY more 
complicated) does the same.

once, not every time page is viewed.



programming language, and agree with the recommendation that you start
with something a bit higher level. Perl, for example, ships with


exactly :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-07 Thread cpghost
On Sat, 6 Oct 2007 20:53:00 +0100
James Jeffery [EMAIL PROTECTED] wrote:

 Also if anyone wants to recommend any other books on C++ feel free.

For beginners, I'd highly recommend C++ Primer / Fourth Ed.
by Stanley B. Lippman et. al.

But if you're starting to learn programming from scratch,
it's much easier to begin with a scripted language like
Python (others prefer Ruby or Perl, which are fine too).

Why? C++ and STL are a powerful combination, but there's
a lot of pitfalls and gotchas that you won't experience
elsewhere (not so much with C itself, but with C++). And
the biggest shortcoming of Standard C++ is its lack of
standard libraries for stuff like network I/O, etc. Whatever
you'll use for that will be intrinsically platform dependent.
By learning a scripting language like Python, you'll get
instant portability for their standard library as well as
over 99% 3rd party modules. Once you've accumulated enough
experience there, you can always catch up on C++.

Whatever you opt to do, happy hacking and enjoy the ride! :)

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-07 Thread Wojciech Puchar

a lot of pitfalls and gotchas that you won't experience
elsewhere (not so much with C itself, but with C++). And


that's why it's good to start with C
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-07 Thread Christer Hermansson

James Jeffery wrote:

Evening to you all (or morning in some parts of the world).

Im learning C++ from Sams Teach Yourself C++, now many will call this
a dumb method, and the books pointless and stupid, but i have no knowledge
of any lower level languages, so i do need to be spoon fed the basics.

Im using Borland C++ compiler on XP and was wondering what compilers
there are for FreeBSD that would allow me to compile and execute some
of the examples i will practise from the book.

Also if anyone wants to recommend any other books on C++ feel free. We
are learning VB at college at the moment, i like it, but its not machine
portable
and i dont like the whole drag and drop way of creating a program, seems
like
cheating.

Thanks for reading

James
  


The FreeBSD Developers' Handbook could be good to check out as well:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/tools-compiling.html

I think it's best to start with C and then move onto C++, however I use 
C for low level things with only textbased user interfaces and Java for 
things that require a GUI.


--

Christer Hermansson



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-07 Thread Chad Perrin
On Sat, Oct 06, 2007 at 10:13:56PM +0200, Roland Smith wrote:
 On Sat, Oct 06, 2007 at 08:53:00PM +0100, James Jeffery wrote:
  Evening to you all (or morning in some parts of the world).
  
  Im learning C++ from Sams Teach Yourself C++, now many will call this
  a dumb method, and the books pointless and stupid, but i have no knowledge
  of any lower level languages, so i do need to be spoon fed the basics.
 
 I'd say that C++ isn't the easiest way to learn programming. I'd suggest
 starting with Perl, Ruby or Python.

If you're amenable to languages other than C++, I'd specifically
recommend Ruby, via the book Learn to Program by Chris Pine.  Ruby and
Perl are both excellent first languages, and both Learn to Program and
Learning Perl by Randal Schwartz et al. are excellent books.  Ruby's
much better for learning object oriented programming techniques, though,
and anyone learning to program anything like mainstream languages these
days should learn some OOP (generally speaking).

In the Unix world (such as with FreeBSD), I'd recommend C before C++,
too -- though probably long after Ruby or Perl.

If you specifically want to learn C++, though, and skip the middle man:
more power to ya, and good luck.


 
  Im using Borland C++ compiler on XP and was wondering what compilers
  there are for FreeBSD that would allow me to compile and execute some
  of the examples i will practise from the book.
 
 FreeBSD comes with the GNU C++ and C compilers installed. There are
 others available (Intel) or in progress (OpenWatcom).

Also in progress is the TenDRA compiler, though FreeBSD support is part
of what's in progress.

  http://www.tendra.org/about/

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
Dr. Ron Paul: Liberty has meaning only if we still believe in it when
terrible things happen and a false government security blanket beckons.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-07 Thread Chad Perrin
On Sun, Oct 07, 2007 at 12:07:59AM +, Aryeh Friedman wrote:
  PHP isn't really a programming language. It's more a fancy templating
  system that happens to be able to use extensions that can provide C
  style linkage. That said, I laude you for your desire to learn a real
  programming language, and agree with the recommendation that you start
  with something a bit higher level. Perl, for example, ships with
  absolutely top-notch documentation, and generally speaking, its
  third-party extensions have similar documentation quality.
 
 Ruby is *VERY* easy to learn and there are many online and offline
 books for teaching it (or depending on your personal ideals on
 bittorrent)... it has one advantage over perl it much less
 syntactically ugly

Perl gets a lot of bad press for its syntax.  It's mostly undeserved,
however.  I think the two things about Perl that contribute most to that
reputation are:

  1. sigils on variables (there's a widespread unreasoning hatred of this
  language characteristic in some circles)

  2. the fact that OOP in Perl actually *is* very ugly -- even if the
  rest of the language isn't

As Paul Graham has been known to say (even if he wasn't talking about
Perl specifically, at the time), real ugliness isn't harsh-looking
syntax; it's having to build programs using the wrong concepts.  Perl's
full of ways to use the *right* concepts, as long as you don't misuse it
like most of the code at Matt's Script Archive does.

That's a not-so-subtle hint to avoid Matt's Script Archive if you're
looking for examples of good Perl code.  Perlmonks is much better for
that.

On the other hand, Aryeh Friedman is right that Ruby is very easy to
learn, and it too is an excellent language.  It's also much better (in my
opinion at least) for learning object oriented programming techniques
than Perl.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
Brian K. Reid: In computer science, we stand on each other's feet.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-07 Thread Chad Perrin
On Sun, Oct 07, 2007 at 10:08:58AM +0200, Wojciech Puchar wrote:
 i complete my software engineering degree.
 
 PHP isn't really a programming language. It's more a fancy templating
 
 for me it's just funny thing that needs several megs of RAM to display the 
 current date ;)
 
 but as being treated as technology instead of just tool, it's used 
 everythere without sense.
 in 90% cases just to link common header of HTML page with different body 
 and common footer.
 
 simply using makefile with cat (possibly something SLIGHTLY more 
 complicated) does the same.
 once, not every time page is viewed.

That's not a very practical answer for someone dealing with a shared
hosting provider.  Most of them don't allow shell access and make
execution.  On the other hand, for many common uses of PHP, SSI is at
least as appropriate and simpler to use.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
Paul Graham: Real ugliness is not harsh-looking syntax, but having to
build programs out of the wrong concepts.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-07 Thread Roland Smith
On Sat, Oct 06, 2007 at 10:33:12AM -0600, Chad Perrin wrote:

 In the Unix world (such as with FreeBSD), I'd recommend C before C++,
 too -- though probably long after Ruby or Perl.

Too right. But it should be noted that both C and C++ give you enough
rope to hang yourself with.

My preference for doing things is;

1) Can it be done with a shell-script? (esp. one-time hacks)
2) Else use Perl, Octave, Ruby, but
3) If speed is key, use C. :-)

   Im using Borland C++ compiler on XP and was wondering what compilers
   there are for FreeBSD that would allow me to compile and execute some
   of the examples i will practise from the book.
  
  FreeBSD comes with the GNU C++ and C compilers installed. There are
  others available (Intel) or in progress (OpenWatcom).
 
 Also in progress is the TenDRA compiler, though FreeBSD support is part
 of what's in progress.

Both OpenBSD and NetBSD (pkgsrc) have recently imported Anders Magnusson's
BSD-licensed pcc compiler. At this time it is i386 en C only. In time
this might be a faster (as in compile-time) alternative to gcc.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpjHpQLuYAaY.pgp
Description: PGP signature


Re: C++ Compiler On FreeBSD

2007-10-07 Thread cpghost
On Sun, 7 Oct 2007 17:08:30 +0200
Roland Smith [EMAIL PROTECTED] wrote:

 My preference for doing things is;
 
 1) Can it be done with a shell-script? (esp. one-time hacks)
 2) Else use Perl, Octave, Ruby, but
 3) If speed is key, use C. :-)

Yup, exactly. In Python, that's what extension modules in C and C++
are for (ditto for Perl, Ruby, ...). You gain raw speed for CPU
bottlenecks, though that's just a nice side effect. More importantly,
you can tap into existing C/C++ libraries by wrapping their interfaces
into nice extension modules. And if you're too lazy do do the wrapping
against Python, Ruby, Perl... APIs yourself, just use something like
SWIG. It works like a charm. :)

Anyway, having a working knowledge of C and C++ is always a very good
idea! Go for it! It'll pay off, whatever your main programming language.

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


C++ Compiler On FreeBSD

2007-10-06 Thread James Jeffery
Evening to you all (or morning in some parts of the world).

Im learning C++ from Sams Teach Yourself C++, now many will call this
a dumb method, and the books pointless and stupid, but i have no knowledge
of any lower level languages, so i do need to be spoon fed the basics.

Im using Borland C++ compiler on XP and was wondering what compilers
there are for FreeBSD that would allow me to compile and execute some
of the examples i will practise from the book.

Also if anyone wants to recommend any other books on C++ feel free. We
are learning VB at college at the moment, i like it, but its not machine
portable
and i dont like the whole drag and drop way of creating a program, seems
like
cheating.

Thanks for reading

James
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-06 Thread RW
On Sat, 6 Oct 2007 20:53:00 +0100
James Jeffery [EMAIL PROTECTED] wrote:


 Im using Borland C++ compiler on XP and was wondering what compilers
 there are for FreeBSD that would allow me to compile and execute some
 of the examples i will practise from the book.

gcc, the system C compiler, is a C++ compiler too. It's often invoked
as g++ to get c++ defaults. 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-06 Thread Manolis Kiagias
James Jeffery wrote:
 Evening to you all (or morning in some parts of the world).

 Im learning C++ from Sams Teach Yourself C++, now many will call this
 a dumb method, and the books pointless and stupid, but i have no knowledge
 of any lower level languages, so i do need to be spoon fed the basics.

 Im using Borland C++ compiler on XP and was wondering what compilers
 there are for FreeBSD that would allow me to compile and execute some
 of the examples i will practise from the book.

 Also if anyone wants to recommend any other books on C++ feel free. We
 are learning VB at college at the moment, i like it, but its not machine
 portable
 and i dont like the whole drag and drop way of creating a program, seems
 like
 cheating.

 Thanks for reading

 James

   

Are you using the Jesse Liberty's book? (the 21 days thing ? :) )
This is actually quite good for a beginner in the language - just don't
try to finish it in 21 days...

On to your question, FreeBSD provides (and is actually compiled itself
by) the gcc compiler which will happily compile C and C++ programs. You
may as well wish to install a GUI frontend (like kdevelop), but this is
probably an overkill for the simple examples in the book.

P.S. Visual Basic (at least up to version 6) is the best and easiest way
to write the worst, most unreadable code... ever. Even worse, it may
actually work...sort of.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-06 Thread Roland Smith
On Sat, Oct 06, 2007 at 08:53:00PM +0100, James Jeffery wrote:
 Evening to you all (or morning in some parts of the world).
 
 Im learning C++ from Sams Teach Yourself C++, now many will call this
 a dumb method, and the books pointless and stupid, but i have no knowledge
 of any lower level languages, so i do need to be spoon fed the basics.

I'd say that C++ isn't the easiest way to learn programming. I'd suggest
starting with Perl, Ruby or Python.

 Im using Borland C++ compiler on XP and was wondering what compilers
 there are for FreeBSD that would allow me to compile and execute some
 of the examples i will practise from the book.

FreeBSD comes with the GNU C++ and C compilers installed. There are
others available (Intel) or in progress (OpenWatcom).

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpmAAMiPPYvn.pgp
Description: PGP signature


Re: C++ Compiler On FreeBSD

2007-10-06 Thread James Jeffery
Hi all, thanks for the fast replys, much appreciated.

Manolis: Yep, its the book by Jesse, i never believe them when they say
in 24 hours, its a snag for them to sell the book, they just split it up
into 24 sections to make it look like its possible.

Roland: Ive been working with PHP over the past 2 years, i understand
the basics such as data types, functions, arrays, variables, objects ect,
but i want to challenge myself and learn something that will benifit me
when looking for work after uni, i've got another 4 years of learning before
i complete my software engineering degree.

Be cool to create stuff that i can use in FreeBSD, i know i have years
of learning to do but im up for it.

On 10/6/07, Roland Smith [EMAIL PROTECTED] wrote:

 On Sat, Oct 06, 2007 at 08:53:00PM +0100, James Jeffery wrote:
  Evening to you all (or morning in some parts of the world).
 
  Im learning C++ from Sams Teach Yourself C++, now many will call this
  a dumb method, and the books pointless and stupid, but i have no
 knowledge
  of any lower level languages, so i do need to be spoon fed the basics.

 I'd say that C++ isn't the easiest way to learn programming. I'd suggest
 starting with Perl, Ruby or Python.

  Im using Borland C++ compiler on XP and was wondering what compilers
  there are for FreeBSD that would allow me to compile and execute some
  of the examples i will practise from the book.

 FreeBSD comes with the GNU C++ and C compilers installed. There are
 others available (Intel) or in progress (OpenWatcom).

 Roland
 --
 R.F.Smith   http://www.xs4all.nl/~rsmith/
 [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
 pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-06 Thread Wojciech Puchar

Im learning C++ from Sams Teach Yourself C++, now many will call this
a dumb method, and the books pointless and stupid, but i have no knowledge
of any lower level languages, so i do need to be spoon fed the basics.


so you should start from lower level first - learn C first :)

C is easy. it's actually very easy
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-06 Thread Giorgos Keramidas
On 2007-10-06 20:53, James Jeffery [EMAIL PROTECTED] wrote:
 Evening to you all (or morning in some parts of the world).
 
 Im learning C++ from Sams Teach Yourself C++, now many will call this
 a dumb method, and the books pointless and stupid, but i have no
 knowledge of any lower level languages, so i do need to be spoon fed
 the basics.
 
 Im using Borland C++ compiler on XP and was wondering what compilers
 there are for FreeBSD that would allow me to compile and execute some
 of the examples i will practise from the book.

The base system of FreeBSD includes g++ (the GNU C++ Compiler), and
there are several versions of the GNU C++ compiler in the ports too:

$ pwd
/usr/ports/lang
$ ls -ld gcc[0-9]*
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc28
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc295
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc32
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc33
drwxr-xr-x  3 root  wheel  - 512 Oct  4 18:43 gcc34
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc40
drwxr-xr-x  3 root  wheel  - 512 Oct  2 16:32 gcc41
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc41-withgcjawt
drwxr-xr-x  3 root  wheel  - 512 Oct  2 16:32 gcc42
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc42-withgcjawt
drwxr-xr-x  3 root  wheel  - 512 Oct  2 16:32 gcc43
$


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-06 Thread Christopher Nehren
On 2007-10-06, James Jeffery top-posted.
[ please don't do that, it makes it very difficult to format responses
correctly and makes it just about as hard to read and understand them ]
 Hi all, thanks for the fast replys, much appreciated.

 Manolis: Yep, its the book by Jesse, i never believe them when they say
 in 24 hours, its a snag for them to sell the book, they just split it up
 into 24 sections to make it look like its possible.

I'd personally consider getting a better book. Generally, as has been
said, the learn X in Y units_of_time books are titled that way for
marketability. You can't *possibly* learn C++ in 10 minutes, 24 hours,
21 days, or even a year. See also http://norvig.com/21-days.html and
http://accu.org/index.php/book_reviews for book reviews.

 Roland: Ive been working with PHP over the past 2 years, i understand
 the basics such as data types, functions, arrays, variables, objects ect,
 but i want to challenge myself and learn something that will benifit me
 when looking for work after uni, i've got another 4 years of learning before
 i complete my software engineering degree.

PHP isn't really a programming language. It's more a fancy templating
system that happens to be able to use extensions that can provide C
style linkage. That said, I laude you for your desire to learn a real
programming language, and agree with the recommendation that you start
with something a bit higher level. Perl, for example, ships with
absolutely top-notch documentation, and generally speaking, its
third-party extensions have similar documentation quality.

Best Regards,
Christopher Nehren
-- 
apeiron Yaakov, And it seems to me that the only people going on about
freedom these days are RMS and Bush.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-06 Thread Aryeh Friedman
 PHP isn't really a programming language. It's more a fancy templating
 system that happens to be able to use extensions that can provide C
 style linkage. That said, I laude you for your desire to learn a real
 programming language, and agree with the recommendation that you start
 with something a bit higher level. Perl, for example, ships with
 absolutely top-notch documentation, and generally speaking, its
 third-party extensions have similar documentation quality.

Ruby is *VERY* easy to learn and there are many online and offline
books for teaching it (or depending on your personal ideals on
bittorrent)... it has one advantage over perl it much less
syntactically ugly
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]