4 ms·
Hello world being 50MB might be one.
by BubRoss 7y ago
Hello world being 50MB might be one.
- scroot 7y agoHow big is your operating system?
- claudiawerner 7y agoSmaller than it would be if it were written in Smalltalk instead of C. (I'm kidding, I like Smalltalk, but the comparison to an OS doesn't do much when we're discussing the size of very small bits of code).
- jecel 7y agoActually, having written operating systems in C, Objective-C and Smalltalk I can say that unless we are talking about something MS-DOS like in simplicity then the Smalltalk OS will be much smaller than the C one. The unstripped binary for the Little Smalltalk 3 virtual machine is 55,229 bytes on my Linux computer and the systemImage file, at 102,100 bytes, includes mostly things that would not be needed for a "hello world" program.
- igouy 7y agoWhat is 50MB supposed to be the size-of ? What is the JVM equivalent ?
- EdwardDiego 7y agoLet's say that the size we're measuring is the distributable unit. I give you this, and assuming you've got common dependencies, you can run it without building or compiling.
- jolmg 7y agoI only have a few minutes worth of knowledge of Smalltalk, but... $ cat hello.st #!/usr/bin/gst Transcript show: 'Hello World!'. Transcript cr. $ ./hello.st Hello World! $ du -b hello.st 64 hello.st That's 64 bytes in a distributable unit. So, what's 50MB? Even combining the whole of the smalltalk package I used, it's only 18M: $ du -bhc $(pacman -Qlq smalltalk | grep -v '/$') | tail -1 18M total
- epsilon_greedy 7y agoGnu Smalltalk isn't used often (as far as I'm aware). If you use something more common like Pharo or Squeak, the base image includes things like the IDE, window environment, etc. and accounts for the 50MB size. Edit I should mention that shipping smalltalk applications generally means shipping the entire image. While there is work to make distributing just the code easier (EG. iceberg mentioned in the article) I don't believe this is yet a common practice. Even in that scenario however, you'll need an image to run that code and it will still be 50+MB.
- igouy 7y ago> … shipping smalltalk applications generally means … Is that what Edward Diego meant? Is Hello world what "smalltalk applications" generally means?
- epsilon_greedy 7y agoThat is what I took "distributable unit" to mean, yes. Perhaps it's not fair to say that this is true for "hello world" as you've shown in your Visual Works example and jolmg has shown with GST.
- igouy 7y ago> not fair That's not the issue. Not sensible is the issue. What relevance does the distributable size of hello world have when the goal is to develop enterprise scale systems?
- dpc_pw 7y agoIt's like you shipped your shell, text editor, debugger and more with every program you made in Java. :D
- detaro 7y agoWhy would you ship those with a release of a smalltalk application?
- igouy 7y agoQuite a good question. I think the most broadly applicable answer now is simply that including those development tools usually requires less-effort than not doing so. That's a legacy from Smalltalk-80 application development at Xerox Special Information Systems (XSIS, back in the mid 1980s): — "My response … is to remind the customer that the system is designed so that they can easily and freely change it. This concept is a new one to many people because traditional programming environments carefully protect system code from modification. The Smalltalk-80 environment treats system code and user code alike. Mold the system into an environment that suits your needs. The researchers designed the system so that they could experiment with creating new systems; the changeability of all of the system parts is a necessary attribute of this research." p501 "Smalltalk - The Interactive Programming Environment", 1984. Of course, some Smalltalk implementations did things differently: - Dolphin Smalltalk could ship applications packaged as MSWin dlls - Resilient Smalltalk used a completely separate Eclipse development environment to connect over TCP/IP to a VM+image embedded-system
- igouy 7y ago~$ ./visual ./visualnc64.im -nogui -doit "Stdout nextPutAll: 'Hello world'; cr. ObjectMemory quit" Hello world ~$
- dingosity 7y agoIf you read further in the documentation, you can find the bit where you can remove all the objects you don't need for anything other than emitting "Hello World" on the terminal. On an older version of Squeak I was able to get it down to about 250k, which is about on par with the Golang hello world.