<pre><tt><tt>How about adding unit test library like eunit to the distribution. I would also like to see more mocking support (similar to jmock/mockeasy/flexmock) especially for OTP.<br><br>> On Nov 13, 2007 10:27 PM, Joe Armstrong <<span style="border-bottom: 1px dashed rgb(0, 102, 204); cursor: pointer;" class="yshortcuts" id="lw_1195062686_43">erlang@gmail.com</span>> wrote:<br>>> Hi everybody,<br>>><br>>> I got fired up with enthusiasm at the Erlang conference - it seems<br> to<br>>> me that there are a lot of *simple* things we<br>>> can do that we should have done years ago. The reason was that even<br>>> though many aspects of the system<br>>> suck and can be *easily* improved we have learnt to live with the<br>>> system (warts and all).<br>>><br>>> Now that the book is done my thoughts returned to the Erlang system.<br>>><br>>> Erlang is becoming popular and now needs to address the
problems<br> that<br>>> our new users encounter.<br>>><br>>> To do this I propose a project called "service pack one" (( its an<br>>> add-on that can be bolted on top of OTP))<br>>><br>>> (( I don't want to change anything in OTP - just add a free-standing<br>>> set of scripts that modify the behavior<br>>> of the system ))<br>>><br>>> Here's a few very simple things to do:<br>>><br>>> (each of the things starting +++ is a little project --- now I'd<br> like<br>>> volunteers for each project - most of these are pretty easy<br>>> to hack together a quick and dirty prototype - but needs a little<br> care<br>>> in getting all the details right)<br>>><br>>><br>>> 1 +++ fix nicer error messages (Done - Kenneth showed this)<br>>><br>>> 2 +++ experiment with inheritance (Richard mentioned this) (( I<br> hacked<br>>> this together today, together
with<br>>> some code that checks for missing calls in imported<br> libraries))<br>>> - I can post a longer explanation if you like<br>>><br>>> 3 +++ make Erlang start fast so that people stop winging about it<br>>> starting slowly. And fix a<br>>> *small* distribution - here's a minimal version.<br>>><br>>> ((aside - who cares if Erlang starts slowly - it was designed to<br>>> start once and never stop - we have systems<br>>> that have run for 5 years - a two seconds start-up time amortized<br> over<br>>> 5 years is not *too* bad))<br>>><br>>> (( If you want to make it fast redo the boot scripts - it's all<br> in<br>>> the documentation ! ))<br>>><br>>> (I tried this yesterday) it's really easy<br>>><br>>><br>>> 1) make a boot file (jboot.erl)<br>>><br>>> {script, {"tiny","1.1"},<br>>><br>
[{preLoaded,[erlang,erl_prim_loader,prim_file,prim_inet,init,otp_ring0]},<br>>> {primLoad, [tiny]},<br>>> {kernel_load_completed},<br>>> {apply, {tiny, start, []}}]}.<br>>><br>>> 2) write a minimal erlang program<br>>> tiny.erl<br>>> start() -> erlang:display'hello world'), erlang:halt().<br>>><br>>> 3) compile the boot file<br>>> systools:script2boot("jboot").<br>>><br>>> 4) run<br>>> erl -boot jboot<br>>><br>>> This runs in 0.29 secs on my <span style="border-bottom: 1px dashed rgb(0, 102, 204); cursor: pointer;" class="yshortcuts" id="lw_1195062686_44">macbook</span><br>>><br>>> (( for comparison erl -s init stop takes 1.6 seconds)<br>>><br>>> 5) you also need the erl script:<br>>><br>>> #!/bin/sh<br>>> ROOTDIR=`pwd`<br>>> BINDIR=$ROOTDIR<br>>> EMU=beam<br>>> PROGNAME=`echo $0 | sed
's/.*\///'`<br>>> export EMU<br>>> export ROOTDIR<br>>> export BINDIR<br>>> export PROGNAME<br>>> exec $BINDIR/erlexec ${1+"$@"}<br>>><br>>> 6) copy erlexec and beam from the distribution to a local directory.<br>>> (these can be stripped to remove symbol table info)<br>>><br>>> 7) the result is<br>>><br>>> $ wc erl erlexec beam jboot.boot tiny.beam<br>>><br>>> 10 20 172 erl<br>>> 58 277 22012 erlexec<br>>> 4247 35423 1097316 beam<br>>> 0 5 203 jboot.boot<br>>> 5 20 708 tiny.beam<br>>> 4320 35745 1120411 total<br>>><br>>> 1.1 MB and 6 files - not *too* bad<br>>><br>>> 8) for fun I packed stdlib/kernel/compiler in an archive using<br>>> boot_tools:mk_lib() which packs everything a single 1.14 meg<br>
archive<br>>> (boot_tools is in $DIST/otp_src_R11B-4/erts/boot/src<br>>><br>>> This means we can pack the compiler and base otp system into half a<br>>> dozen files<br>>> and under 2.5 Meg<br>>><br>>> (( this was my old sae sysytem that never really made it to the main<br>>> release))<br>>><br>>> 4 +++ compile the @spec definitions in comments into code that<br>>> *dynamically* checks types<br>>> who cares if it's slow and can't be checked statically - the<br>>> dynamic check is very useful<br>>> while developing<br>>><br>>> 5 +++ bundle ejabberd (or yaws) in a standard configuration that<br> ships<br>>> with Erlang.<br>>> I talked to Mickael R. about this - if we shipped ejabberd<br>>> with every Erlang<br>>> we could easily get tens of thousands of ejabberd servers<br> up<br>>> and running in<br>>>
the twinkling of an eye.<br>>><br>>> 6 ++++ fix BIFs for regexp, searching binaries etc - so people stop<br>>> winging<br>>><br>>> 7 ++++ fix c(Mod) and erlc so that they throw *everything* at them<br> ie<br>>> dynamic type checking,<br>>> xref, cover, dialyzer *without* you having to do<br> anything<br>>> fancy<br>>> the defaults for compilation should be to throw all<br>>> checks possible into the compile<br>>> cycle<br>>><br>>> 8 ++++ make an *erlang* packing mechanism (put the entire<br> application<br>>> in a .dets file - and NOT<br>>> .tar.gz or zip file - then define a bundle structure (look at the<br> MAC<br>>> for inspiration) add application icons<br>>> and a desktop interface.<br>>><br>>> 9 ++++ interface to flash using flex 2. Solve the GUI problem once<br> and<br>>> for all as
follows<br>>><br>>> repeat after me: client = flash in the browser, server =<br> erlang.<br>>> Intermediate protocol = flash AMF<br>>><br>>><br>>> There are probably more things I could add - feel free to add you<br> pet<br>>> annoyance that can be easily<br>>> fixed and we'll put it into service pack one.<br>>><br>>><br>>><br>>> Cheers<br>>><br>>> /Joe Armstrong<br>>></tt></tt></pre><p>
<hr size=1>Get easy, one-click access to your favorites.
<a href="http://us.rd.yahoo.com/evt=51443/*http://www.yahoo.com/r/hs"> Make Yahoo! your homepage.</a>