Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master
Commits on Dec 26, 2011
  1. Add XHTML fix to prototype.js

    Gecko-based browsers, doesn't like using innerHTML with incorrect XML
    fragments like "<link>". Change it to "<link></link>".
    Found in IceApe 2.0.6, but also present in SeaMonkey 2.6.1 and Iceweasel 9.0.1
    Upstream ticket
  2. Show partial pi results more often

    2000 iterations is pretty big, especially if we have limit of about 3-5k
    reductions per context switch. Change it to update partial progress
    every 200 loop iterations. Makes animation smoother and nicer.
  3. Tweak scheduler default settings.

    Improved latency, rendering speed, and compared to my previous local
    settings ends double-pi benchmark about 15% faster.
Commits on Dec 25, 2011
  1. More demo page updates

    Add validator icon.
    Use CSS reset, to reset all styles to managable default values.
    Change "show more" from link, to button, and use styling on it.
    Few minor updates to fonts, etc.
  2. Some more XHTML love

    Define MIME type and UTF-8 encoding properly.
  3. We should use quantum_reductions, not max_reductions in internal loop

    This was one of the reasons Chrome had problems when reandering DOM
    updates, but also was introducing significant scheduling latencies. THis
    was obvious mistake, probably due copy-paste.
  4. Add erlang:now/0 call in manybuttons server

    Just for fun. It already shows us erlang:localtime/0, but we add to this
    erlang:now/0 (which uses different format and is more precise).
  5. On demo page add button which will trigger both calculate pi processes

      add button with id
      make both processes listen on it
    Now one can benchmark context switching more heavly.
    In fact timings I added in previous commit, are done using this new
    button. :)
  6. Use erlang:now/0 and timer:now_diff/2 in genser_calculatepi

    Now, calculatepi calculates pi, but also time it was needed to compute it.
    Simple benchmarking possible. :)
    Chromium is fastets. But Opera is also quite good.
    Chromium 15       - 48.8 s
    xxxterm 1.9       - 49.9 s
    Opera 11.61       - 60.7 s
    Opera 11.52       - 58.5 s
    luakit 2011.07.22 - 61.1, 58.8 (JIT kicks in lately)
    Epiphany 2.3      - 63.2, 50.5 s (ditto)
    Opera 10.60       - 61.7 s
    Midori 0.4.3      - 66.5, 62.2 s (ditto)
    Konqueror 4.6.5   - 75.3 s
    Iceweasel 9.0.1   - 68.4 s
    Iceape 2.0.14     - 74.7 s
    SeaMonkey 2.6.1   - 53.1 s
    Netscape Navigator - 169.5 s
    Galeon 2.0.7  - not tested, due small problems, which will be resolved in few commits
    Kazehakase 0.5.8 (Gecko) - ditto
    Linux 32-bit. (slightly different scheduler setting, than currently
    in master).
  7. Implement erlang:now/0 BIF

    JavaScript doesn't have microsecond accuracy (and often doesn't even
    have claimed 1ms time resolution), but trie our best.
    If erljs is running Chromium with benchmarking API enabled, then it will
    try to use microsecond accurate profiling API.
  8. Change arrow/greater-than sign to entity, in demo page in example

    Somehow missed it previously.
  9. Add pretty printing option for tuples.

    For consisentcy also pretty print tuples: add white space after every
    comma character. It sometimes makes terms harder to read, but in most
    cases it makes terms nicer and easier to read I think. (it is sugestive,
    but I think depends whetever if tuples are inside list, or vice versa).
  10. Use pretty printing in erljs:set/2

    Now terms passed to erljs:set/2, are pretty printed (still on single line,
    but with spaces after comma characters, improving readbility).
  11. Move pretty printing logic to separate function.

    Still using ugly global variable erljs_toString_pretty_printing, but
    more managable and resuable.
Commits on Dec 20, 2011
  1. Fix CSS style files

    I have no idea why I used, background-origin: margin-box, it should be
    background-origin: border-box. I also remove filter property, used by IE,
    because it breaks parsers, for example W3C validator.
    IE-related fixes will go to separate css style file.
  2. Put forms elements into fieldset, so webpage validates again

    Our rework of page broken XHTML validation. It looks that form elements (input,
    text, buttons, etc), needs to be in fieldset in XHTML. Strange.
    Few CSS fixes in new commits.
  3. Move eval calls from erljs:eval/1 to separate function

    eval call is evil, not only because it make more dynamic, and harder to
    debug/read, but also because JavaScript engine/compiler cannot optimize
    given scope (because eval can dynamically add variables to this scope,
    for example). Move eval (which we probably needs, at least now) to
    separate function, so bad effects of using it will be only contained in
    single function.
    Tested perfromance of new code, but I see no difference.
  4. Make Exceptions and Errors red on demo page

    Adds next nice touch to web page
  5. Add ignoring of whitespaces at the begining and end of lists and tuples.

    Few simple tests exposed few minor problems in term parsing. For example
    { }, [ ], [a|b ], was treeted as error.
    Just simply skip over white spaces at the begining of list and tuple, as
    well just at the end of "improper" list. (in quotes, because also proper
    list, like [a|[] ], was not parsed).
    Now, it would be nice to refactor this white space skiping, because now
    white space skiping code is duplicated few times.
  6. Add tests for testing whitespace handling in parsed terms

    In 06ac667 we started ignoring
    whitespaces in tuples and lists, so things like "[ a , b ]", is
    correctly parsed. I reenabled unittests for term parsing in
    8d095fb, but there was actually many
    test cases missing there.
    This commits adds about 20 test cases with whitespaces in tuples and
    Almost all tests passes. It looks that empty list and empty tuple, "[
    ]", "{ }", etc, still needs fixing. Also improper lists, "[ a | b ],
    needs fixing. It is simple, will be fixed in next commit.
  7. Allow whitespaces in argument list in erl/erlgo

    Now, it is possible to have white spaces, before comma character in our
    simple parser. Still some more whitespace ignoring is needed to supports
    things like:   "module : function ()", but it looks that all white space
    problems in argument list is solved.
Commits on Dec 19, 2011
  1. Add tests_arithmetic which tests arithmetic

    Just to make sure, that even simple things are done correct. Like div,
    rem, /, *, -, +. More to go, but first need to check .beam files if they
    actually contain real code, and not just constsnts calcualted by
    They are not yet added or enabled in demo page / unittests.
  2. Add few erl_{scan,parse} tests to testy_parsowanie

    Just very simple things. More will come, after finding problems with dot
    parsing problem in erl_scan.
  3. Add and change many tests to tests_auto

    Mainly lists tests. Remove some test which had very big input or
    outputs. This make it easier to display them in browser. Also add white
    spaces in some long lists, to make line wrapping possible.
  4. Reenable term_decode and run_examples unittests

    This are some old unittests, but becauose of recent changes to term
    parsing and serialization, it is better to enable them again.p
  5. Allow LocalRegs as destination of 'element' bif

    It looks that calling erl_parse:parse_form/1 makes this bif be called
    with register 'y' as destination, which triggers assertion.
    Remove assertion, and perform switch over destination register.
  6. Fix 'div' operator

    Apperently I not tested it well enough (and div 3 case was not
    well choicen). 10 div 3 is 3, and we was calculating it using
    10/3 = 3.333 and then rounding, which gives 3.
    But this fails when doing div 2, for example 9/2 = 4.5, which rounded
    gives 5, not 4!
    One of the possibility is to use Math.floor instead of Math.round,
    but then results are incorrect for negative arguments.
    Just use binary operator magic, to cast result to integer. Not tested
    which solution is faster ( binary or 0, right shift 0, double binary
    negation), so just using what I think should be fast, but leaving
    everything in comments for future investigation.
    This fixes lists:seq(1,20,2), which previously returned [1,3,...,19,21],
    not it correctly returns [1,3,...,19].
  7. Major rework of demo webpage

    It is now much more nicer, have nicer background, nicer fonts, cleaner,
    animations, pretty printing is now used in erlgo. It shows examples
    which are easy to test, can show even more. Easy to run unittests and
    demo servers. It also shows log of all evaluated calls, like Erlang
    shell, and allows cleaning up console.
    Tested in few browser, looks resonably good even on 1024x768. However,
    only webkit based browser supports background-clip: text;, and CSS
    Transitions on opacity when started from JavaScript needs a hack
    (setTimeout, to initiate transition). :/
    I added lots of examples, and some of them are 'nicer' (this are
    displayed by default), but other ones can be easly show clicking 'show
    There are few detected problems already in this examples, and few are
    fixed in few previous commits (like parsing of whitespace before comma
    character in list literal, or missing BIFs in lists module). But few
    more will be fixed in few next commits. (notably lists:seq(1,20,2) bug,
    but also few others).
    Still do not know why dot is not accepted in
    erl_scan:parse("anything."). Maybe some atom quoting issue.
    Adding few webfonts locally. They are licensed on their own licenses,
    hower are freelly accesible on the Web, so it should not be a problem.
  8. Add more modules from stdlib, move to src, handle includes

    Added few more modules from stdlib, now they are almost all. I also
    symlinked all needed includes.
    I added sources to src/ subdirectories (unfortunetly it is also still
    outdir for .beam compilation). This resolved some include problems.
    I added global include path to include dir of stdlib and erts
    application. This is suboptimal (it should be possible, to define flags
    on per module basis, in cl/{1,2}, but there is currently no conflicts.
    Patching of lists.erl module is updated, to use new directories.
    Added all new modules to included scripts and register them in VM.
    Waiting to create real load, which will load them on demand, or in
    single request.
  9. Add example:length_{native,manual}/1 functions

    They behave exactly like length/1, but it is convinient to have them
    because erlang:length is BIF and we currently cannot call BIFs as first
    call on stack. Similar to string:len/1 in fact.
    example:length_native/1 just calls length/1.
    example:length_manual/1 implements length with explicit loop (tail
    recursive), incrementing counter.
Something went wrong with that request. Please try again.