cosmopolitan/tool/plinko
Jōshin 6e6fc38935
Apply clang-format update to repo (#1154)
Commit bc6c183 introduced a bunch of discrepancies between what files
look like in the repo and what clang-format says they should look like.
However, there were already a few discrepancies prior to that. Most of
these discrepancies seemed to be unintentional, but a few of them were
load-bearing (e.g., a #include that violated header ordering needing
something to have been #defined by a 'later' #include.)

I opted to take what I hope is a relatively smooth-brained approach: I
reverted the .clang-format change, ran clang-format on the whole repo,
reapplied the .clang-format change, reran clang-format again, and then
reverted the commit that contained the first run. Thus the full effect
of this PR should only be to apply the changed formatting rules to the
repo, and from skimming the results, this seems to be the case.

My work can be checked by applying the short, manual commits, and then
rerunning the command listed in the autogenerated commits (those whose
messages I have prefixed auto:) and seeing if your results agree.

It might be that the other diffs should be fixed at some point but I'm
leaving that aside for now.

fd '\.c(c|pp)?$' --print0| xargs -0 clang-format -i
2024-04-25 10:38:00 -07:00
..
lib Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
BUILD.mk Stop using .com extension in monorepo 2024-03-03 03:12:19 -08:00
plinko.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
README.txt WIP: Correct all typos (#498) 2022-07-20 14:01:15 -07:00

DESCRIPTION

  plinko is a simple lisp interpreter that takes advantage of advanced
  operating system features irrespective of their practicality such as
  using the nsa instruction popcount for mark sweep garbage collection
  overcommit memory, segment registers, and other dirty hacks that the
  popular interpreters cannot do; this lets plinko gain a considerable
  performance edge while retaining an event greater edge in simplicity

  We hope you find these sources informative, educational, and possibly
  useful too. Lisp source code, written in its dialect is included too
  under //tool/plinko/lib and unit tests which clarify their usage can
  be found in //test/tool/plinko.

BENCHMARK

  binary trees (n=21)

    - sbcl:     200 ms (native jit;  simulated arithmetic)
    - plinko:   400 ms (interpreted; simulated arithmetic)
    - python3:  800 ms (interpreted;    native arithmetic)
    - racket:  1200 ms (interpreted; simulated arithmetic)

AUTHOR

  Justine Alexandra Roberts Tunney <jtunney@gmail.com>

LICENSE

  ISC

SEE ALSO

  SectorLISP
  SectorLambda