The libraries under the Elm Playground, written from scratch for teaching: one idea per module, each interface with its diagram, its worked example and its references. None of them knows the Playground: a module here speaks pixels, samples, bodies, bytes or rectangles, never shapes.
Each is a library of its own, named tiny_libs.<name> outside this repository, for example in a dune file:
(executable (name main) (libraries tiny_libs.crypto tiny_libs.graphics_png))
The libraries are unwrapped: their modules are used by their own names, Sha256.digest, Png.decode.
tiny_libs.core: a small part of Elm's core, and a calendar.
Basics Color Set_ Sets over ordered types.Keyboard Time Cmd Sub Program Base64 Civil Clock Julian Recur tiny_libs.random: the seeded generator, the same numbers natively and in a browser.
tiny_libs.crypto: SHA-1, and what TLS 1.3 needs.
tiny_libs.compression: what the image, video and audio formats share.
Huffman Inflate Deflate Zlib Gzip Crc32 Adler32 Zstd Fse Xxhash Brotli Brotli_dictionary Lzw Packbits Bits Vlc tiny_libs.compression_brotli_words: Brotli's static dictionary, 120 KB, for the programs that ask for it.
The core (tiny_libs.graphics_core) and 2D geometry (tiny_libs.graphics_2d_geometry):
The 2D rasterizer (tiny_libs.graphics_2d) and the fonts (tiny_libs.graphics_font):
The 3D rasterizer (tiny_libs.graphics_3d) and the geometry all 3D renderers share (tiny_libs.graphics_3d_geometry):
Project Clip Cull Triangle Interpolate Zbuffer Painter Shading Texture Render Vec3 Mat4 Camera Lighting Ray Material The ray tracer (tiny_libs.graphics_raytrace), and the GPU's retained meshes (tiny_libs.graphics_gpu):
Image formats, a library each (tiny_libs.graphics_rgba, tiny_libs.graphics_png, tiny_libs.graphics_gif, tiny_libs.graphics_jpeg, tiny_libs.graphics_xpm, tiny_libs.graphics_ilbm, tiny_libs.graphics_svg), and their loading, native only (tiny_libs.graphics_images):
Image processing (tiny_libs.graphics_imaging):
Lut Histogram Hsl Convolve Gaussian Sobel Median Add_noise Scale Mask Composite Brush Gradient Blend Layers Pixels Video formats, a library each (tiny_libs.graphics_movie, tiny_libs.graphics_yuv, tiny_libs.graphics_y4m, tiny_libs.graphics_fli, tiny_libs.graphics_avi, tiny_libs.graphics_mpeg1, tiny_libs.graphics_mpeg_system):
Animation, Core Animation's ideas (tiny_libs.graphics_animation):
In 2D (tiny_libs.physics_2d):
Body Shape Force Integrate Broadphase Collide Contact Resolve Solver Joint2d Springs Particles Energy Kepler Planets In 3D (tiny_libs.physics_3d):
Quat Mat3 Body3d Force3d Integrate3d Broadphase3d Collide3d Sweep3d Contact3d Resolve3d Solver3d Joint3d Energy3d Hitbox3d The samples (tiny_libs.audio_signal) and the building blocks of a sound (tiny_libs.audio_synthesis):
The engine (tiny_libs.audio):
The formats, a library each (tiny_libs.audio_wav, tiny_libs.audio_midi, tiny_libs.audio_abc, tiny_libs.audio_mod, tiny_libs.audio_mpeg, tiny_libs.audio_vorbis):
Wav Midi Abc Doremi Mod Mod_player Paula Mpeg_audio Mpeg_audio_header Layer2 Layer3 Layer3_tables Imdct Polyphase Vorbis Ogg A synthesizer's live blocks (tiny_libs.audio_instruments) and effects (tiny_libs.audio_effects):
Vco Lfo Drift Voicing Polyphony Moog_ladder Diode_ladder Svf Modal Fm_algorithm Dx_envelope Sampler Sequencer Effect Drive Eq Modulation Modulated_delay Phaser Delay Reverb Dynamics Leslie Rack Moving (tiny_libs.ai_movement), deciding (tiny_libs.ai_decision), bots (tiny_libs.ai_bots), searching (tiny_libs.ai_search), learning (tiny_libs.ai_learning); all five are tiny_libs.ai:
Pathfind Steering Flock Fsm Behavior Utility Sense Bot Minimax Deepening Zobrist Mcts Matrix Neuron Net Backprop Grad Train Qlearn The protocols as bytes in, bytes out (tiny_libs.networking_protocols), mail (tiny_libs.networking_mail), the netcode of multiplayer games (tiny_libs.networking_netcode); all three are tiny_libs.networking:
Url Urlencoded Http Websocket Irc Smtp Pop3 Wire Transport Mail Mime Mbox Mail_thread Checksum Sim_net Inputs Lockstep Rollback Snapshot Prediction Interpolation TLS 1.3 (tiny_libs.networking_tls):
The sockets, native only (tiny_libs.networking_unix):
Tcp Udp Worker Http_client Http_request Http_server Tls_client Tls_tunnel Server Relay Relay_client Universe_server Irc_server Mail_server Connect tiny_libs.gui: widgets, the four architectures, layout, text.
tiny_libs.juice:
tiny_libs.terminal, and running in a real terminal, native only (tiny_libs.terminal_unix):
tiny_libs.highlight_code: what a code view needs to colour a file.