 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
You remember the days when programmers struggled to fit as much program
as possible into 64 KB of RAM?
I just realised something. The Haskell program I wrote the other day?
It's 1.5 MB in size. This single executable program is actually *too
big* to fit on a single [high-density] floppy disk.
The worrying part is, it doesn't even *do* anything! It's just a wrapper
around a seperate program...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 <voi### [at] dev null> wrote:
> I just realised something. The Haskell program I wrote the other day?
> It's 1.5 MB in size. This single executable program is actually *too
> big* to fit on a single [high-density] floppy disk.
Is there *any* programming language designed after the early 80's which
actually cares about memory usage?
(No need to mention the obscure languages designed for embedded systems
because in those cases they are forced to care.)
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Is there *any* programming language designed after the early 80's which
> actually cares about memory usage?
Ada? FORTH?
My take on it is that if you're concerned about memory usage, use one of
the languages that's good at memory usage. How many of them do you need?
What's missing that would make life a lot easier that you can
nevertheless fit into a small memory footprint? If you don't have a lot
of memory, chances are your program isn't big enough to need a really
sophisticated and/or unusual language to code it in. Pick one like C,
C++, Ada, BASIC, or FORTRAN, and use it. If you need something
"stronger", use LISP or FORTH or Smalltalk.
Fitting Mathematica, Prolog, or Haskel into 64K just isn't worth it -
there isn't enough data to be processed that you need particularly
sophisticated processing methods.
Sure, languages like Java waste memory if you allocate each integer as a
separate object, so you make an array of integers to hold your bitmap,
and deal with the minor pain that architectural decision entails.
--
Darren New / San Diego, CA, USA (PST)
Helpful housekeeping hints:
Check your feather pillows for holes
before putting them in the washing machine.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> Warp wrote:
> > Is there *any* programming language designed after the early 80's which
> > actually cares about memory usage?
> Ada?
1983.
> FORTH?
1970's.
> Sure, languages like Java waste memory if you allocate each integer as a
> separate object, so you make an array of integers to hold your bitmap,
> and deal with the minor pain that architectural decision entails.
What if you want objects with two or three integers inside them?
Or an integer and a floating point value?
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
>> Ada?
> 1983.
Ada-95, then? ;-)
>> FORTH?
> 1970's.
Oh. Yeah, OK, it was around a lot longer than I knew. Standardized a lot
later, tho. Thanks. :-)
>> Sure, languages like Java waste memory if you allocate each integer as a
>> separate object, so you make an array of integers to hold your bitmap,
>> and deal with the minor pain that architectural decision entails.
>
> What if you want objects with two or three integers inside them?
> Or an integer and a floating point value?
You still put it in an array, or two parallel arrays. Or use C# instead.
Don't attribute Java's limitations to every safe/GCed language :-)
I think the basic problem is that after the early 80's, people weren't
designing programming languages based on 8-bit processors with 16-bit
address spaces. I mean, C and FORTRAN were considered terribly wasteful
of resources back when 1K of RAM was a lot of memory. :-)
I guess most people doing that stuff figured memory-restricted languages
were pretty much a solved problem. Pick from C, Fortran, COBOL, Ada,
FORTH, Assembler, Pascal, BASIC, APL, LISP, Algol, PL/1, C++, ... as you
like. Why make another like that? What's missing? All those languages
ran comfortably in and could do considerable (for the time) computation
on a 64K machine. If you don't have the memory to run Excel, write it in
APL. If you don't have the memory to run Perl, write it in COBOL. If
Prolog is too big, use LISP.
It seems obvious to me that if one is interesting in developing new
languages, it's a good idea to target the machines with new
capabilities. You want to solve in your language the kinds of problems
that don't come up when you only have small machines, like how to
efficiently organize terabytes of data spread over a dozen cities in a
way that you never, ever have an outage.
Of course, you also have things like befunge, brainfuck, intercal, and
all the other joke languages which can nevertheless be interpreted with
a handful of memory. :-) I suspect this isn't what you meant, tho.
And of course you have problems that push the limits of big machines
too. Video games, artificial intelligence, physics simulations (of
various accuracies), data mining (say, google), etc. But a lot of those
kinds of problems can be broken into a more-core part that you write in
a difficult efficient language and a less-core part that you write in a
more powerful less efficient language. Which is kind of the same all the
way down the stack - C is a lot easier than VHDL to get some piece of
functionality out of, but you might need a dozen C instructions to do
what one custom VHDL blob of gates could do in a couple of clock cycles.
Why is software less reliable than hardware? One reason is that software
is used to do the stuff that is far too complex to do in hardware. Why
do people build languages like Java or Erlang or Haskel that compile
down to C? To build the systems you couldn't build in C because it's too
low-level conceptually, lacking vital flexibility.
--
Darren New / San Diego, CA, USA (PST)
Helpful housekeeping hints:
Check your feather pillows for holes
before putting them in the washing machine.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 13-Jul-08 22:34, Warp wrote:
> Orchid XP v8 <voi### [at] dev null> wrote:
>> I just realised something. The Haskell program I wrote the other day?
>> It's 1.5 MB in size. This single executable program is actually *too
>> big* to fit on a single [high-density] floppy disk.
>
> Is there *any* programming language designed after the early 80's which
> actually cares about memory usage?
POV-Ray?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
andrel <a_l### [at] hotmail com> wrote:
> > Is there *any* programming language designed after the early 80's which
> > actually cares about memory usage?
> POV-Ray?
Except that POV-Ray isn't a programming language but a renderer.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Is there *any* programming language designed after the early 80's which
> actually cares about memory usage?
HTML
(Dodges tomatos!)
--
----> If you cut here, you'll ruin your monitor. <----
/\ /\ /\ /
/ \/ \ u e e n / \/ a w a z
>>>>>>mue### [at] nawaz org<<<<<<
anl
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
> You remember the days when programmers struggled to fit as much program
> as possible into 64 KB of RAM?
>
> I just realised something. The Haskell program I wrote the other day?
> It's 1.5 MB in size. This single executable program is actually *too
> big* to fit on a single [high-density] floppy disk.
>
> The worrying part is, it doesn't even *do* anything! It's just a wrapper
> around a seperate program...
>
Have you ever heard of premature optimization?
Don't bother solving a problem until it's a problem. Sure, modern
programs use WAY more resources than older ones... but is it even a problem?
Unless you're running out of memory on your computer, don't even try to
optimize it for size.
Let's face it: on a modern computer with, say, 3Gb of RAM, if you have a
program that's running out of memory, are you going to care about
a) The data structures using up 4Gb of RAM that you need to optimize, or
b) The default libraries linked in using .0015 Gb of RAM?
...Chambers
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Mueen Nawaz wrote:
> Warp wrote:
>> Is there *any* programming language designed after the early 80's which
>> actually cares about memory usage?
>
> HTML
>
> (Dodges tomatos!)
>
>
If you mean, it's designed to care about using AS MUCH AS POSSIBLE? ;)
...Chambers
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 14-Jul-08 1:14, Warp wrote:
> andrel <a_l### [at] hotmail com> wrote:
>>> Is there *any* programming language designed after the early 80's which
>>> actually cares about memory usage?
>
>> POV-Ray?
>
> Except that POV-Ray isn't a programming language but a renderer.
>
it is both.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
>>> FORTH?
>> 1970's.
>
> Oh. Yeah, OK, it was around a lot longer than I knew. Standardized a lot
> later, tho. Thanks. :-)
I can't believe a computer expert wouldn't know that. I mean, FORTH is
only, like, the most important programming language *ever*! Next you'll
be telling me you don't know who Babbage is...
[I'm only kidding of couse...]
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
> Darren New wrote:
>
>>>> FORTH?
>>> 1970's.
>>
>> Oh. Yeah, OK, it was around a lot longer than I knew. Standardized a
>> lot later, tho. Thanks. :-)
>
> I can't believe a computer expert wouldn't know that. I mean, FORTH is
> only, like, the most important programming language *ever*! Next you'll
> be telling me you don't know who Babbage is...
Didn't he write programs with the alphabet soup his wife Ada made for him?
...Chambers
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
andrel <a_l### [at] hotmail com> wrote:
> On 14-Jul-08 1:14, Warp wrote:
> > andrel <a_l### [at] hotmail com> wrote:
> >>> Is there *any* programming language designed after the early 80's which
> >>> actually cares about memory usage?
> >
> >> POV-Ray?
> >
> > Except that POV-Ray isn't a programming language but a renderer.
> >
> it is both.
If you are referring to the SDL as a "programming language", that is
a real memory hog.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Mueen Nawaz <m.n### [at] ieee org> wrote:
> Warp wrote:
> > Is there *any* programming language designed after the early 80's which
> > actually cares about memory usage?
> HTML
> (Dodges tomatos!)
Even if it was a "programming language", HTML is probably one of the
*least* memory-efficient languages ever.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 14-Jul-08 16:35, Warp wrote:
> andrel <a_l### [at] hotmail com> wrote:
>> On 14-Jul-08 1:14, Warp wrote:
>>> andrel <a_l### [at] hotmail com> wrote:
>>>>> Is there *any* programming language designed after the early 80's which
>>>>> actually cares about memory usage?
>>>> POV-Ray?
>>> Except that POV-Ray isn't a programming language but a renderer.
>>>
>> it is both.
>
> If you are referring to the SDL as a "programming language", that is
> a real memory hog.
>
No I am referring to the way SDL handles datastructures. I assume that
they are designed to let the scene use as little memory as possible. I
could be wrong, but I shouldn't. ;)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
andrel <a_l### [at] hotmail com> wrote:
> No I am referring to the way SDL handles datastructures.
If you make, for example, an array of objects with the SDL, it is
a memory hog.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
> I can't believe a computer expert wouldn't know that. I mean, FORTH is
> only, like, the most important programming language *ever*!
Heh. To be fair, I've written at least two complete FORTH interpreters.
:-) Still, it wasn't actually popular until the 80's.
--
Darren New / San Diego, CA, USA (PST)
Helpful housekeeping hints:
Check your feather pillows for holes
before putting them in the washing machine.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 14-Jul-08 20:30, Warp wrote:
> andrel <a_l### [at] hotmail com> wrote:
>> No I am referring to the way SDL handles datastructures.
>
> If you make, for example, an array of objects with the SDL, it is
> a memory hog.
>
Well, lets change that in POV4.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
andrel <a_l### [at] hotmail com> wrote:
> On 14-Jul-08 20:30, Warp wrote:
> > andrel <a_l### [at] hotmail com> wrote:
> >> No I am referring to the way SDL handles datastructures.
> >
> > If you make, for example, an array of objects with the SDL, it is
> > a memory hog.
> >
> Well, lets change that in POV4.
I bet it won't be too different in that regard.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> I can't believe a computer expert wouldn't know that. I mean, FORTH is
>> only, like, the most important programming language *ever*!
>
> Heh. To be fair, I've written at least two complete FORTH interpreters.
> :-) Still, it wasn't actually popular until the 80's.
...it was actually popular? :-P
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
>>> I can't believe a computer expert wouldn't know that. I mean, FORTH
>>> is only, like, the most important programming language *ever*!
>>
>> Heh. To be fair, I've written at least two complete FORTH
>> interpreters. :-) Still, it wasn't actually popular until the 80's.
>
> ....it was actually popular? :-P
Actually, yeah. For example, every Sun Sparcstation had FORTH in ROM,
and a number of other embedded systems used it (like printer drivers and
such).
But it was never popular like C is, no. Certainly more popular in the
80's (after a standard came out for it) than in the 70's.
--
Darren New / San Diego, CA, USA (PST)
Helpful housekeeping hints:
Check your feather pillows for holes
before putting them in the washing machine.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
> You remember the days when programmers struggled to fit as much program
> as possible into 64 KB of RAM?
I still do ...
-- Chris
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> I think the basic problem is that after the early 80's, people weren't
> designing programming languages based on 8-bit processors with 16-bit
> address spaces. I mean, C and FORTRAN were considered terribly wasteful
> of resources back when 1K of RAM was a lot of memory. :-)
I learned to micro-optimize with LEGO Mindstorms. It *interprets* bytecode,
and the interpreter runs on a tiny slow H8 microcontroller. I was writing
in NQC, btw, not the graphical system it comes with (the one connecting
command blocks like puzzle pieces). You could really notice the difference
of speed by just moving switch case labels around (most common/important
ones first so that it needs to do fewer comparisons before reaching them).
The hardcore guys were writing alternate firmwares :) I heard someone added
floating point support in less than 2KB, complete with the NaN and infinity
mess.
(And their children were probably using the graphical programming language
with the same robotics kit. Clearly a toy for all ages.)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
> I can't believe a computer expert wouldn't know that.
Wow, Warp didn't comment on that line yet? :)
(a "look who's speaking" kind of comment)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez wrote:
> Orchid XP v8 wrote:
>> I can't believe a computer expert wouldn't know that.
>
> Wow, Warp didn't comment on that line yet? :)
>
> (a "look who's speaking" kind of comment)
Wow. Now we're getting meta-nasties. :-)
--
Darren New / San Diego, CA, USA (PST)
Helpful housekeeping hints:
Check your feather pillows for holes
before putting them in the washing machine.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Some computer archeology: http://www.pagetable.com/?p=32
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Some computer archeology: http://www.pagetable.com/?p=32
Wow! LOL.
I did have a tape for a C64 laying around somewhere and I was going to
attempt to decode it... but then I found an illegal copy of the data
online, so I didn't need to bother.
(Did you know, you can actually get C64 sound emulator plugins for
WinAmp?? Retro, much?)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 <voi### [at] dev null> wrote:
> (Did you know, you can actually get C64 sound emulator plugins for
> WinAmp?? Retro, much?)
Emulators for old consoles and game computers are very popular among
certain demographic groups of computer nerds.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> (Did you know, you can actually get C64 sound emulator plugins for
>> WinAmp?? Retro, much?)
>
> Emulators for old consoles and game computers are very popular among
> certain demographic groups of computer nerds.
Apparently.
Now, the fact is, when I listen to this thing, I can't help but think
that the filter responses aren't quite correct. What the HELL does that
make me? o_O
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 <voi### [at] dev null> wrote:
> Now, the fact is, when I listen to this thing, I can't help but think
> that the filter responses aren't quite correct. What the HELL does that
> make me? o_O
Honestly, IMO the sound quality of the C64 sucks. For example the NES
and the Spectrum128 had much better sound.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp <war### [at] tag povray org> wrote:
> Orchid XP v8 <voi### [at] dev null> wrote:
> > (Did you know, you can actually get C64 sound emulator plugins for
> > WinAmp?? Retro, much?)
>
> Emulators for old consoles and game computers are very popular among
> certain demographic groups of computer nerds.
>
> --
> - Warp
For the jurassic computer nerds, see http://www.hercules-390.org/.
An emulator for old IBM 360/370 mainframes. You too can have an IBM
mainframe on your desktop. Running MVS 3.8 on a 2.4G P4 is about as fast
as an IBM 3033U circa 1980.
Isaac
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
> (Did you know, you can actually get C64 sound emulator plugins for
> WinAmp?? Retro, much?)
Yes, I downloaded all of Sonic the Hedgehog music in its "original format"
(file format is basically a dump of the commands the main SEGA CPU sent to
the YM2612 sound chip).
Lots of SEGA music can be downloaded from http://project2612.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |