- AD: White Action Dice
- PD: Red Power Dice
- Models: Units and Void Gates
| Benchmark | Description | pxi | gawk | jq | mlr | fx | |
|---|---|---|---|---|---|---|---|
| JSON 1 | Select an attribute on small JSON objects | 11s | 15s | 46s | – | 284s | |
| JSON 2 | Select an attribute on large JSON objects | 20s | 20s | 97s | – | 301s | |
| JSON 3 | Pick a single attribute on small JSON objects | 15s | 21s | 68s | 91s | 368s | |
| JSON 4 | Pick a single attribute on large JSON objects | 26s | 27s | 130s | 257s | 420s | |
| JSON to CSV 1 | Convert a small JSON to CSV format | 15s | – | 77s | 60s | – | |
| JSON to CSV 2 | Convert a large JSON to CSV format | 38s | – | 264s | 237s | – | |
| CSV 1 | Select a column from a small csv file | 11s | 8s | 37s | 23s | – | |
| CSV 2 | Select a column from a large csv file | 19s | 9s | 66s | 72s | – | |
| CSV to JSON 1 | Convert a small CSV to JSON format | 15s | – | – | 120s | – |
| // Paste e.g. in https://scastie.scala-lang.org | |
| object Foo { | |
| def main(args: Array[String]): Unit = { | |
| def some[A](a: A): Option[A] = Some(a) | |
| val inc: Int => Int = _ + 1 | |
| println( | |
| map(inc)(List(1, 2, 3, 4)) |
| // Ramda 0.25.0 | |
| import { defaultTo, eqBy, chain, flatten, head, ifElse, join, length, map, of, pipe, split, tail, transpose, trim, zipObj } from 'ramda' | |
| const interleave = pipe(transpose, flatten) | |
| const trimmedValues = separator => pipe(split(separator), map(trim)) | |
| const csv = separator => (strings, ...expressions) => { | |
| const lines = pipe( | |
| interleave, | |
| join(''), |
| console.log('["lisp",{"dot":"json"}]\n') | |
| // import { and, apply, assoc, concat, contains, dissoc, equals, head, init, is, isEmpty, isNil, keys, last, map, o, pick, pipe, prepend, propOr, reduce, reverse, tail, type } from 'ramda' | |
| // HELPERS | |
| const isUndefined = a => typeof(a) === 'undefined' | |
| //const may = (err, res) => ({ err, res }) | |
| const res = res => ({ res }) |
| // If you haven't already, watch Brian Lonsdorf's "Hey Underscore, You're Doing It Wrong!": | |
| // http://functionaltalks.org/2013/05/27/brian-lonsdorf-hey-underscore-youre-doing-it-wrong/ | |
| const { append, eqProps, identity, map, mergeWith, nthArg, pipe, reject, when } = require('Ramda'); | |
| const idEquals = eqProps('id'); | |
| // Reducers as data-less action function (returns a function that |
| import util.Random | |
| import io.Source | |
| object MultipleChoice extends App { | |
| implicit def colorString(string: String) = new ColoredString(string) | |
| val buffer = Source fromFile "mc.txt" | |
| val Line = """^([wf]):(.+)$""".r | |
| val questions = buffer.getLines flatMap (_ match { |
| \documentclass{article} | |
| \input{list} | |
| \def\times#1#2{\newcount\int\int\numexpr#1*#2\relax\the\int} | |
| \begin{document} | |
| \List[new]{numbers}{1,2,3,4,5,6,7,8,9} |