Skip to content

nathanesau/jsource

 
 

Repository files navigation

J: From C to C++20

J is an array programming language created by Ken Iverson and Roger Hui (see image below).

This is a fork of jsoftware/jsource and we will be porting it to C++20.

Goals

  • Reduce complexity of build options
  • Compile with GCC 10+
  • Compile with Clang 11+
  • Remove all (most) of the macros
  • Clang-format the code base
  • Clang-tidy the code base
  • Set up CI (Buildkite)
  • Set up Code Coverage
  • Set up badges
  • Get both build / tests running in parallel
    • Parallel build (for free off of zhihaoy branch)
    • Parallel tests
  • Monitor compile & run time perf while refactoring

Non-Codebase Goals

  • Learn to not use mouse

Comparison of Languages

Calculating the first 10 odd numbers:

Language Code Runnable Link
J 1+2*i.10
APL 1+2×⍳10 TryAPL
R -1+2*seq(10)
Python [1 + 2 * i for i in range(10)] Godbolt
Haskell map (1+) $ map (2*) [0..9] OneCompiler
Haskell map ((+1) . (*2)) [0..9] OneCompiler
Haskell take 10 [1,3..] OneCompiler
C++ transform(iota(0, 10), [](auto e) { return e * 2 + 1; }) Godbolt
C# Enumerable.Range(0, 10).Select((int i) => { return i * 2 + 1; })
Java IntStream.range(0, 10).map(x -> x * 2 + 1).toArray();

Getting started & Building:

For building this repository, please see CONTRIBUTING.md.

Image of Ken Iverson and Roger Hui

image

Packages

No packages published

Languages

  • C 50.5%
  • J 47.1%
  • C++ 1.4%
  • CMake 0.4%
  • JavaScript 0.4%
  • CSS 0.1%
  • Other 0.1%