On 05/10/2016 22:34, Chris Angelico wrote:
On Thu, Oct 6, 2016 at 6:35 AM, BartC <b...@freeuk.com> wrote:
This is exactly why I persist with my own language implementations. My
current one is only 1/5000th the size but standard libraries are included!)

Yes, it has all the standard library that *you* expect. Does it have
what some random person on the internet will expect? Here are a few
examples from the standard library of Python:

* Unicode character names and categories
* Date/time manipulation
* Arbitrary-precision rationals
* Statistical functions
* zlib (zip/gzip) compression and decompression
* sqlite3 databasing
* BSD sockets
* Various internet protocols  (HTTP, FTP, SMTP, IMAP)

And that's not even counting the stuff that, if it were proposed
today, would probably be pushed to PyPI. Standard libraries tend to be
fairly large because they're catering to a lot of people's needs. Mind
you, two gig is still a lot, I'm not denying that; but you're saying
that yours is half a meg, and I doubt that a full-featured language of
today can exist inside a floppy disk.

No, it doesn't have all that. But believe me, even with all those things, and even if it worked, a 2GB language implementation is *MASSIVE*, not just a lot.

Even Python, not exactly small, is only 2.5% the size (for 3.4 and presumably including all the libraries in your list).

As to what it consists of, well it doesn't include any How-To videos which would account for much of it. But it does seem to have MSYS (ie. half a Unix system, 200MB); Mingw (a gcc C compiler, 350MB); docs (180MB); and a library (1300MB, but looking at it much of it seems to be useless junk).

> (Also, does your implementation compile directly to machine code, or
> does it depend on something else? It's easy to make something small if
> it depends on another compiler/interpreter.)

The language in question is interpreted. It depends on a compiler/interpreter which is currently a 300KB executable but could end up a bit bigger. The most basic libraries are another 60KB (which will probably end up inside the executable). The only dependencies are what is already present in an OS (msvcrt.dll for example).

Small languages are perfectly viable: the JIT version of Lua, for example, is only about 225KB, and is very fast.

If I wanted to send you program.lua, and you didn't have Lua, I only need to add luajit.exe and lus51.dll (for Windows). With my system, it would be program.q and r.exe, even for multi-module apps.

What would I need for program.hs? (I already know of some solutions for program.py; that's not so straightforward either. But Python installations are more common.)

--
Bartc
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to