From 84462e07e9fa8ce8b9ad1e8bc29006f37427c7b1 Mon Sep 17 00:00:00 2001 From: Murray Calavera Date: Thu, 26 Oct 2023 12:23:27 +0100 Subject: [PATCH] init --- .github/workflows/build.yml | 49 ++ .gitignore | 8 + Lang.gren.in | 196 ++++++++ Main.gren | 502 ++++++++++++++++++++ Makefile | 40 ++ benchmark/helloworld/c/Dockerfile | 9 + benchmark/helloworld/c/hello.c | 7 + benchmark/helloworld/go/Dockerfile | 10 + benchmark/helloworld/go/hello.go | 7 + benchmark/helloworld/haskell/Dockerfile | 10 + benchmark/helloworld/haskell/hello.hs | 1 + benchmark/helloworld/java/Dockerfile | 14 + benchmark/helloworld/java/hello.java | 5 + benchmark/helloworld/lua/Dockerfile | 14 + benchmark/helloworld/lua/hello.lua | 1 + benchmark/helloworld/mercury/Dockerfile | 11 + benchmark/helloworld/mercury/hello.m | 9 + benchmark/helloworld/pony/Dockerfile | 15 + benchmark/helloworld/pony/hello.pony | 3 + benchmark/helloworld/x86-64/Dockerfile | 10 + benchmark/helloworld/x86-64/hello.S | 15 + def.m4 | 68 +++ github-mark-white.svg | 1 + gren.json | 18 + icon/05ab1e.svg | 16 + icon/8th.svg | 1 + icon/abap.svg | 8 + icon/ada.svg | 38 ++ icon/arm64-assembly.svg | 13 + icon/awk.svg | 5 + icon/babashka.svg | 20 + icon/ballerina.svg | 5 + icon/bash.svg | 8 + icon/c.svg | 5 + icon/ceylon.svg | 6 + icon/cfml.svg | 14 + icon/clojure.svg | 17 + icon/clojurescript.svg | 12 + icon/cobol.svg | 3 + icon/coffeescript.svg | 12 + icon/coldfusion.svg | 5 + icon/common-lisp.svg | 15 + icon/coq.svg | 18 + icon/cpp.svg | 5 + icon/crystal.svg | 5 + icon/csharp.svg | 7 + icon/d.svg | 32 ++ icon/dart.svg | 19 + icon/delphi.svg | 18 + icon/ecmascript.svg | 14 + icon/elixir.svg | 49 ++ icon/elm.svg | 11 + icon/emacs-lisp.svg | 26 ++ icon/erlang.svg | 7 + icon/factor.svg | 12 + icon/forth.svg | 7 + icon/fortran.svg | 6 + icon/free-pascal.svg | 12 + icon/fsharp.svg | 7 + icon/gleam.svg | 6 + icon/gnu-apl.svg | 6 + icon/gnucobol.svg | 6 + icon/go.svg | 38 ++ icon/groovy.svg | 111 +++++ icon/haskell.svg | 7 + icon/haxe.svg | 21 + icon/idris.svg | 7 + icon/io.svg | 6 + icon/j.svg | 5 + icon/java.svg | 9 + icon/javascript.svg | 7 + icon/jq.svg | 1 + icon/julia.svg | 7 + icon/kotlin.svg | 30 ++ icon/lfe.svg | 7 + icon/lua.svg | 11 + icon/mercury.svg | 29 ++ icon/mips.svg | 16 + icon/nim.svg | 18 + icon/nix.svg | 26 ++ icon/objective-c.svg | 12 + icon/ocaml.svg | 22 + icon/perl5.svg | 11 + icon/pharo-smalltalk.svg | 581 ++++++++++++++++++++++++ icon/php.svg | 133 ++++++ icon/plsql.svg | 10 + icon/pony.svg | 107 +++++ icon/powershell.svg | 16 + icon/prolog.svg | 113 +++++ icon/purescript.svg | 9 + icon/pyret.svg | 1 + icon/python.svg | 16 + icon/qsharp.svg | 6 + icon/r.svg | 16 + icon/racket.svg | 8 + icon/raku.svg | 45 ++ icon/reasonml.svg | 7 + icon/red.svg | 41 ++ icon/research_experiment_1.svg | 13 + icon/ruby.svg | 122 +++++ icon/rust.svg | 6 + icon/scala.svg | 17 + icon/scheme.svg | 5 + icon/shen.svg | 5 + icon/sml.svg | 7 + icon/solidity.svg | 17 + icon/swift.svg | 6 + icon/systemverilog.svg | 12 + icon/tcl.svg | 35 ++ icon/twelf.svg | 117 +++++ icon/typescript.svg | 7 + icon/unison.svg | 12 + icon/v.svg | 1 + icon/vb-net.svg | 15 + icon/vbnet.svg | 14 + icon/vimscript.svg | 36 ++ icon/vlang.svg | 21 + icon/wasm.svg | 13 + icon/wren.svg | 6 + icon/x86-64.svg | 15 + icon/z3.svg | 5 + icon/zig.svg | 12 + index.html | 26 ++ lang/c | 48 ++ lang/go | 58 +++ lang/haskell | 52 +++ lang/java | 50 ++ lang/lua | 43 ++ lang/mercury | 77 ++++ lang/pony | 57 +++ lang/twelf | 43 ++ lang/x86-64 | 40 ++ tailwind.config.js | 17 + 133 files changed, 4039 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .gitignore create mode 100644 Lang.gren.in create mode 100644 Main.gren create mode 100644 Makefile create mode 100644 benchmark/helloworld/c/Dockerfile create mode 100644 benchmark/helloworld/c/hello.c create mode 100644 benchmark/helloworld/go/Dockerfile create mode 100644 benchmark/helloworld/go/hello.go create mode 100644 benchmark/helloworld/haskell/Dockerfile create mode 100644 benchmark/helloworld/haskell/hello.hs create mode 100644 benchmark/helloworld/java/Dockerfile create mode 100644 benchmark/helloworld/java/hello.java create mode 100644 benchmark/helloworld/lua/Dockerfile create mode 100644 benchmark/helloworld/lua/hello.lua create mode 100644 benchmark/helloworld/mercury/Dockerfile create mode 100644 benchmark/helloworld/mercury/hello.m create mode 100644 benchmark/helloworld/pony/Dockerfile create mode 100644 benchmark/helloworld/pony/hello.pony create mode 100644 benchmark/helloworld/x86-64/Dockerfile create mode 100644 benchmark/helloworld/x86-64/hello.S create mode 100644 def.m4 create mode 100644 github-mark-white.svg create mode 100644 gren.json create mode 100644 icon/05ab1e.svg create mode 100644 icon/8th.svg create mode 100644 icon/abap.svg create mode 100644 icon/ada.svg create mode 100644 icon/arm64-assembly.svg create mode 100644 icon/awk.svg create mode 100644 icon/babashka.svg create mode 100644 icon/ballerina.svg create mode 100644 icon/bash.svg create mode 100644 icon/c.svg create mode 100644 icon/ceylon.svg create mode 100644 icon/cfml.svg create mode 100644 icon/clojure.svg create mode 100644 icon/clojurescript.svg create mode 100644 icon/cobol.svg create mode 100644 icon/coffeescript.svg create mode 100644 icon/coldfusion.svg create mode 100644 icon/common-lisp.svg create mode 100644 icon/coq.svg create mode 100644 icon/cpp.svg create mode 100644 icon/crystal.svg create mode 100644 icon/csharp.svg create mode 100644 icon/d.svg create mode 100644 icon/dart.svg create mode 100644 icon/delphi.svg create mode 100644 icon/ecmascript.svg create mode 100644 icon/elixir.svg create mode 100644 icon/elm.svg create mode 100644 icon/emacs-lisp.svg create mode 100644 icon/erlang.svg create mode 100644 icon/factor.svg create mode 100644 icon/forth.svg create mode 100644 icon/fortran.svg create mode 100644 icon/free-pascal.svg create mode 100644 icon/fsharp.svg create mode 100644 icon/gleam.svg create mode 100644 icon/gnu-apl.svg create mode 100644 icon/gnucobol.svg create mode 100644 icon/go.svg create mode 100644 icon/groovy.svg create mode 100644 icon/haskell.svg create mode 100644 icon/haxe.svg create mode 100644 icon/idris.svg create mode 100644 icon/io.svg create mode 100644 icon/j.svg create mode 100644 icon/java.svg create mode 100644 icon/javascript.svg create mode 100644 icon/jq.svg create mode 100644 icon/julia.svg create mode 100644 icon/kotlin.svg create mode 100644 icon/lfe.svg create mode 100644 icon/lua.svg create mode 100644 icon/mercury.svg create mode 100644 icon/mips.svg create mode 100644 icon/nim.svg create mode 100644 icon/nix.svg create mode 100644 icon/objective-c.svg create mode 100644 icon/ocaml.svg create mode 100644 icon/perl5.svg create mode 100644 icon/pharo-smalltalk.svg create mode 100644 icon/php.svg create mode 100644 icon/plsql.svg create mode 100644 icon/pony.svg create mode 100644 icon/powershell.svg create mode 100644 icon/prolog.svg create mode 100644 icon/purescript.svg create mode 100644 icon/pyret.svg create mode 100644 icon/python.svg create mode 100644 icon/qsharp.svg create mode 100644 icon/r.svg create mode 100644 icon/racket.svg create mode 100644 icon/raku.svg create mode 100644 icon/reasonml.svg create mode 100644 icon/red.svg create mode 100644 icon/research_experiment_1.svg create mode 100644 icon/ruby.svg create mode 100644 icon/rust.svg create mode 100644 icon/scala.svg create mode 100644 icon/scheme.svg create mode 100644 icon/shen.svg create mode 100644 icon/sml.svg create mode 100644 icon/solidity.svg create mode 100644 icon/swift.svg create mode 100644 icon/systemverilog.svg create mode 100644 icon/tcl.svg create mode 100644 icon/twelf.svg create mode 100644 icon/typescript.svg create mode 100644 icon/unison.svg create mode 100644 icon/v.svg create mode 100644 icon/vb-net.svg create mode 100644 icon/vbnet.svg create mode 100644 icon/vimscript.svg create mode 100644 icon/vlang.svg create mode 100644 icon/wasm.svg create mode 100644 icon/wren.svg create mode 100644 icon/x86-64.svg create mode 100644 icon/z3.svg create mode 100644 icon/zig.svg create mode 100644 index.html create mode 100644 lang/c create mode 100644 lang/go create mode 100644 lang/haskell create mode 100644 lang/java create mode 100644 lang/lua create mode 100644 lang/mercury create mode 100644 lang/pony create mode 100644 lang/twelf create mode 100644 lang/x86-64 create mode 100644 tailwind.config.js diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..12e9ff5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,49 @@ +name: CI + +on: + push: + branches: [ "master" ] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - run: | + wget https://github.com/gren-lang/compiler/releases/download/0.3.0/gren_linux + chmod +x gren_linux + mv gren_linux /usr/local/bin/gren + + - run: | + wget https://github.com/tailwindlabs/tailwindcss/releases/download/v3.3.5/tailwindcss-linux-x64 + chmod +x tailwindcss-linux-x64 + mv tailwindcss-linux-x64 /usr/local/bin/tailwindcss + + - run: make benchmark + - run: make + + - uses: actions/upload-pages-artifact@v2 + with: + path: . + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - id: deployment + uses: actions/deploy-pages@v2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..08dc2b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +main.js +style.css +langlist +Lang.gren +Bench.gren +benchmark/*/*/result +*.bench +.gren diff --git a/Lang.gren.in b/Lang.gren.in new file mode 100644 index 0000000..dacf828 --- /dev/null +++ b/Lang.gren.in @@ -0,0 +1,196 @@ +include(def.m4)dnl +module Lang exposing (..) + +type alias Parameter a = + { title : String + , desc : String + , options : Array a + , name : a -> String + , tip : a -> String + } + +type alias Language = + { language : String + , name : String + , homepage : Maybe String + , spec : Specification + , status : Status + + , impl : Implementation + , domain : Array Domain + , platform : Array Platform + + , typing : Typing + , safety : Safety + , mm : MemoryManagement + , everything : Everything + + , paradigms : Array Paradigm + , parallelism : Array Parallelism + , features : Array Feature + , concurrency : Array Concurrency + , runtime : Array Runtime + + , elegance : Elegance + , example : String + } + +def(Specification, spec, + Specification, + Who says?, + Tutorial, Tutorial, Only a tutorial or reference that teaches how to use the language but no proper definition, + Informal, Informal, An informal but complete language definition, + Formal, Formal, A rigorous formal definition of the whole language) + +def(Status, status, + Status, + It's not dead yet(copium), + Mainstream, Mainstream, Widely used, + Active, Active, Active userbase and a maintained implementation but not exactly mainstream, + Unmaintained, Unmaintained, Some users but no well-maintained implementation, + Dead, Dead, Not used for real projects anymore) + +def(Implementation, impl, + Implementation, + Implementation, + Standalone, Standalone, An independent programming language with a dedicated compiler or interpreter, + Embedded, Embedded, A language embedded in another language building on top of it and extending it's capabilities) + +def(Domain, domain, + Domain, + Find languages designed for a specific domain, + GeneralPurpose, General Purpose, Languages designed to address many problems and not focused on a specific domain, + Firmware, Embedded, Languages well suited to writing firmware and embedded software, + UserInterface, User Interface, Languages designed to create user interfaces, + Shell, Shell, Languages designed to be used as a human-computer command interface, + ParallelComputing, Massively Parallel, Languages designed to write programs for massively parallel architectures, + Distributed, Distributed, Languages designed for concurrency and distributed systems, + Extension, Extension, Languages suitable for embedding in larger programs as an extension language, + ProofAssistant, Proof Assistant, Languages designed to express mathematical propositions and proofs, + Query, Query, Languages designed to describe datasets, + DataRepresentation, Structure, Languages designed to represent data structures, + HardwareDescription, HDL, Hardware description languages, + QuantumComputing, Quantum, Languages designed for quantum computing, + Esoteric, Esoteric, Genius and useless) + +def(Platform, platform, + Platform, + Select every platform that needs to be supported, + Linux, Linux, «Linux, BSDs and other Unix family systems», + Windows, Windows, OS by Microsoft, + MacOS, MacOS, OS by Apple, + Web, Web, «User interface platform comprised of HTML, JavaScript and CSS», + Android, Android, Mobile device OS based on Linux by Google, + IOS, IOS, Mobile device OS by Apple) + +def(Typing, typing, + Typing, + «Check'em, but when?», + Dynamic, Dynamic, Types are checked at runtime, + Partial, Partial, Types are sometimes checked at runtime, + Static, Static, Type checking happens before the program is executed) + +def(Safety, safety, + Safety, + «Ignore this, it's not needed, revolt against the health and safety craze», + None, None, Programs can access memory in an unsafe way if the programmer makes mistakes, + MemorySafe, Memory safe, Programs cannot access memory in an unsafe way but can apply operations to inappropriate values, + TypeSafe, Type safe, Programs cannot apply operations to inappropriate values, + Verified, Fully verified, Compiler-checked formal proof of correctness possible within the language) + +def(MemoryManagement, mm, + Memory Mgmt., + I forgot, + NoMM, None, No memory management, + ManualMM, Manual, Manual memory management, + ControlledMM, Controlled, Manual memory management with restrictions designed to prevent memory errors, + AutomaticMM, Automatic, Fully automatic memory management) + +def(Everything, everything, + Everything is, + Everything will be all right, + AFunction, a Function, Everything is a function, + AList, a List, Everything is a list, + AStack, a Stack, The stack is used for everything, + AnObject, an Object, Everything is an object, + AnActor, an Actor, Everything is an actor, + AnArray, an Array, Everything is an array, + AString, a String, Everything is a string, + AMess, a Mess, Everything is different) + +def(Paradigm, paradigm, + Paradigm, + Find languages that support at least one of the selected paradigms, + Imperative, Imperative, Programs consist of sequential state changing statements with explicit control flow constructs, + Functional, Functional, Programs are constructed by application and composition of functions, + Logic, Logic, Programs are expressed as logical facts and rules, + Constraint, Constraint, Constraint programming, + Concatenative, Concatenative, Concatenation is function composition, + DataDriven, Data-driven, Program statements describe the data to be matched and the processing required, + EventDriven, Event-driven, Flow of the program is determined by events, + Reactive, Reactive, Programs are descriptions of how changes propagate, + FlowBased, Flow-based, Programs are composed of nodes that communicate over predefined connections, + OOPClasses, OOP Classes, Programs consist of objects and their properties come from class definitions, + OOPPrototypes, OOP Prototypes, Programs consist of objects and their properties come by inheriting from other objects) + +def(Parallelism, pe, + Parallelism, + Parallel execution paradigm, + TransparentPE, Transparent, Code may be executed in parallel but the semantics of the language are unaffected, + AutomaticPE, Automatic, The programmer can specify the desired parallelism but data sharing between execution threads is handled automatically, + MessagePassingPE, Message Passing, Threads are isolated and communicate only by passing messages through channels, + ControlledSharedStatePE, Safe sharing, Multiple threads can access the same memory but the language semantics ensures that no data races are possible, + ManualSharedStatePE, Shared state, Multiple threads have access to the same memory uninhibited) + +def(Feature, feat, + Features, + Find langauges that support all of the selected features, + Goto, Goto, Statement that transfers control to another location in the program, + Closures, Closures, Lexically scoped functions that when executed can access data in scope at the time of their definition, + Macros, Macros, Constructs that can generate source code inside the language itself for better code reuse, + MutableState, Mutable state, Named mutable state, + NominalTyping, Nominal typing, Type equality depends on the names of the types, + StructuralTyping, Structural typing, Type equality depends on the structure of the types, + TypeInference, Type inference, Types can be inferred automatically without the programmer specifying them, + Exceptions, Exceptions, The ability to transfer control to an error handler from anywhere, + Reflection, Reflection, The ability for a program to modify itself at runtime, + Introspection, Introspection, The ability for a program to examine itself at runtime, + Lazy, Lazy, Deferring evaluation of terms until the result is needed, + Homoiconic, Homoiconic, The program is expressed as a primitive data structure of the language itself, + ArrayProgramming, Array prog., Array programming: Operations that work on scalars also transparently work on vectors and higher-dimensional arrays, + OffSideRule, Off-side rule, Indentation is syntactically significant, + AdHocPoly, Ad hoc poly., Ad hoc polymorphism: Functions can be defined for and applied to arguments of different types, + ParametricPoly, Parametric poly., Parametric polymorphism: functions can be defined over a set of several types, + Dependent, Dependent types, The meaning of types can depend on values) + +def(Concurrency, concurrency, + Concurrency, + Features geared towards concurrency, + HardwareThreads, Hardware Threads, Synchronization primitives for using multi-threaded CPU capabilities directly, + Coroutines, Coroutines, «Functions can suspend execution, yield to a scheduler and resume later», + Actors, Actors, Communicating actors or processes, + STM, STM, Software Transactional Memory, + AsyncAwait, Async/await, Asynchronous I/O syntax feature, + Channels, Channels, Synchronization via message passing, + MessagePassing, Asynchronous messages, Asynchronous message passing) + +def(Runtime, runtime, + Runtime, + Extra functionality included in programs that are not explicitly added by the programmer, + Stack, Managed Stack, The runtime handles stackframes and calling convention, + Interpreter, Interpreter, The runtime interprets the source code or bytecode during execution, + Scheduler, Scheduler, A scheduler that handles some aspects of concurrency, + GarbageCollector, Garbage Collector, A garbage collector that helps with memory management, + ErrorHandling, Error Handling, The runtime checks types and prints diagnostic information in case of a crash, + Abstraction, Interface Helper, The runtime contains abstractions for I/O interfaces, + Unifier, Unifier, Equation solver, + Solver, Solver, An engine in the runtime performs the algorithms to execute declarative code, + Hotswapping, Hotswapping, Parts of the program can be updated while it is running, + VirtualMachine, Virtual Machine, The program is executed inside a virtual machine) + +def(Elegance, elegance, + Elegance, + «Disagree? Too bad, you're wrong», + Impressive, Impressive, The work of a genius, + Acceptable, Acceptable, Works well enough, + Embarrassing, Embarrassing, Design by committee or by fool) diff --git a/Main.gren b/Main.gren new file mode 100644 index 0000000..6911280 --- /dev/null +++ b/Main.gren @@ -0,0 +1,502 @@ +module Main exposing (main) + +import Browser +import Browser.Navigation as Nav +import Html exposing (..) +import Html.Attributes as Attr exposing (..) +import Html.Events exposing (onClick, onInput, onMouseEnter, onMouseLeave) +import Url +import Url.Builder as Q +import Math +import Set exposing (Set) +import Dict exposing (Dict) + +import Lang exposing (Parameter, Language) +import Bench + + +type Trilean + = DoWant + | DontWant + | DontCare + + +-- MAIN + +main : Program {} Model Msg +main = + Browser.application + { init = init + , view = view + , update = update + , subscriptions = subscriptions + , onUrlChange = UrlChanged + , onUrlRequest = LinkClicked + } + + +-- MODEL + +type alias Query = + { spec : Array Lang.Specification + , status : Array Lang.Status + , impl : Maybe Lang.Implementation + , domain: Maybe Lang.Domain + , platform : Array Lang.Platform + , typing : Array Lang.Typing + , safety : Array Lang.Safety + , mm : Array Lang.MemoryManagement + , everything : Array Lang.Everything + , paradigms : Array Lang.Paradigm + , pe : Array Lang.Parallelism + , features : Dict String Trilean + , concurrency : Dict String Trilean + , runtime : Dict String Trilean + , elegance : Array Lang.Elegance + , helloworld : Int + } + +emptyQuery = + { spec = [] + , status = [] + , impl = Nothing + , domain = Nothing + , platform = [] + , typing = [] + , safety = [] + , mm = [] + , everything = [] + , paradigms = [] + , pe = [] + , features = Dict.empty + , concurrency = Dict.empty + , runtime = Dict.empty + , elegance = [] + , helloworld = 1000 + } + +encodeQuery : Query -> Array Q.QueryParameter +encodeQuery q = + [ Q.int "hi" 2 ] + +type alias Model = + { key : Nav.Key + , url : Url.Url + , tip : String + , query : Query + , language : Maybe Language + } + +init : {} -> Url.Url -> Nav.Key -> { model : Model, command : Cmd Msg } +init flags url key = + { model = + { key = key + , url = url + , tip = "every programming language" + , query = emptyQuery + , language = Nothing + } + , command = Cmd.none + } + +defaultTooltip = "( ͡❛ ͜ʖ ͡❛)" + + +-- UPDATE + +type Msg + = LinkClicked Browser.UrlRequest + | UrlChanged Url.Url + | Tooltip String + | ShowLanguage Language + | ToggleSpec Lang.Specification + | ToggleStatus Lang.Status + | ToggleImpl Lang.Implementation + | SelectDomain Lang.Domain + | TogglePlatform Lang.Platform + | ToggleTyping Lang.Typing + | ToggleSafety Lang.Safety + | ToggleMem Lang.MemoryManagement + | ToggleEverything Lang.Everything + | ToggleParadigm Lang.Paradigm + | TogglePE Lang.Parallelism + | ToggleFeature Lang.Feature + | ToggleConcurrency Lang.Concurrency + | ToggleRuntime Lang.Runtime + | ToggleElegance Lang.Elegance + | DragHelloWorld Int + +select : a -> Maybe a -> Maybe a +select o mo = if mo == Just o then Nothing else Just o + +toggle : a -> Array a -> Array a +toggle x xs = + case Array.member x xs of + True -> Array.filter (\y -> y /= x) xs + False -> Array.pushLast x xs + +toggle3 : String -> Dict String Trilean -> Dict String Trilean +toggle3 opt m = + Dict.insert opt (case Maybe.withDefault DontCare (Dict.get opt m) of + DoWant -> DontWant + DontWant -> DontCare + DontCare -> DoWant) m + +query : Model -> (Query -> Query) -> { model : Model, command : Cmd Msg } +query m f = + { model = { m | query = f m.query } + , command = Cmd.none + } + +update : Msg -> Model -> { model : Model, command : Cmd Msg } +update msg model = + case msg of + LinkClicked urlRequest -> + case urlRequest of + Browser.Internal url -> + { model = model, command = Nav.pushUrl model.key (Url.toString url) } + + Browser.External href -> + { model = model, command = Nav.load href } + + UrlChanged url -> + { model = { model | url = url } + , command = Cmd.none + } + Tooltip tip -> + { model = { model | tip = tip } + , command = Cmd.none + } + ShowLanguage l -> + { model = { model | language = Just l } + , command = Cmd.none + } + ToggleSpec o -> query model (\q -> { q | spec = toggle o q.spec }) + ToggleStatus o -> query model (\q -> { q | status = toggle o q.status }) + ToggleImpl o -> query model (\q -> { q | impl = select o q.impl }) + SelectDomain o -> query model (\q -> { q | domain = select o q.domain }) + TogglePlatform o -> query model (\q -> { q | platform = toggle o q.platform }) + ToggleTyping o -> query model (\q -> { q | typing = toggle o q.typing }) + ToggleSafety o -> query model (\q -> { q | safety = toggle o q.safety }) + ToggleMem o -> query model (\q -> { q | mm = toggle o q.mm }) + ToggleEverything o -> query model (\q -> { q | everything = toggle o q.everything }) + ToggleParadigm o -> query model (\q -> { q | paradigms = toggle o q.paradigms }) + TogglePE o -> query model (\q -> { q | pe = toggle o q.pe }) + ToggleFeature o -> query model (\q -> { q | features = toggle3 (Lang.featName o) q.features }) + ToggleConcurrency o -> query model (\q -> { q | concurrency = toggle3 (Lang.concurrencyName o) q.concurrency }) + ToggleRuntime o -> query model (\q -> { q | runtime = toggle3 (Lang.runtimeName o) q.runtime }) + ToggleElegance o -> query model (\q -> { q | elegance = toggle o q.elegance }) + DragHelloWorld i -> query model (\q -> { q | helloworld = i }) + + +-- SUBSCRIPTIONS + +subscriptions : Model -> Sub Msg +subscriptions _ = + Sub.none + + +-- VIEW + +view : Model -> Browser.Document Msg +view m = + { title = "Every Language" + , body = + [ div + [ class "flex flex-col min-h-screen" + ] + [ header [] + [ h1 [ class "p-12 md:p-20 text-center" ] + [ a [ href "/", class "text-3xl font-mono text-yellow-100/75" ] + [ text "every programming language" ] + ] + ] + , div + [ class "flex overflow-x-scroll py-3 gap-3 md:py-5" + , class "bg-gradient-to-r from-blue-300/90 to-yellow-200/90 shadow-inset-y" + ] + [ div [ class "grow pl-1" ] [ ] + , selectMaybe m.query.domain Lang.domain SelectDomain + , selectArray m.query.typing Lang.typing ToggleTyping + , selectArray m.query.safety Lang.safety ToggleSafety + , selectArray m.query.mm Lang.mm ToggleMem + , selectArray m.query.paradigms Lang.paradigm ToggleParadigm + , selectDict m.query.features Lang.feat ToggleFeature + , selectDict m.query.runtime Lang.runtime ToggleRuntime + , range m.query.helloworld "Hello World" "Size of a statically linked hello world executable" 0 1000 DragHelloWorld + , selectMaybe m.query.impl Lang.impl ToggleImpl + , selectArray m.query.pe Lang.pe TogglePE + , selectDict m.query.concurrency Lang.concurrency ToggleConcurrency + , selectArray m.query.status Lang.status ToggleStatus + , selectArray m.query.platform Lang.platform TogglePlatform + , selectArray m.query.spec Lang.spec ToggleSpec + , selectArray m.query.elegance Lang.elegance ToggleElegance + , selectArray m.query.everything Lang.everything ToggleEverything + , div [ class "grow pr-1" ] [ ] + ] + , div [ class "flex justify-center" ] + [ div + [ class "bg-zinc-950 w-3/4 rounded-b-full text-center" + ] + [ span [ class "text-yellow-100/75 font-mono" ] [ text m.tip ] + ] + ] + , div + [ class "grow my-16 mx-12 md:mx-24 xl:mx-32 2xl:mx-48" + , class "flex flex-col lg:flex-row justify-center gap-10" + ] + [ div [ class "basis-1/2 flex flex-col" ] + [ div + [ class "flex flex-wrap justify-center" + , class "rounded-xl p-4 sm:p-8 md:p-14 min-w-fit min-h-[248px]" + , class "bg-gradient-to-r from-blue-300/90 to-yellow-200/90 shadow-inset" + , onMouseLeave (Tooltip defaultTooltip) + ] + (Array.map (\l -> viewLogo (filter m.query l) l) Lang.langs) + ] + , div + [ class "basis-1/2 flex justify-center gap-10" + , class "rounded-xl p-4" + , class "bg-gradient-to-r from-yellow-200/90 to-blue-300/90 shadow-inset" + ] + (case m.language of + Just l -> [ viewInfo l ] + Nothing -> [ ]) + ] + , footer [ class "bg-zinc-950 p-4 shadow-inset-t" ] + [ div [ class "grid grid-cols-3" ] + [ div [] [] + , a [ href "https://github.com/ii8/every-language", class "m-auto w-12" ] + [ img [ src "github-mark-white.svg" ] [ text "Github" ] ] + , div [ class "m-auto text-neutral-700/50" ] + [ text "Some language icons from " + , a [ href "https://exercism.org/" ] [ text "Exercism" ] + , text " under " + , a [ href "https://creativecommons.org/licenses/by/3.0/" ] [ text "CC BY 3.0" ] + ] + ] + ] + ] + ] + } + + +-- VIEW Query + +trileanStyle : Trilean -> Attribute msg +trileanStyle t = class <| case t of + DoWant -> "bg-blue-600 hover:bg-blue-500" + DontWant -> "bg-red-600 hover:bg-red-500" + DontCare -> "bg-slate-600/50 hover:bg-slate-600" + +booleanStyle : Bool -> Attribute msg +booleanStyle b = case b of + True -> trileanStyle DoWant + False -> trileanStyle DontCare + +optionMaybeStyle : Maybe a -> a -> Attribute msg +optionMaybeStyle m opt = booleanStyle (m == Just opt) + +optionArrayStyle : Array a -> a -> Attribute msg +optionArrayStyle m opt = booleanStyle (Array.member opt m) + +optionDictStyle : Dict String Trilean -> String -> Attribute msg +optionDictStyle m opt = trileanStyle (Maybe.withDefault DontCare (Dict.get opt m)) + +option : Attribute Msg -> (a -> String) -> (a -> String) -> (a -> Msg) -> a -> Html Msg +option style name tip msg opt = + button + [ onClick (msg opt) + , onMouseEnter (Tooltip (tip opt)) + , style + , class "py-1 px-3 hover:shadow-button" + ] + [ text (name opt) ] + +optionMaybe : Maybe a -> (a -> String) -> (a -> String) -> (a -> Msg) -> a -> Html Msg +optionMaybe m name tip msg opt = option (optionMaybeStyle m opt) name tip msg opt + +optionArray : Array a -> (a -> String) -> (a -> String) -> (a -> Msg) -> a -> Html Msg +optionArray m name tip msg opt = option (optionArrayStyle m opt) name tip msg opt + +optionDict : Dict String Trilean -> (a -> String) -> (a -> String) -> (a -> Msg) -> a -> Html Msg +optionDict m name tip msg opt = option (optionDictStyle m (name opt)) name tip msg opt + +paramStyle : String -> Array (Attribute Msg) +paramStyle tip = + [ class "flex-none py-3 px-4 shadow-inset3 gap-2 bg-slate-900 rounded-lg" + , class "flex flex-col w-48 h-80 overflow-y-scroll" + , onMouseEnter (Tooltip tip) + , onMouseLeave (Tooltip defaultTooltip) + ] + +paramTitle : String -> String -> Html Msg +paramTitle t tip = + span + [ class "text-slate-200 text-center font-mono" + , onMouseEnter (Tooltip tip) + ] + [ text t ] + +param : String -> String -> Array (Html Msg) -> Html Msg +param t tip a = div (paramStyle tip) (Array.pushFirst (paramTitle t tip) a) + +selectMaybe : Maybe a -> Parameter a -> (a -> Msg) -> Html Msg +selectMaybe m p msg = + param p.title p.desc (Array.map (optionMaybe m p.name p.tip msg) p.options) + +selectArray : Array a -> Parameter a -> (a -> Msg) -> Html Msg +selectArray m p msg = + param p.title p.desc (Array.map (optionArray m p.name p.tip msg) p.options) + +selectDict : Dict String Trilean -> Parameter a -> (a -> Msg) -> Html Msg +selectDict m p msg = + param p.title p.desc (Array.map (optionDict m p.name p.tip msg) p.options) + +rangeToBytes : Int -> Int +rangeToBytes i = + let f = toFloat i in + Math.round (1024 * (2^(f * (17/1000)))) + +ppBytes : Int -> String +ppBytes b = + let m = 1024 * 1024 in + if b > 2 * m then + String.fromInt (b // m) ++ "M" + else if b > m then + String.fromInt (b // m) ++ "." ++ String.left 1 (String.fromInt (b - m)) ++ "M" + else + String.fromInt (b // 1024) ++ "K" + +range : Int -> String -> String -> Int -> Int -> (Int -> Msg) -> Html Msg +range m title desc min max msg = + param + title desc + [ div [ class "flex my-auto px-3" ] + [ input + [ type_ "range" + , class "basis-2/3 hover:cursor-grab active:cursor-grabbing" + , class "w-8" + , attribute "orient" "vertical" + , Attr.min (String.fromInt min) + , Attr.max (String.fromInt max) + , onInput (\v -> msg <| Maybe.withDefault 0 <| String.toInt v) + , value (String.fromInt m) + ] + [] + , div [ class "basis-1/3 relative flex flex-col" ] + [ span + [ class "absolute -left-6 text-slate-200" + , style "bottom" (String.fromFloat (toFloat m / 11.2) ++ "%") + ] + [ text (ppBytes (rangeToBytes m)) ] + ] + ] + ] + + +-- VIEW Logos + +viewLogo : Bool -> Language -> Html Msg +viewLogo show l = + div [ class "flex-shrink-0 flex flex-col justify-center" + , class "transition-[margin] duration-300" + , class (if show then "m-2 md:m-5" else "m-0") + ] + [ img + [ src ("icon/" ++ l.language ++ ".svg") + , alt l.name + , onClick (ShowLanguage l) + , onMouseEnter (Tooltip l.name) + , class "mix-blend-multiply drop-shadow-lg hover:brightness-125" + , class "cursor-pointer" + , class "transition-[width] duration-300" + , class (if show then "w-16 md:w-24" else "w-0") + ] [] + ] + +-- At least one of the DoWant items in the query must be present in the language +-- +filterAny : Array a -> a -> Bool +filterAny q l = + case Array.isEmpty q of + True -> True + False -> Array.member l q + +filterAnyN : Array a -> Array a -> Bool +filterAnyN q l = + Array.isEmpty q || not (Array.isEmpty (Array.filter (\i -> Array.member i q) l)) + +-- All the DoWant items in the query must be present in the language +-- and all the DontWant items must not be present +-- +filterAll : Dict String Trilean -> Array a -> (a -> String) -> Bool +filterAll q l f = + let ls = Array.map f l in + Array.all (\x -> x == True) (Dict.values (Dict.map (\k v -> case v of + DoWant -> Array.member k ls + DontWant -> not (Array.member k ls) + DontCare -> True) q)) + +filterAllN : Array a -> Array a -> Bool +filterAllN q l = Array.all (\plat -> Array.member plat l) q + +filter : Query -> Language -> Bool +filter q l + = filterAny q.spec l.spec + && filterAny q.status l.status + && (q.impl == Nothing || q.impl == Just l.impl) + && filterDomain q l + && filterAllN q.platform l.platform + && filterAny q.typing l.typing + && filterSafety q l + && filterAny q.mm l.mm + && filterAny q.everything l.everything + && filterAnyN q.paradigms l.paradigms + && filterAnyN q.pe l.parallelism + && filterAll q.features l.features Lang.featName + && filterAll q.concurrency l.concurrency Lang.concurrencyName + && filterAll q.runtime l.runtime Lang.runtimeName + && filterAny q.elegance l.elegance + && filterHelloWorld q l + +filterDomain : Query -> Language -> Bool +filterDomain q l = case q.domain of + Just d -> Array.member d l.domain + Nothing -> True + +safetyRank : Lang.Safety -> Int +safetyRank x = case x of + Lang.None -> 0 + Lang.MemorySafe -> 1 + Lang.TypeSafe -> 2 + Lang.Verified -> 3 + +filterSafety : Query -> Language -> Bool +filterSafety q l = case q.safety of + [] -> True + [ Lang.None ] -> l.safety == Lang.None + _ -> safetyRank l.safety >= Maybe.withDefault 0 (Array.minimum (Array.map safetyRank q.safety)) + +filterHelloWorld : Query -> Language -> Bool +filterHelloWorld q l = rangeToBytes q.helloworld >= Bench.helloworld l.language + + +-- VIEW Language info + +viewInfo : Language -> Html msg +viewInfo l = + div + [ class "flex flex-col w-full" + ] + [ h2 [ class "text-4xl p-8 md:p-12 font-mono text-center text-gray-900 font-bold" ] + (case l.homepage of + Nothing -> [ text l.name ] + Just link -> [ a [ href link ] [ text l.name ] ]) + , pre + [ class "bg-gray-900 p-4 m-8 text-slate-200" + , class "shadow-inset rounded-lg overflow-hidden" + ] + [ code [] [ text l.example ] ] + ] + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4f28dcb --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ + +all: main.js style.css + +main.js: Main.gren Lang.gren Bench.gren + gren make Main.gren --output main.js + +style.css: Main.gren tailwind.config.js + tailwindcss -o style.css + +Lang.gren: Lang.gren.in def.m4 Makefile lang/* + sed -s '1s/^/ , { /;1!s/^ / /;1!s/^\([^ ]\)/ , \1/;$$s/$$/\n }/' lang/* > langlist + sed -i '1s/^ , / [ /;$$s/$$/\n ]/' langlist + m4 Lang.gren.in > Lang.gren + echo 'langs =' >> Lang.gren + cat langlist >> Lang.gren + +Bench.gren: Makefile + touch helloworld.bench + echo 'module Bench exposing(..)' > Bench.gren + echo >> Bench.gren + echo 'helloworld : String -> Int' >> Bench.gren + echo 'helloworld s = case s of' >> Bench.gren + sed 's/^/ /' helloworld.bench >> Bench.gren + echo ' _ -> 0' >> Bench.gren + echo >> Bench.gren + +clean: + rm -f main.js style.css Lang.gren langlist Bench.gren helloworld.bench + +benchmark: helloworld.bench + $(MAKE) -B Bench.gren + +helloworld.bench: $(addsuffix /result,$(wildcard benchmark/helloworld/*)) + cat $^ > helloworld.bench + +benchmark/helloworld/%/result: + docker build -t helloworld $(dir $@) + docker run --rm helloworld cat result > $(dir $@)result + +.PHONY: all clean benchmark diff --git a/benchmark/helloworld/c/Dockerfile b/benchmark/helloworld/c/Dockerfile new file mode 100644 index 0000000..996bbd7 --- /dev/null +++ b/benchmark/helloworld/c/Dockerfile @@ -0,0 +1,9 @@ +FROM alpine:latest + +RUN apk --no-cache add gcc musl-dev + +COPY hello.c hello.c +RUN gcc -O2 -static hello.c +RUN strip a.out +RUN ./a.out +RUN stat -c '"c" -> %s' a.out > result diff --git a/benchmark/helloworld/c/hello.c b/benchmark/helloworld/c/hello.c new file mode 100644 index 0000000..3f859bd --- /dev/null +++ b/benchmark/helloworld/c/hello.c @@ -0,0 +1,7 @@ +#include + +int main(void) +{ + printf("Hello, World!\n"); + return 0; +} diff --git a/benchmark/helloworld/go/Dockerfile b/benchmark/helloworld/go/Dockerfile new file mode 100644 index 0000000..22fd32f --- /dev/null +++ b/benchmark/helloworld/go/Dockerfile @@ -0,0 +1,10 @@ +FROM alpine:latest + +RUN apk --no-cache add gcc musl-dev +RUN apk --no-cache add go + +COPY hello.go hello.go +RUN go build hello.go +RUN strip hello +RUN ./hello +RUN stat -c '"go" -> %s' hello > result diff --git a/benchmark/helloworld/go/hello.go b/benchmark/helloworld/go/hello.go new file mode 100644 index 0000000..b7d2a32 --- /dev/null +++ b/benchmark/helloworld/go/hello.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("Hello, World!") +} diff --git a/benchmark/helloworld/haskell/Dockerfile b/benchmark/helloworld/haskell/Dockerfile new file mode 100644 index 0000000..15bd83a --- /dev/null +++ b/benchmark/helloworld/haskell/Dockerfile @@ -0,0 +1,10 @@ +FROM alpine:latest + +RUN apk --no-cache add gcc musl-dev +RUN apk --no-cache add ghc + +COPY hello.hs hello.hs +RUN ghc -O2 -optl-static hello.hs +RUN strip hello +RUN ./hello +RUN stat -c '"haskell" -> %s' hello > result diff --git a/benchmark/helloworld/haskell/hello.hs b/benchmark/helloworld/haskell/hello.hs new file mode 100644 index 0000000..dda02de --- /dev/null +++ b/benchmark/helloworld/haskell/hello.hs @@ -0,0 +1 @@ +main = putStrLn "Hello, World!" diff --git a/benchmark/helloworld/java/Dockerfile b/benchmark/helloworld/java/Dockerfile new file mode 100644 index 0000000..ed51e34 --- /dev/null +++ b/benchmark/helloworld/java/Dockerfile @@ -0,0 +1,14 @@ +FROM alpine:latest + +RUN apk --no-cache add gcc musl-dev +RUN apk --no-cache add openjdk17 + +COPY hello.java hello.java +RUN javac hello.java +RUN jar cfe hello.jar HelloWorld HelloWorld.class +RUN jlink --output runtime --add-modules java.base +RUN cp /lib/ld-musl-x86_64.so.1 runtime/lib/ +RUN cp /lib/libz.so.1 runtime/lib/ +RUN mv hello.jar runtime +RUN tar -cf hello runtime +RUN stat -c '"java" -> %s' hello > result diff --git a/benchmark/helloworld/java/hello.java b/benchmark/helloworld/java/hello.java new file mode 100644 index 0000000..e1a0fdb --- /dev/null +++ b/benchmark/helloworld/java/hello.java @@ -0,0 +1,5 @@ +class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello, World!"); + } +} diff --git a/benchmark/helloworld/lua/Dockerfile b/benchmark/helloworld/lua/Dockerfile new file mode 100644 index 0000000..36906d3 --- /dev/null +++ b/benchmark/helloworld/lua/Dockerfile @@ -0,0 +1,14 @@ +FROM alpine:latest + +RUN apk --no-cache add gcc musl-dev +RUN apk --no-cache add lua-dev +RUN wget https://github.com/ers35/luastatic/archive/refs/tags/0.0.12.tar.gz \ + && tar -xf 0.0.12.tar.gz \ + && mv luastatic-0.0.12/luastatic.lua . + +COPY hello.lua hello.lua + +RUN ./luastatic.lua hello.lua /usr/lib/liblua.a -O2 -static +RUN strip hello +RUN ./hello +RUN stat -c '"lua" -> %s' hello > result diff --git a/benchmark/helloworld/lua/hello.lua b/benchmark/helloworld/lua/hello.lua new file mode 100644 index 0000000..5021c79 --- /dev/null +++ b/benchmark/helloworld/lua/hello.lua @@ -0,0 +1 @@ +print "Hello, World!" diff --git a/benchmark/helloworld/mercury/Dockerfile b/benchmark/helloworld/mercury/Dockerfile new file mode 100644 index 0000000..1c44513 --- /dev/null +++ b/benchmark/helloworld/mercury/Dockerfile @@ -0,0 +1,11 @@ +FROM alpine:latest + +RUN apk --no-cache add gcc musl-dev +RUN apk --no-cache add mercury + +COPY hello.m hello.m +RUN mmc -O6 hello.m +RUN ./hello +RUN echo '/hello' > files +RUN ldd hello | awk 'NF == 4 {print $3}; NF == 2 {print $1}' | sort | uniq >> files +RUN ls -l $(cat files) | awk '{ total += $5 }; END { printf("\"mercury\" -> %s\n", total) }' > result diff --git a/benchmark/helloworld/mercury/hello.m b/benchmark/helloworld/mercury/hello.m new file mode 100644 index 0000000..df9911f --- /dev/null +++ b/benchmark/helloworld/mercury/hello.m @@ -0,0 +1,9 @@ +:- module hello. +:- interface. +:- import_module io. +:- pred main(io::di, io::uo) is det. + +:- implementation. + +main(!IO) :- + io.write_string("Hello, World!\n", !IO). diff --git a/benchmark/helloworld/pony/Dockerfile b/benchmark/helloworld/pony/Dockerfile new file mode 100644 index 0000000..4d78833 --- /dev/null +++ b/benchmark/helloworld/pony/Dockerfile @@ -0,0 +1,15 @@ +FROM alpine:3.18 +#FROM alpine:latest + +RUN apk --no-cache add clang musl-dev +RUN apk --no-cache add curl binutils-gold git + +ENV PATH "/root/.local/share/ponyup/bin:$PATH" +RUN sh -c "$(curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/ponylang/ponyup/latest-release/ponyup-init.sh)" \ + && ponyup update ponyc release + +COPY hello.pony hello.pony +RUN ponyc --static +RUN strip 1 +RUN ./1 +RUN stat -c '"pony" -> %s' 1 > result diff --git a/benchmark/helloworld/pony/hello.pony b/benchmark/helloworld/pony/hello.pony new file mode 100644 index 0000000..a9693c3 --- /dev/null +++ b/benchmark/helloworld/pony/hello.pony @@ -0,0 +1,3 @@ +actor Main + new create(env: Env) => + env.out.print("Hello, World!") diff --git a/benchmark/helloworld/x86-64/Dockerfile b/benchmark/helloworld/x86-64/Dockerfile new file mode 100644 index 0000000..94d8fa1 --- /dev/null +++ b/benchmark/helloworld/x86-64/Dockerfile @@ -0,0 +1,10 @@ +FROM alpine:latest + +RUN apk --no-cache add gcc + +COPY hello.S hello.S +RUN as -c hello.S -o hello.o +RUN ld hello.o +RUN strip a.out +RUN ./a.out +RUN stat -c '"x86-64" -> %s' a.out > result diff --git a/benchmark/helloworld/x86-64/hello.S b/benchmark/helloworld/x86-64/hello.S new file mode 100644 index 0000000..fd7da80 --- /dev/null +++ b/benchmark/helloworld/x86-64/hello.S @@ -0,0 +1,15 @@ +.globl _start +.data +msg: + .ascii "Hello, World!\n" + len = . - msg +.text +_start: + mov $1, %rax + mov $1, %rdi + mov $msg, %rsi + mov $len, %rdx + syscall + mov $60, %rax + xor %rdi, %rdi + syscall diff --git a/def.m4 b/def.m4 new file mode 100644 index 0000000..7f14497 --- /dev/null +++ b/def.m4 @@ -0,0 +1,68 @@ +divert(-1) +changequote(«, ») + +define(«_nl», « +») + +define(«comma», «,») + +define(«_shift2», «shift(shift($@))») +define(«_shift3», «shift(shift(shift($@)))») +define(«_shift4», «shift(shift(shift(shift($@))))») + +define(«_deftype2», «ifelse($#, 0, , + $#, 1, , + $#, 2, , + $#, 3, « | $1», + « | $1«»_nl«»_deftype2(_shift3($@))»)») + +define(«_deftype1», « = $1»_nl«_deftype2(_shift3($@))») + +define(«_deflist2», «ifelse($#, 0, , + $#, 1, , + $#, 2, , + $#, 3, « , $1»_nl« ]», + « , $1«»_nl«»_deflist2(_shift3($@))»)») + +define(«_deflist1», « [ $1»_nl«_deflist2(_shift3($@))») + +define(«_defname1», «ifelse($#, 0, , + $#, 1, , + $#, 2, , + $#, 3, « $1 -> "$2"», + « $1 -> "$2"«»_nl«»_defname1(_shift3($@))»)») + +define(«_deftip1», «ifelse($#, 0, , + $#, 1, , + $#, 2, , + $#, 3, « $1 -> "$3."», + « $1 -> "$3."«»_nl«»_deftip1(_shift3($@))»)») + +define(«def», +«type $1 +_deftype1(_shift4($@)) + +$2Options : Array $1 +$2Options = +_deflist1(_shift4($@)) + +$2Name : $1 -> String +$2Name x = case x of +_defname1(_shift4($@)) + +$2Tip : $1 -> String +$2Tip x = case x of +_deftip1(_shift4($@)) + +$2 : Parameter $1 +$2 = + { title = "$3" + , desc = "$4." + , options = $2Options + , name = $2Name + , tip = $2Tip + }») + +undefine(«sysval») +divert(0)dnl +undefine(«divert»)dnl diff --git a/github-mark-white.svg b/github-mark-white.svg new file mode 100644 index 0000000..d5e6491 --- /dev/null +++ b/github-mark-white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/gren.json b/gren.json new file mode 100644 index 0000000..20072e3 --- /dev/null +++ b/gren.json @@ -0,0 +1,18 @@ +{ + "type": "application", + "platform": "browser", + "source-directories": [ + "." + ], + "gren-version": "0.3.0", + "dependencies": { + "direct": { + "gren-lang/browser": "3.0.0", + "gren-lang/core": "4.0.1", + "gren-lang/url": "3.0.0", + "gren-lang/parser": "3.0.1" + }, + "indirect": { + } + } +} diff --git a/icon/05ab1e.svg b/icon/05ab1e.svg new file mode 100644 index 0000000..fa32434 --- /dev/null +++ b/icon/05ab1e.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/icon/8th.svg b/icon/8th.svg new file mode 100644 index 0000000..50df7b4 --- /dev/null +++ b/icon/8th.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icon/abap.svg b/icon/abap.svg new file mode 100644 index 0000000..77c1858 --- /dev/null +++ b/icon/abap.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/icon/ada.svg b/icon/ada.svg new file mode 100644 index 0000000..0f4ee79 --- /dev/null +++ b/icon/ada.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/arm64-assembly.svg b/icon/arm64-assembly.svg new file mode 100644 index 0000000..50a0d94 --- /dev/null +++ b/icon/arm64-assembly.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/icon/awk.svg b/icon/awk.svg new file mode 100644 index 0000000..032fcda --- /dev/null +++ b/icon/awk.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icon/babashka.svg b/icon/babashka.svg new file mode 100644 index 0000000..ccbdea7 --- /dev/null +++ b/icon/babashka.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/icon/ballerina.svg b/icon/ballerina.svg new file mode 100644 index 0000000..ac08c7f --- /dev/null +++ b/icon/ballerina.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icon/bash.svg b/icon/bash.svg new file mode 100644 index 0000000..bca148b --- /dev/null +++ b/icon/bash.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/icon/c.svg b/icon/c.svg new file mode 100644 index 0000000..27dbd9a --- /dev/null +++ b/icon/c.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icon/ceylon.svg b/icon/ceylon.svg new file mode 100644 index 0000000..a57fcc9 --- /dev/null +++ b/icon/ceylon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/icon/cfml.svg b/icon/cfml.svg new file mode 100644 index 0000000..d342c49 --- /dev/null +++ b/icon/cfml.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/icon/clojure.svg b/icon/clojure.svg new file mode 100644 index 0000000..4f62a9f --- /dev/null +++ b/icon/clojure.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/icon/clojurescript.svg b/icon/clojurescript.svg new file mode 100644 index 0000000..acd7d24 --- /dev/null +++ b/icon/clojurescript.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/icon/cobol.svg b/icon/cobol.svg new file mode 100644 index 0000000..0efff86 --- /dev/null +++ b/icon/cobol.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/icon/coffeescript.svg b/icon/coffeescript.svg new file mode 100644 index 0000000..0fc8f30 --- /dev/null +++ b/icon/coffeescript.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/icon/coldfusion.svg b/icon/coldfusion.svg new file mode 100644 index 0000000..634c392 --- /dev/null +++ b/icon/coldfusion.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icon/common-lisp.svg b/icon/common-lisp.svg new file mode 100644 index 0000000..75d1a15 --- /dev/null +++ b/icon/common-lisp.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/icon/coq.svg b/icon/coq.svg new file mode 100644 index 0000000..c47548a --- /dev/null +++ b/icon/coq.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/icon/cpp.svg b/icon/cpp.svg new file mode 100644 index 0000000..c3b961f --- /dev/null +++ b/icon/cpp.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icon/crystal.svg b/icon/crystal.svg new file mode 100644 index 0000000..62a0561 --- /dev/null +++ b/icon/crystal.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icon/csharp.svg b/icon/csharp.svg new file mode 100644 index 0000000..9d8fc85 --- /dev/null +++ b/icon/csharp.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icon/d.svg b/icon/d.svg new file mode 100644 index 0000000..c4593f1 --- /dev/null +++ b/icon/d.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/dart.svg b/icon/dart.svg new file mode 100644 index 0000000..b310b2b --- /dev/null +++ b/icon/dart.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/icon/delphi.svg b/icon/delphi.svg new file mode 100644 index 0000000..c0e51c5 --- /dev/null +++ b/icon/delphi.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/icon/ecmascript.svg b/icon/ecmascript.svg new file mode 100644 index 0000000..7994dbf --- /dev/null +++ b/icon/ecmascript.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/icon/elixir.svg b/icon/elixir.svg new file mode 100644 index 0000000..ed5f3ce --- /dev/null +++ b/icon/elixir.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/elm.svg b/icon/elm.svg new file mode 100644 index 0000000..1856070 --- /dev/null +++ b/icon/elm.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/icon/emacs-lisp.svg b/icon/emacs-lisp.svg new file mode 100644 index 0000000..dd162d9 --- /dev/null +++ b/icon/emacs-lisp.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/erlang.svg b/icon/erlang.svg new file mode 100644 index 0000000..1a734a9 --- /dev/null +++ b/icon/erlang.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icon/factor.svg b/icon/factor.svg new file mode 100644 index 0000000..4b121f2 --- /dev/null +++ b/icon/factor.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/icon/forth.svg b/icon/forth.svg new file mode 100644 index 0000000..6637da3 --- /dev/null +++ b/icon/forth.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icon/fortran.svg b/icon/fortran.svg new file mode 100644 index 0000000..543db93 --- /dev/null +++ b/icon/fortran.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/icon/free-pascal.svg b/icon/free-pascal.svg new file mode 100644 index 0000000..c7b3a55 --- /dev/null +++ b/icon/free-pascal.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/icon/fsharp.svg b/icon/fsharp.svg new file mode 100644 index 0000000..396e7d3 --- /dev/null +++ b/icon/fsharp.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icon/gleam.svg b/icon/gleam.svg new file mode 100644 index 0000000..b1e85ce --- /dev/null +++ b/icon/gleam.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/icon/gnu-apl.svg b/icon/gnu-apl.svg new file mode 100644 index 0000000..64f6545 --- /dev/null +++ b/icon/gnu-apl.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/icon/gnucobol.svg b/icon/gnucobol.svg new file mode 100644 index 0000000..de6630b --- /dev/null +++ b/icon/gnucobol.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/icon/go.svg b/icon/go.svg new file mode 100644 index 0000000..2cce728 --- /dev/null +++ b/icon/go.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/groovy.svg b/icon/groovy.svg new file mode 100644 index 0000000..1ac2ab1 --- /dev/null +++ b/icon/groovy.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/haskell.svg b/icon/haskell.svg new file mode 100644 index 0000000..8829b48 --- /dev/null +++ b/icon/haskell.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icon/haxe.svg b/icon/haxe.svg new file mode 100644 index 0000000..24481ba --- /dev/null +++ b/icon/haxe.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/idris.svg b/icon/idris.svg new file mode 100644 index 0000000..3c91194 --- /dev/null +++ b/icon/idris.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icon/io.svg b/icon/io.svg new file mode 100644 index 0000000..4c57342 --- /dev/null +++ b/icon/io.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/icon/j.svg b/icon/j.svg new file mode 100644 index 0000000..a3fa052 --- /dev/null +++ b/icon/j.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icon/java.svg b/icon/java.svg new file mode 100644 index 0000000..e2c0e05 --- /dev/null +++ b/icon/java.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/icon/javascript.svg b/icon/javascript.svg new file mode 100644 index 0000000..3d583e7 --- /dev/null +++ b/icon/javascript.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icon/jq.svg b/icon/jq.svg new file mode 100644 index 0000000..6c1674f --- /dev/null +++ b/icon/jq.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icon/julia.svg b/icon/julia.svg new file mode 100644 index 0000000..c4c6403 --- /dev/null +++ b/icon/julia.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icon/kotlin.svg b/icon/kotlin.svg new file mode 100644 index 0000000..f59ebce --- /dev/null +++ b/icon/kotlin.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/lfe.svg b/icon/lfe.svg new file mode 100644 index 0000000..b8cfd5b --- /dev/null +++ b/icon/lfe.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icon/lua.svg b/icon/lua.svg new file mode 100644 index 0000000..1035503 --- /dev/null +++ b/icon/lua.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/icon/mercury.svg b/icon/mercury.svg new file mode 100644 index 0000000..2dfde18 --- /dev/null +++ b/icon/mercury.svg @@ -0,0 +1,29 @@ + + + + + + + diff --git a/icon/mips.svg b/icon/mips.svg new file mode 100644 index 0000000..40128d0 --- /dev/null +++ b/icon/mips.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/icon/nim.svg b/icon/nim.svg new file mode 100644 index 0000000..55ddcaa --- /dev/null +++ b/icon/nim.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/icon/nix.svg b/icon/nix.svg new file mode 100644 index 0000000..16d3d43 --- /dev/null +++ b/icon/nix.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/objective-c.svg b/icon/objective-c.svg new file mode 100644 index 0000000..073900d --- /dev/null +++ b/icon/objective-c.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/icon/ocaml.svg b/icon/ocaml.svg new file mode 100644 index 0000000..e27912f --- /dev/null +++ b/icon/ocaml.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/perl5.svg b/icon/perl5.svg new file mode 100644 index 0000000..a95188a --- /dev/null +++ b/icon/perl5.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/icon/pharo-smalltalk.svg b/icon/pharo-smalltalk.svg new file mode 100644 index 0000000..029c720 --- /dev/null +++ b/icon/pharo-smalltalk.svg @@ -0,0 +1,581 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/php.svg b/icon/php.svg new file mode 100644 index 0000000..82f7033 --- /dev/null +++ b/icon/php.svg @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/plsql.svg b/icon/plsql.svg new file mode 100644 index 0000000..977a7f1 --- /dev/null +++ b/icon/plsql.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/icon/pony.svg b/icon/pony.svg new file mode 100644 index 0000000..624ee10 --- /dev/null +++ b/icon/pony.svg @@ -0,0 +1,107 @@ + + + + + + + Pony Language Banner + + + + + image/svg+xml + + Pony Language Banner + http://web.utk.edu/~grissino/Site/galleries/treering-gallery1/zuni%20douglas%20fir.jpg + + + Jason Hoogland + + + 2016-05-17 + + + + + + + + + + + + + + + + + diff --git a/icon/powershell.svg b/icon/powershell.svg new file mode 100644 index 0000000..8c5f885 --- /dev/null +++ b/icon/powershell.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/icon/prolog.svg b/icon/prolog.svg new file mode 100644 index 0000000..0b1b4c9 --- /dev/null +++ b/icon/prolog.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/purescript.svg b/icon/purescript.svg new file mode 100644 index 0000000..df7f3fe --- /dev/null +++ b/icon/purescript.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/icon/pyret.svg b/icon/pyret.svg new file mode 100644 index 0000000..dbebcc7 --- /dev/null +++ b/icon/pyret.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icon/python.svg b/icon/python.svg new file mode 100644 index 0000000..c167bcc --- /dev/null +++ b/icon/python.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/icon/qsharp.svg b/icon/qsharp.svg new file mode 100644 index 0000000..6c26007 --- /dev/null +++ b/icon/qsharp.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/icon/r.svg b/icon/r.svg new file mode 100644 index 0000000..1ed06f4 --- /dev/null +++ b/icon/r.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/icon/racket.svg b/icon/racket.svg new file mode 100644 index 0000000..e126ccc --- /dev/null +++ b/icon/racket.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/icon/raku.svg b/icon/raku.svg new file mode 100644 index 0000000..97e1f4c --- /dev/null +++ b/icon/raku.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/reasonml.svg b/icon/reasonml.svg new file mode 100644 index 0000000..4ecdf26 --- /dev/null +++ b/icon/reasonml.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icon/red.svg b/icon/red.svg new file mode 100644 index 0000000..30241a3 --- /dev/null +++ b/icon/red.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/research_experiment_1.svg b/icon/research_experiment_1.svg new file mode 100644 index 0000000..6621601 --- /dev/null +++ b/icon/research_experiment_1.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/icon/ruby.svg b/icon/ruby.svg new file mode 100644 index 0000000..f5a5e72 --- /dev/null +++ b/icon/ruby.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/rust.svg b/icon/rust.svg new file mode 100644 index 0000000..dad9803 --- /dev/null +++ b/icon/rust.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/icon/scala.svg b/icon/scala.svg new file mode 100644 index 0000000..826459f --- /dev/null +++ b/icon/scala.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/icon/scheme.svg b/icon/scheme.svg new file mode 100644 index 0000000..91e875a --- /dev/null +++ b/icon/scheme.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icon/shen.svg b/icon/shen.svg new file mode 100644 index 0000000..4e45b7e --- /dev/null +++ b/icon/shen.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icon/sml.svg b/icon/sml.svg new file mode 100644 index 0000000..d2206bc --- /dev/null +++ b/icon/sml.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icon/solidity.svg b/icon/solidity.svg new file mode 100644 index 0000000..4d6146a --- /dev/null +++ b/icon/solidity.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/icon/swift.svg b/icon/swift.svg new file mode 100644 index 0000000..f09f3bd --- /dev/null +++ b/icon/swift.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/icon/systemverilog.svg b/icon/systemverilog.svg new file mode 100644 index 0000000..6730e97 --- /dev/null +++ b/icon/systemverilog.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/icon/tcl.svg b/icon/tcl.svg new file mode 100644 index 0000000..e12bb76 --- /dev/null +++ b/icon/tcl.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/twelf.svg b/icon/twelf.svg new file mode 100644 index 0000000..ab582ab --- /dev/null +++ b/icon/twelf.svg @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/typescript.svg b/icon/typescript.svg new file mode 100644 index 0000000..e58af59 --- /dev/null +++ b/icon/typescript.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icon/unison.svg b/icon/unison.svg new file mode 100644 index 0000000..3fb3f50 --- /dev/null +++ b/icon/unison.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/icon/v.svg b/icon/v.svg new file mode 100644 index 0000000..c1b794d --- /dev/null +++ b/icon/v.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icon/vb-net.svg b/icon/vb-net.svg new file mode 100644 index 0000000..cf65bb2 --- /dev/null +++ b/icon/vb-net.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/icon/vbnet.svg b/icon/vbnet.svg new file mode 100644 index 0000000..130d366 --- /dev/null +++ b/icon/vbnet.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/icon/vimscript.svg b/icon/vimscript.svg new file mode 100644 index 0000000..7496616 --- /dev/null +++ b/icon/vimscript.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/vlang.svg b/icon/vlang.svg new file mode 100644 index 0000000..1dca5da --- /dev/null +++ b/icon/vlang.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/wasm.svg b/icon/wasm.svg new file mode 100644 index 0000000..c8b4a24 --- /dev/null +++ b/icon/wasm.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/icon/wren.svg b/icon/wren.svg new file mode 100644 index 0000000..36b9491 --- /dev/null +++ b/icon/wren.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/icon/x86-64.svg b/icon/x86-64.svg new file mode 100644 index 0000000..dba50fc --- /dev/null +++ b/icon/x86-64.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/icon/z3.svg b/icon/z3.svg new file mode 100644 index 0000000..0ddbfe4 --- /dev/null +++ b/icon/z3.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icon/zig.svg b/icon/zig.svg new file mode 100644 index 0000000..595624f --- /dev/null +++ b/icon/zig.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..50ef06e --- /dev/null +++ b/index.html @@ -0,0 +1,26 @@ + + + + + Loading... + + + + + +
+ + + diff --git a/lang/c b/lang/c new file mode 100644 index 0000000..a228b56 --- /dev/null +++ b/lang/c @@ -0,0 +1,48 @@ +language = "c" +name = "C" +homepage = Nothing +spec = Informal +status = Mainstream + +impl = Standalone +domain = [ GeneralPurpose, Firmware ] +platform = [ Linux, Windows, MacOS ] + +typing = Static +safety = None +mm = ManualMM +everything = AMess + +paradigms = [ Imperative ] +parallelism = [ ManualSharedStatePE ] +features = [ Goto, Macros, MutableState, NominalTyping ] +concurrency = [ HardwareThreads ] +runtime = [ Stack ] + +elegance = Embarrassing +example = + """ + #include + #include + + struct hello { + char *h; + char w[6]; + }; + + static void init(struct hello *hi) + { + hi->h = "Hello"; + strcpy(hi->w, "World"); + } + + int main(void) + { + struct hello hi; + + init(&hi); + for (int i = 0; i <= 3; i++) + printf("%s %s!\\n", hi.h, hi.w); + return 0; + } + """ diff --git a/lang/go b/lang/go new file mode 100644 index 0000000..2babdf8 --- /dev/null +++ b/lang/go @@ -0,0 +1,58 @@ +language = "go" +name = "Go" +homepage = Just "https://go.dev/" +spec = Informal +status = Mainstream + +impl = Standalone +domain = [ GeneralPurpose ] +platform = [ Linux, Windows, MacOS ] + +typing = Partial +safety = MemorySafe +mm = AutomaticMM +everything = AMess + +paradigms = [ Imperative ] +parallelism = [ ManualSharedStatePE ] +features = [ Goto, MutableState, NominalTyping, TypeInference, Introspection ] +concurrency = [ HardwareThreads, Coroutines, Channels ] +runtime = [ Stack, Scheduler, GarbageCollector, ErrorHandling ] + +elegance = Embarrassing +example = + """ + package main + + import ( + "fmt" + "time" + ) + + func readword(ch chan string) { + fmt.Println("Type a word, then hit Enter.") + var word string + fmt.Scanf("%s", &word) + ch <- word + } + + func timeout(t chan bool) { + time.Sleep(5 * time.Second) + t <- false + } + + func main() { + t := make(chan bool) + go timeout(t) + + ch := make(chan string) + go readword(ch) + + select { + case word := <-ch: + fmt.Println("Received", word) + case <-t: + fmt.Println("Timeout.") + } + } + """ diff --git a/lang/haskell b/lang/haskell new file mode 100644 index 0000000..aa222b5 --- /dev/null +++ b/lang/haskell @@ -0,0 +1,52 @@ +language = "haskell" +name = "Haskell" +homepage = Just "https://www.haskell.org/" +spec = Informal +status = Mainstream + +impl = Standalone +domain = [ GeneralPurpose ] +platform = [ Linux, Windows, MacOS ] + +typing = Static +safety = TypeSafe +mm = AutomaticMM +everything = AFunction + +paradigms = [ Functional ] +parallelism = [ TransparentPE ] +features = [ Closures, TypeInference, NominalTyping, Lazy, OffSideRule ] +concurrency = [ STM ] +runtime = [ Stack, Scheduler, GarbageCollector, ErrorHandling, Abstraction ] + +elegance = Acceptable +example = + """ + import qualified Data.Time as Time + + data Visitor + = Member Profile + | NonMember + + data Profile = Profile { name :: String, birthday :: Time.Day } + + main :: IO () + main = do + let haskell = Member Profile + { name = "Haskell Curry" + , birthday = read "1900-09-12" + } + greeting <- makeGreeting haskell + putStrLn $ greeting + + makeGreeting :: Visitor -> IO String + makeGreeting visitor = + case visitor of + NonMember -> pure "Hello, mysterious visitor!" + Member profile -> do + today <- Time.utctDay <$> Time.getCurrentTime + let monthAndDay = (\\(_y, m, d) -> (m, d)) . Time.toGregorian + if monthAndDay today == monthAndDay (birthday profile) + then pure $ "Happy birthday, " <> name profile <> "!" + else pure $ "Welcome back, " <> name profile <> "!" + """ diff --git a/lang/java b/lang/java new file mode 100644 index 0000000..66ded35 --- /dev/null +++ b/lang/java @@ -0,0 +1,50 @@ +language = "java" +name = "Java" +homepage = Just "https://www.java.com/" +spec = Informal +status = Mainstream + +impl = Standalone +domain = [ GeneralPurpose ] +platform = [ Linux, Windows, MacOS, Android ] + +typing = Static +safety = MemorySafe +mm = AutomaticMM +everything = AMess + +paradigms = [ Imperative, OOPClasses ] +parallelism = [ ManualSharedStatePE ] +features = [ MutableState, NominalTyping, Exceptions, Introspection, AdHocPoly ] +concurrency = [ HardwareThreads ] +runtime = [ Stack, Interpreter, Scheduler, GarbageCollector, ErrorHandling, Abstraction, VirtualMachine ] + +elegance = Embarrassing +example = + """ + public class Antiprime { + + static int countDivisors(int n) { + if (n < 2) return 1; + int count = 2; // 1 and n + for (int i = 2; i <= n/2; ++i) { + if (n%i == 0) ++count; + } + return count; + } + + public static void main(String[] args) { + int maxDiv = 0, count = 0; + System.out.println("The first 20 anti-primes are:"); + for (int n = 1; count < 20; ++n) { + int d = countDivisors(n); + if (d > maxDiv) { + System.out.printf("%d ", n); + maxDiv = d; + count++; + } + } + System.out.println(); + } + } + """ diff --git a/lang/lua b/lang/lua new file mode 100644 index 0000000..4409a4f --- /dev/null +++ b/lang/lua @@ -0,0 +1,43 @@ +language = "lua" +name = "Lua" +homepage = Just "http://www.lua.org/" +spec = Informal +status = Mainstream + +impl = Standalone +domain = [ GeneralPurpose, Extension ] +platform = [ Linux, Windows, MacOS ] + +typing = Dynamic +safety = MemorySafe +mm = AutomaticMM +everything = AMess + +paradigms = [ Imperative, Functional ] +parallelism = [ ] +features = [ Goto, Closures, MutableState ] +concurrency = [ Coroutines ] +runtime = [ Stack, Interpreter, Scheduler, GarbageCollector, ErrorHandling, Abstraction, VirtualMachine ] + +elegance = Acceptable +example = + """ + local num = tonumber(arg[1]) or 4 + if num < 1 then return end + + local i = 1 + local idir = 1 + + while i ~= 0 do + local j = 1 + local jdir = 1 + while j ~= 0 do + io.write(j == i and '*' or ' ') + if j == num then jdir = -1 end + j = j + jdir + end + if i == num then idir = -1 end + i = i + idir + io.write("\\n") + end + """ diff --git a/lang/mercury b/lang/mercury new file mode 100644 index 0000000..09cebc1 --- /dev/null +++ b/lang/mercury @@ -0,0 +1,77 @@ +language = "mercury" +name = "Mercury" +homepage = Just "https://mercurylang.org/" +spec = Informal +status = Active + +impl = Standalone +domain = [ GeneralPurpose ] +platform = [ Linux, Windows, MacOS ] + +typing = Static +safety = TypeSafe +mm = AutomaticMM +everything = AMess + +paradigms = [ Logic, Functional ] +parallelism = [] +features = [ Exceptions, TypeInference, NominalTyping, Closures ] +concurrency = [] +runtime = [ Stack, ErrorHandling, Unifier, Solver, GarbageCollector ] + +elegance = Acceptable +example = + """ + :- module beer. + :- interface. + :- import_module io. + + :- pred main(io::di, io::uo) is det. + + :- implementation. + + :- import_module int. + :- import_module list. + :- import_module string. + + main(!IO) :- + beer(99, !IO). + + :- pred beer(int::in, io::di, io::uo) is det. + + beer(N, !IO) :- + io.write_string(beer_stanza(N), !IO), + ( if N > 0 then + io.nl(!IO), + beer(N - 1, !IO) + else + true + ). + + :- func beer_stanza(int) = string. + + beer_stanza(N) = Stanza :- + ( if N = 0 then + Stanza = "Go to the store and buy some more!\\n" + else + NBottles = bottles_line(N), + N1Bottles = bottles_line(N - 1), + Stanza = + NBottles ++ " on the wall.\\n" ++ + NBottles ++ ".\\n" ++ + "Take one down, pass it around,\\n" ++ + N1Bottles ++ " on the wall.\\n" + ). + + :- func bottles_line(int) = string. + + bottles_line(N) = + ( if N = 0 then + "No more bottles of beer" + else if N = 1 then + "1 bottle of beer" + else + string.format("%d bottles of beer", [i(N)]) + ). + """ + diff --git a/lang/pony b/lang/pony new file mode 100644 index 0000000..d3ff83c --- /dev/null +++ b/lang/pony @@ -0,0 +1,57 @@ +language = "pony" +name = "Pony" +homepage = Just "https://www.ponylang.io/" +spec = Tutorial +status = Active + +impl = Standalone +domain = [ GeneralPurpose, Distributed ] +platform = [ Linux, Windows, MacOS ] + +typing = Static +safety = TypeSafe +mm = AutomaticMM +everything = AMess + +paradigms = [ Imperative, OOPClasses ] +parallelism = [ ControlledSharedStatePE ] +features = [ MutableState, NominalTyping, StructuralTyping, Exceptions, ParametricPoly ] +concurrency = [ Actors, MessagePassing ] +runtime = [ Stack, Scheduler, GarbageCollector, ErrorHandling, Abstraction ] + +elegance = Impressive +example = + """ + use "collections" + + class Circle + var _radius: F32 + + new create(radius': F32) => + _radius = radius' + + fun ref get_radius(): F32 => + _radius + + fun ref get_area(): F32 => + F32.pi() * _radius.pow(2) + + fun ref get_circumference(): F32 => + 2 * _radius * F32.pi() + + actor Main + new create(env: Env) => + + for i in Range[F32](1.0, 101.0) do + let c = Circle(i) + + var str = + recover val + "Radius: " + c.get_radius().string() + "\\n" + + "Circumference: " + c.get_circumference().string() + "\\n" + + "Area: " + c.get_area().string() + "\\n" + end + + env.out.print(str) + end + """ diff --git a/lang/twelf b/lang/twelf new file mode 100644 index 0000000..4d86490 --- /dev/null +++ b/lang/twelf @@ -0,0 +1,43 @@ +language = "twelf" +name = "Twelf" +homepage = Just "http://twelf.org/wiki/Main_Page" +spec = Informal +status = Unmaintained + +impl = Standalone +domain = [ ProofAssistant ] +platform = [ Linux, Windows, MacOS ] + +typing = Static +safety = TypeSafe +mm = NoMM +everything = AFunction + +paradigms = [ Functional ] +parallelism = [ ] +features = [ NominalTyping, TypeInference, Dependent ] +concurrency = [ ] +runtime = [ Interpreter, Unifier, Solver ] + +elegance = Impressive +example = + """ + %% natural numbers + nat : type. + z : nat. + s : nat -> nat. + + even : nat -> type. + even-z : even z. + even-s : even (s (s N)) + <- even N. + + plus : nat -> nat -> nat -> type. + plus-z : plus z N2 N2. + plus-s : plus (s N1) N2 (s N3) + <- plus N1 N2 N3. + + %mode plus +N1 +N2 -N3. + %worlds () (plus _ _ _). + %total N1 (plus N1 _ _). + """ diff --git a/lang/x86-64 b/lang/x86-64 new file mode 100644 index 0000000..3c9358b --- /dev/null +++ b/lang/x86-64 @@ -0,0 +1,40 @@ +language = "x86-64" +name = "x86-64" +homepage = Nothing +spec = Informal +status = Mainstream + +impl = Standalone +domain = [ Firmware ] +platform = [ Linux, Windows ] + +typing = Dynamic +safety = None +mm = ManualMM +everything = AMess + +paradigms = [ Imperative ] +parallelism = [ ManualSharedStatePE ] +features = [ Goto, Macros, MutableState, Reflection, Introspection ] +concurrency = [ HardwareThreads ] +runtime = [ ] + +elegance = Embarrassing +example = + """ + .globl _start + .data + msg: + .ascii "Hello, World!\n" + len = . - msg + .text + _start: + mov $1, %rax + mov $1, %rdi + mov $msg, %rsi + mov $len, %rdx + syscall + mov $60, %rax + xor %rdi, %rdi + syscall + """ diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..682a913 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,17 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ["Main.gren", "Style.gren"], + theme: { + extend: { + boxShadow: { + 'inset': 'inset 0px 1px 10px 6px rgba(0, 0, 0, 0.2)', + 'inset3': 'inset 0px 1px 10px 6px rgba(0, 0, 0, 0.3)', + 'inset-y': 'inset 0px 12px 10px -5px rgba(0, 0, 0, 0.2), inset 0px -12px 10px -5px rgba(0, 0, 0, 0.2)', + 'inset-t': 'inset 0px 12px 10px -5px rgba(0, 0, 0, 0.3)', + 'inset-b': 'inset 0px -12px 10px -5px rgba(0, 0, 0, 0.2)', + 'button': '0px 1px 4px 2px rgba(0, 0, 0, 0.3)', + } + }, + }, + plugins: [], +}