<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=koi8-r">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello, guys!</FONT></DIV>
<DIV><FONT face=Arial size=2>I am moving from C++ to PLT Scheme now and it seems
to me that programming in Scheme is a kind of pure pleasure. But what about
programming of real-world applications?</FONT></DIV>
<DIV><FONT face=Arial size=2>I intended to write small shareware utils.
So I have created a tiny test program to estimate it`s size.</FONT></DIV>
<DIV><FONT face=Arial size=2>Here is the source:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>(module little-program<BR> mzscheme<BR>
(require (lib "mred.ss"
"mred")<BR> (lib
"class.ss"))<BR> <BR> (define frame (new
frame%<BR>
(label "Little
program")<BR>
(style '(no-resize-border))))<BR> <BR> (define text-field (new
text-field%<BR>
(label
#f)<BR>
(parent
frame)<BR>
(init-value "0")))<BR> <BR> (define horizontal-pane (new
horizontal-pane%<BR>
(parent frame)))<BR> <BR> (new
button%<BR> (label "Put a
message")<BR> (parent
horizontal-pane)<BR> (callback (lambda (b
e)<BR>
(display "Here is a
message")<BR>
(newline))))<BR> <BR> (new
button%<BR> (label "Toggle
<<enabled?>>")<BR> (parent
horizontal-pane)<BR> (callback (lambda (b
e)<BR>
(send text-field enable (not (send text-field is-enabled?))))))<BR>
<BR> (send frame show #t))</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>;(require little-program)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have plt-299.400-bin-i386-win32 installed on my
WinXP system with MSVC 2003 compiler.</FONT></DIV>
<DIV><FONT face=Arial size=2>When compiled with "gmzc --gui-exe
little-program.exe little-program.scm" it produces executable of
2.5Mbytes.</FONT></DIV>
<DIV><FONT face=Arial size=2>UPX executables packer hadn`t manage in packing of
little-program.exe. Just can`t do it.</FONT></DIV>
<DIV><FONT face=Arial size=2>And then when compiled with "gmzc -c
little-program.scm" gmzc produced a c-source of just
~30Kbytes.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thus, is it possible to link to standard Scheme
libraries statically without including of huge amount of byte-code?</FONT></DIV>
<DIV><FONT face=Arial size=2>Is it possible to link to native-code-compiled
libraries?</FONT></DIV>
<DIV><FONT face=Arial size=2>Or is there any way of restricting compiler`s
include path to only those modules, that are realy needed?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>P.S. I thank creators of the PLT Scheme for
discovering of amazing world of Scheme for me.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>With best regards, Ivan
Boulanov.</FONT></DIV></BODY></HTML>