Commit Graph

18 Commits (db33973e0aae7ffc2537991e372e3fc5e59608a7)

Author SHA1 Message Date
Justine Tunney db33973e0a Get fork() working on Windows
This is done without using Microsoft's internal APIs. MAP_PRIVATE
mappings are copied to the subprocess via a pipe, since Microsoft
doesn't want us to have proper COW pages. MAP_SHARED mappings are
remapped without needing to do any copying. Global variables need
copying along with the stack and the whole heap of anonymous mem.
This actually improves the reliability of the redbean http server
although one shouldn't expect 10k+ connections on a home computer
that isn't running software built to serve like Linux or FreeBSD.
2020-11-13 03:14:39 -08:00
Justine Tunney aea89fe832 Make minor improvements
- Work towards simplifying ape.S startup process
- Rewrote ar because it took minutes to build cosmopolitan.a
2020-11-09 15:41:11 -08:00
Justine Tunney feed0d2b0e Add minor improvements and cleanup 2020-10-27 03:39:46 -07:00
Justine Tunney c45e46f871 Add fixes performance and static web server 2020-10-05 23:11:49 -07:00
Justine Tunney b6793d42d5 Add The LISP Challenge
This change introduces a 2.5kb program that's comes pretty close so far
to bootstrapping John McCarthy's metacircular evaluator on bare metal.
2020-10-01 01:20:13 -07:00
Justine Tunney 23d333c090 Make more improvements
This change includes many bug fixes, for the NT polyfills, strings,
memory, boot, and math libraries which were discovered by adding more
tools for recreational programming, such as PC emulation. Lemon has also
been vendored because it works so well at parsing languages.
2020-09-28 01:20:34 -07:00
Justine Tunney 7327c345f9 Get address sanitizer mostly working 2020-09-03 05:44:37 -07:00
Justine Tunney 1f1f3cd477 Fix bug in code written a priori 2020-08-31 21:02:14 -07:00
Justine Tunney f213556366 Add binfmt_misc workaround detector to builds
This is a recently introduced Linux Kernel feature that gives people
like Debian package mantainers the power to arbitrarily redefine how
executables are interpreted by the kernel. If your system gets tuned
this way and you're not able to disable it, then you need to restore
default behavior for the APE MZqFpD prefix as follows:

    sudo sh -c "echo ':APE:M::MZqFpD::/bin/sh:' >/proc/sys/fs/binfmt_misc/register"

This prefix will cover all .com executables built with this tooling.
Please don't run the above command unless you're certain you need it.
See #2 for additional context.
2020-08-31 20:09:23 -07:00
Justine Tunney bd29223891 Fix bugs and have emulator emulate itself 2020-08-31 05:17:31 -07:00
Justine Tunney e86cff8ba0 Fix printvideo regression and minor improvements 2020-08-26 09:41:07 -07:00
Justine Tunney f4f4caab0e Add x86_64-linux-gnu emulator
I wanted a tiny scriptable meltdown proof way to run userspace programs
and visualize how program execution impacts memory. It helps to explain
how things like Actually Portable Executable works. It can show you how
the GCC generated code is going about manipulating matrices and more. I
didn't feel fully comfortable with Qemu and Bochs because I'm not smart
enough to understand them. I wanted something like gVisor but with much
stronger levels of assurances. I wanted a single binary that'll run, on
all major operating systems with an embedded GPL barrier ZIP filesystem
that is tiny enough to transpile to JavaScript and run in browsers too.

https://justine.storage.googleapis.com/emulator625.mp4
2020-08-25 04:43:42 -07:00
Justine Tunney 72b654cb6c Add NES emulator
It's now possible to play classic video game roms with teletypewriters.
https://justine.storage.googleapis.com/nesemu.png
2020-07-02 13:46:08 -07:00
Justine Tunney ac00be1a4e Make small fixes and oops ran clang-format on dtoa 2020-06-30 19:55:47 -07:00
Justine Tunney d51409ccd9 Add glob and some finer tuning of documentation 2020-06-21 15:23:35 -07:00
Justine Tunney 799e24a87b Reduce build log verbosity with preprocessor trick 2020-06-18 23:07:58 -07:00
Justine Tunney b4269930f7 Add scouts honor escape hatch for source embedding 2020-06-15 19:01:28 -07:00
Justine Tunney c91b3c5006 Initial import 2020-06-15 07:18:57 -07:00