Hi,
In section 1.3 Windows it is stated:
For Windows users I'll show you how to get a basic Ubuntu Linux system
up and running in a virtual machine so that you can still do all of my
exercises, but avoid all the painful Linux installation problems. ...
have to figure this one out.
I think that it would be better to recommend the installation of Cygwin,
which provides an environment almost equivalent for the purposes of this
C course. I think that it is better because after compilation you get
.exe files you can natively run on Windows machines.
I know you recommend not using an IDE, but Eclipse C/C++ Development
Guide, on the Before you begin guide gives useful tips to Windows users,
that maybe you could adapt for your C book:
Windows
For windows, MinGW, and Cygwin are the two main choices for acquiring
the GNU toolchain:
* *Cygwin* <http://www.cygwin.com> is a port of the Linux
environment to Windows. It provides a compatibility layer in a set
of DLLs. These DLLs are GPL licensed
<http://www.gnu.org/copyleft/gpl.html>, making any code that links
to them also subject to the GPL. Cygwin, however, does provide the
fullest implementation of the GNU toolchain by supporting the GNU
libc C runtime library.
*
*MinGW* <http://www.mingw.org> is a port of the GNU toolchain to
the Windows platform. The biggest difference over Cygwin is that
MinGW uses the Windows C runtime libraries (mscvrt) instead of
GNU's libc. As a result, a compatibility layer is not required,
thus avoiding the GPL issues with Cygwin. There are differences,
though, between the Windows and GNU C runtime libraries that will
make writing portable applications more difficult.
1.4 Text Editor
I would add to the list of Text Editors Notepad++, for Windows users.
Best regards,
David
On Fri, Oct 14, 2011 at 5:51 PM, David <davidfdzp@gmail.com> wrote: > ** > Hi, > > In section 1.3 Windows it is stated: > > For Windows users I'll show you how to get a basic Ubuntu Linux system up > and running in a virtual machine so that you can still do all of my > exercises, but avoid all the painful Linux installation problems. ... have > to figure this one out. > > I think that it would be better to recommend the installation of Cygwin, > which provides an environment almost equivalent for the purposes of this C > course. I think that it is better because after compilation you get .exe > files you can natively run on Windows machines. > I regularly use cygwin when ever I (unfortunately) find myself on a windows machine and in my opinion it isn't worth it for LCTHW. You would most probably need an appendum with detailed instructions that explain what packages you need from the GNU toolchain, how to install them, configuration (although it should work out of the box), etc. You would also need to explain a few things like the "gotchas" when working with cygwin and how stuff like the virtual filesystem and mount points work. Better off installing ubuntu in a virtual machine. Easier, more straight forward, and you get a real *nix environment. > > I know you recommend not using an IDE, but Eclipse C/C++ Development Guide, > on the Before you begin guide gives useful tips to Windows users, that maybe > you could adapt for your C book: > > Windows > > For windows, MinGW, and Cygwin are the two main choices for acquiring the > GNU toolchain: > > - *Cygwin* <http://www.cygwin.com> is a port of the Linux environment > to Windows. It provides a compatibility layer in a set of DLLs. These DLLs > are GPL licensed <http://www.gnu.org/copyleft/gpl.html>, making any > code that links to them also subject to the GPL. Cygwin, however, does > provide the fullest implementation of the GNU toolchain by supporting the > GNU libc C runtime library. > - > > *MinGW* <http://www.mingw.org> is a port of the GNU toolchain to the > Windows platform. The biggest difference over Cygwin is that MinGW uses the > Windows C runtime libraries (mscvrt) instead of GNU's libc. As a result, a > compatibility layer is not required, thus avoiding the GPL issues with > Cygwin. There are differences, though, between the Windows and GNU C runtime > libraries that will make writing portable applications more difficult. > > Interesting Idea, but again IMO not worth it. From the start, the user needs to understand the difference between two systems that try to emulate a GNU environment (in a OS not designed for it) before even making a choice. For someone who hasn't much experience with *nix environemnts, MinGW's installer is even less user-friendly than cygwin. My point is, some people might not care for all the extra hassle needed for getting a *nix-like environment up under windows when all they want to do is learn C with little fuss as possible. > 1.4 Text Editor > > I would add to the list of Text Editors Notepad++, for Windows users. > Agreed. Notepad++ is an excellent swiss-army editor under windows. > > Best regards, > > David > -- "All musicians are drug addicts, no question about it. The ecstasy we get during a concert is proof enough. yet there is a slight difference between us, the musicians, and the typical 'street-junkie'... Instead of consuming powder, we consume vibrations" Gregory Eric Sanderson Turcot Temlett MacDonnell Forbes
I agree. My beef with using cygwin for development is that the debugging experience is terrible. If you use emacs, you can't get gdb to connect with it there. For a VM, I recommend using Virtual Box. It's easy to set up and use. I use it on Windows all the time when I need a unix environment. It's free, and has a number of advantages over VMWare Server (the free version), including: built-in vm cloning capability, no secret tomcat instance used to provide the control console, and it's own management console (rather than being limited to IE and FF with plugins). >________________________________ >From: Gregory Eric Sanderson <gzou2000@gmail.com> >To: lcthw@librelist.com >Sent: Friday, October 14, 2011 7:09 PM >Subject: Re: [lcthw] Windows > > > > > >On Fri, Oct 14, 2011 at 5:51 PM, David <davidfdzp@gmail.com> wrote: > > >>Hi, >> >>In section 1.3 Windows it is stated: >> >>For Windows users I'll show you how to get a basic Ubuntu Linux system up and running in a virtual machine so that you can still do all of my exercises, but avoid all the painful Linux installation problems. ... have to figure this one out. >> >>I think that it would be better to recommend the installation of Cygwin, which provides an environment almost equivalent for the purposes of this C course. I think that it is better because after compilation you get .exe files you can natively run on Windows machines. >> > >I regularly use cygwin when ever I (unfortunately) find myself on a windows machine and in my opinion it isn't worth it for LCTHW. You would most probably need an appendum with detailed instructions that explain what packages you need from the GNU toolchain, how to install them, configuration (although it should work out of the box), etc. You would also need to explain a few things like the "gotchas" when working with cygwin and how stuff like the virtual filesystem and mount points work. > >Better off installing ubuntu in a virtual machine. Easier, more straight forward, and you get a real *nix environment. > > >>I know you recommend not using an IDE, but Eclipse C/C++ Development Guide, on the Before you begin guide gives useful tips to Windows users, that maybe you could adapt for your C book: >> >> >>Windows >>For windows, MinGW, and Cygwin are the two main choices for acquiring the GNU toolchain: >> * Cygwin is a port of the Linux environment to Windows. It provides a compatibility layer in a set of DLLs. These DLLs are GPL licensed, making any code that links to them also subject to the GPL. Cygwin, however, does provide the fullest implementation of the GNU toolchain by supporting the GNU libc C runtime library. >> >> * MinGW is a port of the GNU toolchain to the Windows platform. The biggest difference over Cygwin is that MinGW uses the Windows C runtime libraries (mscvrt) instead of GNU's libc. As a result, a compatibility layer is not required, thus avoiding the GPL issues with Cygwin. There are differences, though, between the Windows and GNU C runtime libraries that will make writing portable applications more difficult. >Interesting Idea, but again IMO not worth it. From the start, the user needs to understand the difference between two systems that try to emulate a GNU environment (in a OS not designed for it) before even making a choice. For someone who hasn't much experience with *nix environemnts, MinGW's installer is even less user-friendly than cygwin. My point is, some people might not care for all the extra hassle needed for getting a *nix-like environment up under windows when all they want to do is learn C with little fuss as possible. > >1.4 Text Editor >> >>I would add to the list of Text Editors Notepad++, for Windows users. >> > >Agreed. Notepad++ is an excellent swiss-army editor under windows. > > >>Best regards, >> >>David >> > > >-- >"All musicians are drug addicts, no question about it. The ecstasy we get during a concert is proof enough. >yet there is a slight difference between us, the musicians, and the typical 'street-junkie'... >Instead of consuming powder, we consume vibrations" > >Gregory Eric Sanderson Turcot Temlett MacDonnell Forbes > > > >
Moreover, Valgring is not available in Windows. I would simply say in the book that Windows is not supported (what is suggested when the alternative is to use a virtual machine with a supported OS...) http://stackoverflow.com/questions/413477/is-there-a-good-valgrind-substitute-for-windows https://winezeug.googlecode.com/svn/trunk/valgrind/doc/win32.html http://tml-blog.blogspot.com/2009/07/porting-valgrind-to-windows.html On 10/15/2011 04:09 AM, Gregory Eric Sanderson wrote: > > > On Fri, Oct 14, 2011 at 5:51 PM, David <davidfdzp@gmail.com > <mailto:davidfdzp@gmail.com>> wrote: > > Hi, > > In section 1.3 Windows it is stated: > > For Windows users I'll show you how to get a basic Ubuntu Linux > system up and running in a virtual machine so that you can still > do all of my exercises, but avoid all the painful Linux > installation problems. ... have to figure this one out. > > I think that it would be better to recommend the installation of > Cygwin, which provides an environment almost equivalent for the > purposes of this C course. I think that it is better because after > compilation you get .exe files you can natively run on Windows > machines. > > > I regularly use cygwin when ever I (unfortunately) find myself on a > windows machine and in my opinion it isn't worth it for LCTHW. You > would most probably need an appendum with detailed instructions that > explain what packages you need from the GNU toolchain, how to install > them, configuration (although it should work out of the box), etc. You > would also need to explain a few things like the "gotchas" when > working with cygwin and how stuff like the virtual filesystem and > mount points work. > > Better off installing ubuntu in a virtual machine. Easier, more > straight forward, and you get a real *nix environment. > > > I know you recommend not using an IDE, but Eclipse C/C++ > Development Guide, on the Before you begin guide gives useful tips > to Windows users, that maybe you could adapt for your C book: > > > Windows > > For windows, MinGW, and Cygwin are the two main choices for > acquiring the GNU toolchain: > > * *Cygwin* <http://www.cygwin.com> is a port of the Linux > environment to Windows. It provides a compatibility layer in > a set of DLLs. These DLLs are GPL licensed > <http://www.gnu.org/copyleft/gpl.html>, making any code that > links to them also subject to the GPL. Cygwin, however, does > provide the fullest implementation of the GNU toolchain by > supporting the GNU libc C runtime library. > * > > *MinGW* <http://www.mingw.org> is a port of the GNU > toolchain to the Windows platform. The biggest difference > over Cygwin is that MinGW uses the Windows C runtime > libraries (mscvrt) instead of GNU's libc. As a result, a > compatibility layer is not required, thus avoiding the GPL > issues with Cygwin. There are differences, though, between > the Windows and GNU C runtime libraries that will make > writing portable applications more difficult. > > Interesting Idea, but again IMO not worth it. From the start, the user > needs to understand the difference between two systems that try to > emulate a GNU environment (in a OS not designed for it) before even > making a choice. For someone who hasn't much experience with *nix > environemnts, MinGW's installer is even less user-friendly than > cygwin. My point is, some people might not care for all the extra > hassle needed for getting a *nix-like environment up under windows > when all they want to do is learn C with little fuss as possible. > > 1.4 Text Editor > > I would add to the list of Text Editors Notepad++, for Windows users. > > > Agreed. Notepad++ is an excellent swiss-army editor under windows. > > > Best regards, > > David > > > > > -- > "All musicians are drug addicts, no question about it. The ecstasy we > get during a concert is proof enough. > yet there is a slight difference between us, the musicians, and the > typical 'street-junkie'... > Instead of consuming powder, we consume vibrations" > > Gregory Eric Sanderson Turcot Temlett MacDonnell Forbes >
Mm... I understand the focus here is on the language for the book, but isnt thay a bit like saying: 'Here, learn c, but forget about using it for anything serious?' Personally the only thing I use c for is small helper programs at work to do things like reformat files, do custom DNS queries or low level network monkeying. These are done exclusively on cygwin... its just faster to open a terminal and whip up a file than boost vstudio. ...but, there would be absolutely no point in writing them on a VM which doesn't have access to my file system. Just my $0.02... Cheers, Doug. On Oct 18, 2011 7:09 AM, "David" <davidfdzp@gmail.com> wrote: > ** > Moreover, Valgring is not available in Windows. > > I would simply say in the book that Windows is not supported (what is > suggested when the alternative is to use a virtual machine with a supported > OS...) > > http://stackoverflow.com/questions/413477/is-there-a-good-valgrind-substitute-for-windows > https://winezeug.googlecode.com/svn/trunk/valgrind/doc/win32.html > http://tml-blog.blogspot.com/2009/07/porting-valgrind-to-windows.html > > On 10/15/2011 04:09 AM, Gregory Eric Sanderson wrote: > > > > On Fri, Oct 14, 2011 at 5:51 PM, David <davidfdzp@gmail.com> wrote: > >> Hi, >> >> In section 1.3 Windows it is stated: >> >> For Windows users I'll show you how to get a basic Ubuntu Linux system up >> and running in a virtual machine so that you can still do all of my >> exercises, but avoid all the painful Linux installation problems. ... have >> to figure this one out. >> >> I think that it would be better to recommend the installation of Cygwin, >> which provides an environment almost equivalent for the purposes of this C >> course. I think that it is better because after compilation you get .exe >> files you can natively run on Windows machines. >> > > I regularly use cygwin when ever I (unfortunately) find myself on a windows > machine and in my opinion it isn't worth it for LCTHW. You would most > probably need an appendum with detailed instructions that explain what > packages you need from the GNU toolchain, how to install them, configuration > (although it should work out of the box), etc. You would also need to > explain a few things like the "gotchas" when working with cygwin and how > stuff like the virtual filesystem and mount points work. > > Better off installing ubuntu in a virtual machine. Easier, more straight > forward, and you get a real *nix environment. > > >> >> I know you recommend not using an IDE, but Eclipse C/C++ Development >> Guide, on the Before you begin guide gives useful tips to Windows users, >> that maybe you could adapt for your C book: >> >> Windows >> >> For windows, MinGW, and Cygwin are the two main choices for acquiring the >> GNU toolchain: >> >> - *Cygwin* <http://www.cygwin.com> is a port of the Linux environment >> to Windows. It provides a compatibility layer in a set of DLLs. These DLLs >> are GPL licensed <http://www.gnu.org/copyleft/gpl.html>, making any >> code that links to them also subject to the GPL. Cygwin, however, does >> provide the fullest implementation of the GNU toolchain by supporting the >> GNU libc C runtime library. >> - >> >> *MinGW* <http://www.mingw.org> is a port of the GNU toolchain to the >> Windows platform. The biggest difference over Cygwin is that MinGW uses the >> Windows C runtime libraries (mscvrt) instead of GNU's libc. As a result, a >> compatibility layer is not required, thus avoiding the GPL issues with >> Cygwin. There are differences, though, between the Windows and GNU C runtime >> libraries that will make writing portable applications more difficult. >> >> Interesting Idea, but again IMO not worth it. From the start, the user > needs to understand the difference between two systems that try to emulate a > GNU environment (in a OS not designed for it) before even making a choice. > For someone who hasn't much experience with *nix environemnts, MinGW's > installer is even less user-friendly than cygwin. My point is, some people > might not care for all the extra hassle needed for getting a *nix-like > environment up under windows when all they want to do is learn C with little > fuss as possible. > > >> 1.4 Text Editor >> >> I would add to the list of Text Editors Notepad++, for Windows users. >> > > Agreed. Notepad++ is an excellent swiss-army editor under windows. > > >> >> Best regards, >> >> David >> > > > > -- > "All musicians are drug addicts, no question about it. The ecstasy we get > during a concert is proof enough. > yet there is a slight difference between us, the musicians, and the typical > 'street-junkie'... > Instead of consuming powder, we consume vibrations" > > Gregory Eric Sanderson Turcot Temlett MacDonnell Forbes > >
On Tue, Oct 18, 2011 at 07:20:55AM +0800, Doug wrote: > Mm... I understand the focus here is on the language for the book, but isnt > thay a bit like saying: 'Here, learn c, but forget about using it for > anything serious?' Slightly unrelated, but the reason for having people use Unix to learn C is the tools are easier to work with "raw" and they are all the same. After LCTHW I imagine people will be able to go do C using the MS tools fairly easily. But, for getting started, the unix tool chain is easier at first. Anyway, just an FYI. -- Zed A. Shaw http://zedshaw.com/
Maybe create a preconfigured, downloadable VMWare or VirtualBox image with an Ubuntu ready to roll. This could of course be hampered by bandwidth costs. Then again, it is Learn C the *Hard* Way. On Tue, Oct 25, 2011 at 7:15 AM, Zed A. Shaw <zedshaw@zedshaw.com> wrote: > > On Tue, Oct 18, 2011 at 07:20:55AM +0800, Doug wrote: > > Mm... I understand the focus here is on the language for the book, but isnt > > thay a bit like saying: 'Here, learn c, but forget about using it for > > anything serious?' > > Slightly unrelated, but the reason for having people use Unix to learn C > is the tools are easier to work with "raw" and they are all the same. > After LCTHW I imagine people will be able to go do C using the MS tools > fairly easily. But, for getting started, the unix tool chain is easier > at first. > > Anyway, just an FYI. > > -- > Zed A. Shaw > http://zedshaw.com/
Along these lines, is Vagrant (http://vagrantup.com/) to heavy of an option? Especially if people have done the Ruby course already, it'd be a gem install away. Just thinking outloud. Chris On Tue, Oct 25, 2011 at 12:26 AM, Jan Dahl <jan@spacepope.dk> wrote: > Maybe create a preconfigured, downloadable VMWare or VirtualBox image > with an Ubuntu ready to roll. This could of course be hampered by > bandwidth costs. > > Then again, it is Learn C the *Hard* Way. > > On Tue, Oct 25, 2011 at 7:15 AM, Zed A. Shaw <zedshaw@zedshaw.com> wrote: > > > > On Tue, Oct 18, 2011 at 07:20:55AM +0800, Doug wrote: > > > Mm... I understand the focus here is on the language for the book, but > isnt > > > thay a bit like saying: 'Here, learn c, but forget about using it for > > > anything serious?' > > > > Slightly unrelated, but the reason for having people use Unix to learn C > > is the tools are easier to work with "raw" and they are all the same. > > After LCTHW I imagine people will be able to go do C using the MS tools > > fairly easily. But, for getting started, the unix tool chain is easier > > at first. > > > > Anyway, just an FYI. > > > > -- > > Zed A. Shaw > > http://zedshaw.com/ >
I think the Ubuntu approach is the way to go. Ubuntu is so easy to install nowadays -- there's even an installer that treats Ubuntu as a Windows application. It stuffs everything into c:\ubuntu and configures dual boot for you. So easy! And Ubuntu's GUI has gotten pretty slick, too. The same goes for Ruby. Any time I feel optimistic and tell a Windows hacker to give Ruby a go on Windows I always end up regretting it. -Rob On Fri, Oct 14, 2011 at 5:51 PM, David <davidfdzp@gmail.com> wrote: > ** > Hi, > > In section 1.3 Windows it is stated: > > For Windows users I'll show you how to get a basic Ubuntu Linux system up > and running in a virtual machine so that you can still do all of my > exercises, but avoid all the painful Linux installation problems. ... have > to figure this one out. > > I think that it would be better to recommend the installation of Cygwin, > which provides an environment almost equivalent for the purposes of this C > course. I think that it is better because after compilation you get .exe > files you can natively run on Windows machines. > > I know you recommend not using an IDE, but Eclipse C/C++ Development Guide, > on the Before you begin guide gives useful tips to Windows users, that maybe > you could adapt for your C book: > > Windows > > For windows, MinGW, and Cygwin are the two main choices for acquiring the > GNU toolchain: > > - *Cygwin* <http://www.cygwin.com> is a port of the Linux environment > to Windows. It provides a compatibility layer in a set of DLLs. These DLLs > are GPL licensed <http://www.gnu.org/copyleft/gpl.html>, making any > code that links to them also subject to the GPL. Cygwin, however, does > provide the fullest implementation of the GNU toolchain by supporting the > GNU libc C runtime library. > - > > *MinGW* <http://www.mingw.org> is a port of the GNU toolchain to the > Windows platform. The biggest difference over Cygwin is that MinGW uses the > Windows C runtime libraries (mscvrt) instead of GNU's libc. As a result, a > compatibility layer is not required, thus avoiding the GPL issues with > Cygwin. There are differences, though, between the Windows and GNU C runtime > libraries that will make writing portable applications more difficult. > > > 1.4 Text Editor > > I would add to the list of Text Editors Notepad++, for Windows users. > > Best regards, > > David >