{"id":15375892,"url":"https://github.com/rictic/generatejs","last_synced_at":"2025-07-16T01:03:03.664Z","repository":{"id":725532,"uuid":"373467","full_name":"rictic/generatejs","owner":"rictic","description":"Generates highly varied syntactically valid javascript","archived":false,"fork":false,"pushed_at":"2010-07-26T21:26:28.000Z","size":690,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T16:26:03.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rictic.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-11-15T06:40:18.000Z","updated_at":"2020-08-28T16:50:26.000Z","dependencies_parsed_at":"2022-07-05T13:11:56.141Z","dependency_job_id":null,"html_url":"https://github.com/rictic/generatejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rictic/generatejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rictic%2Fgeneratejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rictic%2Fgeneratejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rictic%2Fgeneratejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rictic%2Fgeneratejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rictic","download_url":"https://codeload.github.com/rictic/generatejs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rictic%2Fgeneratejs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265472242,"owners_count":23771832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T14:05:12.413Z","updated_at":"2025-07-16T01:03:03.610Z","avatar_url":"https://github.com/rictic.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Javascript Generator\n====================\n\nA program for generating widely varied, syntactically valid Javascript source code conforming to the ECMA-262 Standard.\n\nRequires Haskell, easily installed at [The Haskell Platform](http://hackage.haskell.org/platform/)\n\nGetting the Code\n----------------\n\nThe latest version of the code can always be gotten from github, either by cloning it with git:\n\n    git clone git://github.com/rictic/generatejs.git\n    cd generatejs\n    \nOr by downloading a tarball:\n\n    curl -L http://github.com/rictic/generatejs/tarball/master \u003e generatejs.tar.gz\n    tar -xzf generatejs.tar.gz\n    cd *generatejs*/\n    \nInstallation\n------------\n\nInstallation should be as simple as\n\n    cabal update \u0026\u0026 cabal install\n\nRunning\n-------\n\n    generatejs [--stdout] \u003cnumber-of-programs-to-create\u003e\n\nIf you include `--stdout`, the programs are written to standard out, one to a line.\n\nOtherwise it will create a directory `gen/` in your current directory.  This directory will in turn be filled with numbered subdirectories, each of which holds up to 20000 numbered js programs.  This is done to keep the filesystem from freaking out from too many files in any one directory.\n\n\nHacking\n-------\n\nThe command line runner is in generateJS.hs, the actual generation code is in jsgenerator.js.\n\nThe code is written in a declarative style, with a pretty direct mapping from the productions in the standard to Symbols in the code.\n\ni.e. the production\n\n    SignedInteger ::: \n        DecimalDigits\n        + DecimalDigits\n        - DecimalDigits\n\nbecomes\n\n    signedInteger = Nonterminal [\n        [decimalDigits],\n        [Terminal \"+\", decimalDigits],\n        [Terminal \"-\", decimalDigits]]\n\nI found it helpful to construct a few `Symbol`s with `Terminal` and `Nonterminal` and pass the result to `getAll` until I was sure I had it worked out.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frictic%2Fgeneratejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frictic%2Fgeneratejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frictic%2Fgeneratejs/lists"}