tags:

views:

1135

answers:

27

I have a computer with 128 MB's of RAM (I said it was a piece of crap). It runs Windows XP Professional (slugishly). I don't have to use this computer except at night time when I'm supposed to be in bed, around 1:00 - 4:00 AM. So what is the best programming language / compiler to use? Which is the least RAM dependent.

+16  A: 

I've had enough fun programming on my old 64kb Apple II machine. I actually learned to program when games used to crash and throw you into the basic prompt with the source code (I'm talking early 80s here).

I also built huge programs at Intel on a computer with 128MBs.

I really don't understand this question. Most people have programmed on much weaker computers years ago. Obviously there's a limit to what you could write. It's not going to be the next Halo.

The only limitation you would probably have is in using some IDEs. For example, I wouldn't use Eclipse. However, you could probably run earlier Visual Studios (e.g., Visual C++ 5), and certainly DOS based compilers like good old Borland Turbo C++.

Uri
Do vim/emacs count as IDEs yet or are they still "merely" really good text editors?
Chris Lutz
Trying to use modern tools (VS) on old hardware gives an awful experience, Lucas clearly can't convert this machine back to Linux, so he's asking the question. Many of us have coded weak hardware, when that was current, different question when that's all you got access to.
MrTelly
Many hardcore C/C++ developers think that "IDEs are for sissies". For example, many Google engineers swear by emacs. Since emacs is configurable, you could throw in macros and such, though it's not an IDE in the strict sense.
Uri
I used visual studio from 1995-2000 on machines that were way weaker than this and had no problems whatsoever. I'm talking something on the level of VC++5, not VC.NET
Uri
Well what's the definition of an IDE? Something that does paren matching and syntax hilighting? Or does it need to be able to generate code via a Wizard? I guess, how seriously do you take the I in IDE?
jeffamaphone
@Uri - As a C (and Perl, but that's less impressive) developer who's never even had to use a debugger yet, I understand the sentiment. However, vim and emacs easily have power comparable to many modern IDEs. Maybe they don't generate code, but I don't know that they should, or that I'd ever want to.
Chris Lutz
Ah VC5, and where would you find that these days, and could you get answers on SO if you can find it.
MrTelly
Everyone's mentioning VC5, but I don't remember VC6 being any worse than 5 was... was there a big difference? I don't remember =o
zildjohn01
I actually preferred VC6 to VC5. I felt that there were some annoying bugs in VC5 that were resolved in VC6. In addition, if I remember correctly, VC5 used to have a messed up linker when libraries were compiled under different versions.
Uri
VC6 is actually fairly common, since it usually came with VB6... It had a better COM/ATL system than VC5. I think there's a patch to run it on XP.
Uri
@Chris: I program in Java these days and get a very significant benefit from the ability to hold a model of the class hierarchy in memory. In addition, I write fairly complex Eclipse plugins. Don't think I could pull it off in emacs.
Uri
@Uri - I tend to just keep a bunch of windows open and continually cross-reference them, but I don't do anything quite on that level of complexity. I can imagine there is some functionality that it would be nice to have when working on a large project.
Chris Lutz
In the end it's a matter of taste. I can't stand Microsoft Word for anything and just use LaTeX. My friends write dissertations in Word.
Uri
By the way, you can always run Cygwin and have what feels like a UNIX environment on your windows machine, complete with all the UNIX tools.
Uri
VC6 runs on XP perfectly without patches. In fact, last time I was using it was half a year ago :) Legacy code, you know.
vava
VS (any version) with 128MB RAM total???? I don't think so.
Kendall Helmstetter Gelner
@Uri - It's worse than that. I'm on OS X. I just CAN'T go to Windows. It's, like, illegal or something. I would explode. </sarcasm> I've used Cygwin a little, and while noting that it was on Vista, `vim` didn't work quite right (possible problems with curses?), so it was difficult to do much.
Chris Lutz
And personally, I use NeoOffice (a port of OpenOffice.org to OS X because X Windows on OS X is really flaky), so I agree with you there.
Chris Lutz
+2  A: 

This will depend on your target application really. If you are building small programs in order to learn a programming language it doesn't really matter how "sucky" your development machine is.

Trent
+1  A: 

Um... are you planning to do anything with it, say use it as a learning tool?

If your going to install an IDE, install Visual Studio 6 or Visual Basic 6... That will probably give you the most bang for you buck..

You could try installing IIS, but that will add overhead on top of any web language you will end up using.

You could try install Visual Studio .NET Express editions. Can't say how well it would work or even if it meets the min reqs

Edit: Umm... nope, you need at least 192MB to install the Express SKUs, you could try, but it might not work.

If you want to learn C, then install VC++ 6.0 if you have it.

Chris
I kinda want to learn C.
Lucas McCoy
@lucas: if you want to learn C, use C.
Trent
Windows XP was written in C and C++, so clearly these languages will be able to target your machine.
Michael
Honestly I'd rather use MinGW than VC++. It's better to compile C code with a C compiler than a C++ compiler. C++ is NOT a strict superset of C, and VC++ 6.0 won't have any C99 support (it was released in 1998).
Chris Lutz
@Chris Lutz, yes that is correct. I'm really haven't had much experience outside of VC++ for C or C++, but I have used Borland C and Turbo C, both which date me, back to when IDE's were DOS based
Chris
@Chris - Hello! Glad to meet another Chris. It didn't even register when I was reading the answer, but I find it quite amusing now. Anyway, there's also Tiny C compiler, which only gets a subset of C (but I think gets most), and there's MinGW (GCC for Windows), which works really well. Also...
Chris Lutz
...there's lcc, which I know next to nothing about, except that it's not purely open-source (I think), which is where my loyalties tend to lie. But Turbo C and Borland C are still around, though I doubt if they have good C99 support either.
Chris Lutz
+2  A: 

If you're into C, you can try lcc-win32. Also I don't see a problem to code in Python/Perl.

Anonymous
+5  A: 

As Uri stated, your biggest problem will be IDEs. If you use Visual Studio 6.0 or before, you should be fine though. Also, any of the scripting based languages (PHP, Python, etc.) will run fine (if you're just dinking around at least) on a machine of that speed.

If you need something that performs well, straight C on an old compiler is your best bet.

Jess
+3  A: 

Languages are not dependent on memory, though any sort of managed language such as C#, Java, etc, will have to load a runtime / virtual machine. C / C++ is about as close to the hardware as you'll get, and you get to manage all the memory usage yourself.

You can get the Microsoft command line compilers for free by downloading the Win32 SDK, and of course gcc comes with Linux. Then you use your favorite editor (vi / emacs / notepad / notepad++ / notepad2 / etc) to write the code. I wouldn't bother with Visual Studio.

Really it depends what sort of program you want to build.

jeffamaphone
+4  A: 

I'd be looking at Cygwin and the gcc compiler.

MrTelly
+11  A: 

I'd go with any language that has a command-line compiler and doesn't require an IDE.

Straight C with GCC under mingw is more or less on the nose.

Electrons_Ahoy
Isn't that more or less all of them?
jeffamaphone
+5  A: 

The question is not which language. I think it's more: which IDE I can use with this.
I would use C with gcc/Notepad++ :)

n00ki3
vi/emacs would probably work pretty well regardless of RAM.
Chris Lutz
emacs = Eight Megabytes And Constantly Swapping.
LiraNuna
+2  A: 

An old version of Delphi of course. I've used version 3 on machines with 32 MB, so 128 is plenty. And the IDE does not suck. Using c or c++ compiles much slower, and the IDEs are not as good

Stephan Eggermont
+2  A: 

MinGW/MSYS should run comfortably in 128MB, allowing C/C++ development. The command-line based MSYS interface (basically a unix shell environment) will be much less sensitive to latency than a GUI, so it will be more tolerant of swapping. Also, most scripting languages such as Perl or Python will work fine in 128MB. Check out www.activestate.com for a source of good windows distributions of Python, Perl and Tcl/Tk.

ConcernedOfTunbridgeWells
Also Cygwin is a great way to run Perl, Python, and other Unix-y scripting languages, as well as GCC and G++ and other GCC-based compilers, on Windows.
Chris Lutz
I find Unxutils and native Win32 interpereters are better when you need to integrate with native Windows utilities. Unxutils is based on msvcrt.dll and understands native windows paths so you don't have the impedance mismatch with the /cygdrive paths of the cygwin utilities.
ConcernedOfTunbridgeWells
+3  A: 

I would use notepad++ (or similar) to code in and then a command line compiler such as csc in the .NET SDK. If the machine is XP then a .NET language such as VB or C# makes sense to me. It's all free and your half way there already!

Fraser
Can't install on such a machine
Stephan Eggermont
Windows XP is the only requirement for the SDK...
Fraser
+1  A: 

I'd stick an extra 128Mb of RAM in it - you might be suprised at the difference it makes. My own development machine is a 9 year old Sony laptop with 256Mb and a 900Mhz processor running Win2K. With it I can run a couple of the Code::Blocks C++ IDE instances, SQL Server and Apache, simultaneously, without any real problems.

anon
finding a 128mb of ram can be very expensive those days!! XD
fortran
+1  A: 

Install Linux, and use a very lightweight window manager like TWM. it will speed up that system greatly.

Then you can choose from a number of modern languages, from C++ to Objective-C or even Java if you wish with so much system overhead out of the way.

To start with you might want to consider one of the scripting languages like Perl or PHP, and do some web stuff.

If you can't change the OS the system uses then look for Cygwin, and use that system to develop with. No way a modern IDE is going to work well there, use Emacs or VI (Emacs is easier).

Edit: Instead of installing a new OS on the computer, get a USB stick and install this to boot from:

http://www.downloadtube.com/blog/2009/03/11/tiny-core-linux-has-just-10-mb-in-size/

Can't remember if a computer of the era you have can book from USB though.

Kendall Helmstetter Gelner
TWM isn't an example of a "very light window manager" - it is merely one of the earliest ones.(That said, these days it /is/ a very lightweight window manager, but there are lighter ones available. Even IceWM is lighter, iirc).
Arafangion
Just go with Damn Small Linux. It's Linux in < 50 MB hard drive space. It needs 16 MB of RAM to run comfortably, in which space it even has it's own (basic) web browser.
Chris Lutz
Sure, TWM isn't the lightest, but I think offers a good balance between reasonable features and small footprint. I used to use it on systems with fewer resources...
Kendall Helmstetter Gelner
+1  A: 

Back in 2000 (during my nightshifts) I taught myself .NET/C# (beta days!) by building console apps on a Dell laptop with 128MB RAM and the slowest hard disk ever. It did teach me how to use all the command line stuff though.

A machine with 128MB of RAM isn't that limiting, you can chuck perl, python, ruby and all sorts of good stuff on your PC to get you by. Hell, even the Java command line bits should run just fine. In fact we were building Java/Swing apps on machines with 128MB back in 1998/1999.

HTH
Kev

Kev
Why the downvote?
Kev
+4  A: 

Try to get Turbo Pascal somewhere - good old classics :)

nhek
https://downloads.embarcadero.com/free/turbopascal watch out, it's a 64K download, might take a while
SqlACID
+8  A: 

I would first try to get a more lightweight operating system, something like FreeBSD or GNU/Linux with a lean window manager (e.g. fluxbox). These also happen to hold much more "power" as a programming environment per se.

The next step is a good but lean IDE, and I think that you can't go wrong with emacs, which also supports a wide variety of languages. Vim is also a good option.

Finally, I would use a language that allows incremental development on a REPL. This keeps compiling times to a minimum, so that you don't notice the limited resources so much. Plus, this is the best way to code, anyway.

Svante
I love linux but it doesn't work with my printer.
Lucas McCoy
Ah, sorry, but it is the other way around -- your printer doesn't work with Linux, presumably because its internal programming has been outsourced to a windows program (also known as GDI). However, there are solutions for that, as far as I know.
Svante
In any case, you wouldn't want to print while hacking away between 1 and 4 am, would you?
Svante
+3  A: 

Run an Amiga emulator and code apps for Workbench 3.1 in AREXX.

Robert S.
+1  A: 

Bah... you're all trying to find a way of running huge fancy bloated languages like C on an underpowered machine. You need to get back to basics!

Use NASM + your favorite text editor. No need to restrict yourself to DOS assembly coding - you can write Win32 apps in assembly as well. There's nothing like writing a full Windows app that fits within a 4k block. It certainly cuts down on application load-times.

geofftnz
+1  A: 

Use text-based emacs to hack C and compile it with gcc. Can't get any faster. Or use a script language, so you don't even have to wait for compilation.

+1  A: 

If you think about it, most languages have historically run on computers with many fewer resources than what you have on that computer. Lisp was invented 50 years ago. Smalltalk in the 70s. Basic ran on the Commodore 64. C/C++ run on tiny embedded processors. Perl ran on pretty small machines at the beginning of the Internet. In short, it's not the language you need to worry about.

What you need is a low-friction environment to develop in. You don't want to use a heavyweight IDE, especially not something like Eclipse. Your best bet is something with a command-line compiler and a low-resource editor like Vim.

Steve Rowe
The Commodore 64 was by no means the lowest-end computer that ran BASIC. I don't know about the early original Honeywell computers, but there were a lot of earlier home/hobbyist computers.
David Thornley
I didn't mean to imply it was the lowest-end computer to run BASIC, just that it was a common low-end computer which could run it. Gates wrote his first basic on the Altair which was probably the lowest-end computer to run BASIC as anything less wouldn't be a computer.
Steve Rowe
A: 

This is actually part of my job daily, we use virtual machines and simulators for development, most of them have 64 - 128 MB of memory available. I use nano for editing in those cases, it does a very good job. I use mostly C, sometimes I must make something portable between various operating systems (i.e. Linux/Windows).

This is a good question, as appliances and embedded solutions become more and more popular, its a lot like going back in time to when a machine with 64 MB of RAM was the envy of all your friends.

The language that you use does make some difference, you might need to save the overhead of an interpreted language depending on what you're doing. In your case, however, I don't think its much of an issue.

Tim Post
A: 

If you're just looking to have fun and learn a little, you only need download Firefox and Firebug and belly up to JavaScript. John Resig is only 25 years old! What are you waiting for? You could be the next guy to teach Google how to debug and test their JavaScript.

rp
+2  A: 

I'll +1 GCC+MinGW, but I also wanted to suggest FASM: http://flatassembler.net/

As both a language and IDE, it's tiny. And free. Works in both Linux and Windows, too. I'd definitely recommend it for someone who wants to learn about computers and programming on an antique machine.

Duke Navarre
As an asterisk by that "cross-platform," FASM (disappointingly) does not work on OS X. They need to just steal NASM's Mach-O code and add it to theirs already (after conversion from C to assembly, of course). I would love to work with FASM, if only I could.
Chris Lutz
Amended. Thanks.
Duke Navarre
+1  A: 

Why so worried?

I finished my final exam on University using only old Pentium II 300 Mhz with only 64Mb RAM and 4GB HDD...

I used Windows 2000 Pro as my environment at that time and used Delphi 7 (even I tried Turbo Delphi 2006, but the .NET crap make it slow) and Visual Basic 6 as my main desktop programming language. For web development, I used PHP.

My "ancient" PC ran happily until it was time to compile (btw it didn't take that long - approximately 3-10 minutes depending program size). So usually I rechecked my code before each compile/debugging session.

Now it is used by my senior high school sister for Word and Excel. LOL.

So pick either Delphi 6-7 or Visual Basic 6 or if you want more power go for C++.

Dels
+1  A: 

Another pretty light weight A free C++ IDE from bloodshed I have used for many years on a pentium 3 with 128mb RAM and Windows XP and it works pretty good.

Steve Obbayi
I dislike that IDE. Maybe that's just me - but i find it buggy.
Arnis L.
+3  A: 

Forth was designed to run on much lower-end machines, compiling and executing quickly and supporting rapid development. It's got a freewheeling programming style that's fun, and you'll get exposed to something new.

David Thornley