Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Breck Yunits authored and Breck Yunits committed May 20, 2024
1 parent b5c6ab4 commit 6e3c59c
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Computer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { TreeNode } = require("jtree/products/TreeNode.js")
const { Disk } = require("jtree/products/Disk.node.js")
const { Utils } = require("jtree/products/Utils.js")
const { shiftRight, removeReturnChars } = Utils
const ParserFile = new TreeNode(Disk.read(path.join(__dirname, "code", "pldbMeasures.scroll")))
const ParserFile = new TreeNode(Disk.read(path.join(__dirname, "code", "measures.scroll")))
const listsFolder = path.join(__dirname, "lists")
const pagesDir = path.join(__dirname, "pages")
const numeral = require("numeral")
Expand Down Expand Up @@ -1271,7 +1271,7 @@ codeWithHeader ${this.title} <a href="../lists/keywords.html#q=${this.id}">Keywo
class Feature {
constructor(measure, computer) {
this.measure = measure
this.fileName = "pldbMeasures.scroll"
this.fileName = "measures.scroll"
this.id = measure.Name
this.computer = computer
}
Expand Down
2 changes: 1 addition & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ node_modules/scroll-cli/grammar/blankLine.grammar
node_modules/scroll-cli/grammar/measures.grammar
node_modules/scroll-cli/grammar/import.grammar
node_modules/scroll-cli/grammar/errors.grammar
code/pldbMeasures.scroll`
code/measures.scroll`
.split("\n")
.map(filepath => Disk.read(path.join(__dirname, filepath)))
.join("\n\n")
Expand Down
2 changes: 1 addition & 1 deletion code/conceptPage.scroll
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ replaceJs TEMPLATE
Tables.getLanguageTemplate(absolutePath);
}

import pldbMeasures.scroll
import measures.scroll

import ../header.scroll

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions download.scroll
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ css
text-overflow: ellipsis;
}

Download the PLDB concept database as: CSV | TSV | JSON
Download the PLDB ScrollSet as: CSV | TSV | JSON
link pldb.csv CSV
link pldb.tsv TSV
link pldb.json JSON

import code/pldbMeasures.scroll
import code/measures.scroll
loadConcepts concepts

Statistics on the measures (columns) are below and can be downloaded as: CSV | TSV | JSON
Expand Down
6 changes: 3 additions & 3 deletions pages/join.scroll
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Become an active contributor to PLDB!

- Write a data backed guest post on the blog
link ../posts/index.html blog
- Add or edit languages in the concept database
- Add or edit language features and examples in the concept database
- Add or edit languages to the ScrollSet
- Add or edit language features and examples to the ScrollSet
- Improve or add a data importer for a source like Wikipedia or Github
- Write or connect AI models that can add information to the concept database
- Write or connect AI models that can add information to the ScrollSet
- Discuss and improve the data grammar and ranking algorithm
- Improve the website or codebase

Expand Down
10 changes: 5 additions & 5 deletions readme.scroll
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ wideColumns 1

import code/ciBadges.scroll

PLDB is a public domain database and website containing over 135,000 facts about over 4,000 programming languages.
PLDB is a public domain ScrollSet and website containing over 135,000 facts about over 4,000 programming languages.

This repo contains the entire database, code, and website for https://pldb.io.
This repo contains the entire ScrollSet, code, and website for https://pldb.io.

## To download the data
The entire database is ready to analyze in popular formats. Full documentation is here: https://pldb.io/download.html
The entire ScrollSet is ready to analyze in popular formats. Full documentation is here: https://pldb.io/download.html
- As CSV: https://pldb.io/pldb.csv
- As TSV: https://pldb.io/pldb.tsv
- As JSON: https://pldb.io/pldb.json
Expand All @@ -34,7 +34,7 @@ Create a new Scroll file in `concepts` with a unique URL friendly filename and s
Edit the corresponding `concepts/*.scroll` file and send a pull request.

## To add a new measure
Update the file `code/pldbMeasures.scroll` and add at least 1 measurement to a concept in `concepts` and send a pull request.
Update the file `code/measures.scroll` and add at least 1 measurement to a concept in `concepts` and send a pull request.

## To build the site locally
code
Expand All @@ -51,7 +51,7 @@ code
npm run format

## To explore this repo
The most important folder is `concepts`, which contains a file for each entity. The folder `measures` contains the grammar files (schema) for the database.
The most important folder is `concepts`, which contains the ScrollSet (a file for each concept). The file `code/measures.scroll` contains the Parsers (schema) for the ScrollSet.
You can see the `cloc` language stats on this repo at https://pldb.io/pages/about.html.

## To use as an npm package:
Expand Down

0 comments on commit 6e3c59c

Please sign in to comment.