Skip to content

Commit

Permalink
Maintenance update 09-23-22 and follow-up on #424 (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuald authored Sep 24, 2022
1 parent 858c8d9 commit e653aa9
Show file tree
Hide file tree
Showing 9 changed files with 367 additions and 368 deletions.
584 changes: 293 additions & 291 deletions README.md

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions common/commands.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
COMMON_FLAGS := -Wall -Wextra -pedantic -Wcast-align -O3 -march=native -flto=auto -Wa,-mbranches-within-32B-boundaries
# COMMON_FLAGS := -g -Wall -Wextra -pedantic -Wcast-align -fsanitize=address -fsanitize=undefined
GCC_FLAGS := $(COMMON_FLAGS)
CLANG_FLAGS := $(COMMON_FLAGS)
LIBNOTIFY_FLAGS := -I../common/libnotify ../common/libnotify/target/libnotify.a
Expand All @@ -9,19 +8,19 @@ VALAC_FLAGS := --disable-assert -X -O3 -X -march=native -X -flto -X -Wa,-mbranch
V_FLAGS := -prod
ZIG_FLAGS := -O ReleaseFast

CLANG_BUILD = clang $(CLANG_FLAGS) -std=c17 -o $@ $^ $(LIBNOTIFY_FLAGS)
CLANG_CPP_BUILD = clang++ $(CLANG_FLAGS) -std=c++20 -stdlib=libc++ -o $@ $^ $(LIBNOTIFY_FLAGS)
CLANG_BUILD = clang $(CLANG_FLAGS) -std=c2x -o $@ $^ $(LIBNOTIFY_FLAGS)
CLANG_CPP_BUILD = clang++ $(CLANG_FLAGS) -std=c++2b -stdlib=libc++ -o $@ $^ $(LIBNOTIFY_FLAGS)
CRYSTAL_BUILD = crystal build --release --no-debug -o $@ $^
DMD_BUILD = dmd -of$@ -O -release -inline -boundscheck=off $^
DOTNET_BUILD = dotnet build --nologo -v q $< -c Release
DUB_BUILD = dub -q build --build=release-nobounds --compiler=ldc2 --single $^
GCC_BUILD = gcc $(GCC_FLAGS) -std=c17 -o $@ $^ $(LIBNOTIFY_FLAGS)
GCC_CPP_BUILD = g++ $(GCC_FLAGS) -std=c++20 -o $@ $^ $(LIBNOTIFY_FLAGS)
GCC_BUILD = gcc $(GCC_FLAGS) -std=c2x -o $@ $^ $(LIBNOTIFY_FLAGS)
GCC_CPP_BUILD = g++ $(GCC_FLAGS) -std=c++23 -o $@ $^ $(LIBNOTIFY_FLAGS)
GCC_GO_BUILD = gccgo $(GCC_FLAGS) -o $@ $^
GDC_BUILD = gdc -o $@ -O3 -frelease -finline -fbounds-check=off $^
GHC_BUILD = ghc -v0 -O2 -fforce-recomp -Wall $^ -o $@ -outputdir $(@D)
GO_BUILD = GO111MODULE=auto go build -o $@ $^
JAVAC_BUILD = javac -Xlint:unchecked -d $(@D) $^
JAVAC_BUILD = javac --release 19 -Xlint:unchecked -d $(@D) $^
KOTLINC_BUILD = kotlinc -include-runtime -jvm-target 18 -d $@ $^
LDC2_BUILD = ldc2 -of$@ -O5 -release -boundscheck=off $^
MCS_BUILD = mcs -debug- -optimize+ -out:$@ $^
Expand All @@ -31,7 +30,7 @@ NIM_GCC_BUILD = nim c -o:$@ --cc:gcc $(NIM_FLAGS) $^
RUSTC_BUILD = rustc $(RUSTC_FLAGS) -C opt-level=3 -C lto -C codegen-units=1 -C panic=abort -o $@ $^
RUST_CLIPPY = clippy-driver -o $@.clippy $^
SWIFTC_BUILD = swiftc -parse-as-library -Ounchecked -cross-module-optimization -o $@ $^
SCALAC_BUILD = scalac -release 17 -d $@ $^
SCALAC_BUILD = scalac -java-output-version 19 -d $@ $^
VALAC_CLANG_BUILD = valac $^ --cc=clang -D CLANG_TEST $(VALAC_FLAGS) -o $@
VALAC_GCC_BUILD = valac $^ --cc=gcc -D GCC_TEST $(VALAC_FLAGS) -o $@
V_CLANG_BUILD = v $(V_FLAGS) -cc clang -o $@ $^
Expand Down
65 changes: 32 additions & 33 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 10 \
&& update-alternatives --install /usr/bin/gdc gdc /usr/bin/gdc-12 10 \
&& update-alternatives --install /usr/bin/gccgo gccgo /usr/bin/gccgo-12 10 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 10 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-13 10 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 10 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 10 \
&& nuget update -self \
&& useradd -m dev

Expand Down Expand Up @@ -53,30 +53,30 @@ RUN curl \
ENV PATH="/home/dev/bin/$PYPY/bin:${PATH}"

# https://www.scala-lang.org/download/
ARG SCALA=3.1.2
ARG SCALA=3.2.0
RUN curl -L \
https://github.com/lampepfl/dotty/releases/download/$SCALA/scala3-$SCALA.tar.gz \
| tar -xz
ENV PATH="/home/dev/bin/scala3-$SCALA/bin/:${PATH}"

# https://jdk.java.net/
ARG JDK=18.0.1.1
ARG JDK=19
RUN curl \
https://download.java.net/java/GA/jdk${JDK}/65ae32619e2f40f3a9af3af1851d6e19/2/GPL/openjdk-${JDK}_linux-x64_bin.tar.gz \
https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_linux-x64_bin.tar.gz \
| tar -xz
ENV PATH="/home/dev/bin/jdk-$JDK/bin:${PATH}"

# https://github.com/crystal-lang/crystal/releases
ARG CRYSTAL=crystal-1.4.1-1
ARG CRYSTAL=crystal-1.5.1-1
RUN curl -L \
https://github.com/crystal-lang/crystal/releases/download/1.4.1/$CRYSTAL-linux-x86_64.tar.gz \
https://github.com/crystal-lang/crystal/releases/download/1.5.1/$CRYSTAL-linux-x86_64.tar.gz \
| tar -xz
ENV PATH="/home/dev/bin/$CRYSTAL/bin:${PATH}"

# https://github.com/ldc-developers/ldc/releases
ARG LDC=ldc2-1.29.0-linux-x86_64
ARG LDC=ldc2-1.30.0-linux-x86_64
RUN curl -L \
https://github.com/ldc-developers/ldc/releases/download/v1.29.0/$LDC.tar.xz \
https://github.com/ldc-developers/ldc/releases/download/v1.30.0/$LDC.tar.xz \
| tar -xJ
ENV PATH="/home/dev/bin/$LDC/bin/:${PATH}"

Expand All @@ -89,46 +89,46 @@ ENV PATH="/home/dev/bin/$NIM/bin/:${PATH}"

# https://dlang.org/download.html
RUN curl \
https://s3.us-west-2.amazonaws.com/downloads.dlang.org/releases/2022/dmd.2.100.0.linux.tar.xz \
https://s3.us-west-2.amazonaws.com/downloads.dlang.org/releases/2022/dmd.2.100.2.linux.tar.xz \
| tar -xJ
ENV PATH="/home/dev/bin/dmd2/linux/bin64/:${PATH}"

# https://www.jruby.org/download
ARG JRUBY=9.3.4.0
ARG JRUBY=9.3.8.0
RUN curl \
https://repo1.maven.org/maven2/org/jruby/jruby-dist/$JRUBY/jruby-dist-$JRUBY-bin.tar.gz \
| tar -xz \
&& ln -s /home/dev/bin/jruby-$JRUBY/bin/jruby /home/dev/bin/jruby

# https://julialang.org/downloads/
ARG JULIA=julia-1.7.3
ARG JULIA=julia-1.8.1
RUN curl \
https://julialang-s3.julialang.org/bin/linux/x64/1.7/$JULIA-linux-x86_64.tar.gz \
https://julialang-s3.julialang.org/bin/linux/x64/1.8/$JULIA-linux-x86_64.tar.gz \
| tar -xz
ENV PATH="/home/dev/bin/$JULIA/bin/:${PATH}"

# https://clojure.org/guides/install_clojure
ARG CLOJURE=1.11.1.1165
RUN curl \
https://download.clojure.org/install/linux-install-$CLOJURE.sh \
| bash -s -- --prefix /home/dev/

# https://swift.org/download/
ARG SWIFT=swift-5.6.1-RELEASE-ubuntu20.04
ARG SWIFT=swift-5.7-RELEASE-ubuntu20.04
RUN curl -L \
https://swift.org/builds/swift-5.6.1-release/ubuntu2004/swift-5.6.1-RELEASE/$SWIFT.tar.gz \
| tar -xz \
https://download.swift.org/swift-5.7-release/ubuntu2004/swift-5.7-RELEASE/swift-5.7-RELEASE-ubuntu20.04.tar.gz \
| tar -xz \
&& ln -s /home/dev/bin/$SWIFT/usr/bin/swift /home/dev/bin/swift \
&& ln -s /home/dev/bin/$SWIFT/usr/bin/swiftc /home/dev/bin/swiftc
ENV LD_LIBRARY_PATH=/home/dev/bin/$SWIFT/usr/lib/swift/linux:$LD_LIBRARY_PATH

# https://clojure.org/guides/install_clojure
ARG CLOJURE=1.11.1.1113
RUN curl \
https://download.clojure.org/install/linux-install-$CLOJURE.sh \
| bash -s -- --prefix /home/dev/

ENV GHCUP_INSTALL_BASE_PREFIX="/home/dev"
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org \
| BOOTSTRAP_HASKELL_NONINTERACTIVE="y" sh
ENV PATH="/home/dev/.ghcup/bin/:${PATH}"

# https://www.haskell.org/ghc/
ARG GHC_VER=9.2.3
ARG GHC_VER=9.4.2
RUN ghcup install ghc $GHC_VER && ghcup set ghc $GHC_VER

# Shared packages for all Haskell code
Expand All @@ -138,34 +138,33 @@ RUN cabal update \
ENV GHC_PACKAGE_PATH="~/.cabal/store/ghc-${GHC_VER}/package.db:"

# https://github.com/graalvm/graalvm-ce-builds/releases
ARG GRAALVM=22.1.0
ARG GRAALVM=22.2.0
RUN curl -L \
https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-$GRAALVM/graalvm-ce-java17-linux-amd64-$GRAALVM.tar.gz \
| tar -xz \
&& ln -s /home/dev/bin/graalvm-ce-java17-$GRAALVM/bin/gu /home/dev/bin/gu
RUN gu install ruby \
&& ln -s /home/dev/bin/graalvm-ce-java17-$GRAALVM/bin/truffleruby /home/dev/bin/truffleruby
# TODO: uncomment after truffleruby properly supports OpenSSL 3
# RUN /home/dev/bin/graalvm-ce-java17-$GRAALVM/languages/ruby/lib/truffle/post_install_hook.sh
RUN /home/dev/bin/graalvm-ce-java17-$GRAALVM/languages/ruby/lib/truffle/post_install_hook.sh

# https://github.com/dotnet/core/tree/main/release-notes
RUN mkdir dotnet && curl \
https://download.visualstudio.microsoft.com/download/pr/e075dadf-22a9-482b-9387-bf8341a4f837/ab20e3e34c2c8be290d9938590f208ed/dotnet-sdk-6.0.203-linux-x64.tar.gz \
https://download.visualstudio.microsoft.com/download/pr/8159607a-e686-4ead-ac99-b4c97290a5fd/ec6070b1b2cc0651ebe57cf1bd411315/dotnet-sdk-6.0.401-linux-x64.tar.gz \
| tar -xz -C dotnet
ENV PATH="/home/dev/bin/dotnet:${PATH}"
ENV DOTNET_ROOT="/home/dev/bin/dotnet"
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1

# https://nodejs.org/en/download/current/
ARG NODE=v18.2.0
ARG NODE=v18.9.0
RUN curl \
https://nodejs.org/dist/$NODE/node-$NODE-linux-x64.tar.xz \
| tar -xJ
ENV PATH="/home/dev/bin/node-$NODE-linux-x64/bin/:${PATH}"

# https://golang.org/dl/
RUN curl -L \
https://go.dev/dl/go1.18.2.linux-amd64.tar.gz \
https://go.dev/dl/go1.19.1.linux-amd64.tar.gz \
| tar -xz
ENV PATH="/home/dev/bin/go/bin/:${PATH}"

Expand All @@ -179,22 +178,22 @@ RUN opam init --disable-sandboxing -n --root=/home/dev/bin/opam --compiler=ocaml
ENV PATH="/home/dev/bin/opam/ocaml-base-compiler.$OCAML/bin/:${PATH}"

# https://kotlinlang.org/docs/command-line.html
ARG KOTLIN=1.6.21
ARG KOTLIN=1.7.10
RUN curl -L -o kotlin-compiler-$KOTLIN.zip \
https://github.com/JetBrains/kotlin/releases/download/v$KOTLIN/kotlin-compiler-$KOTLIN.zip \
&& unzip kotlin-compiler-$KOTLIN.zip \
&& rm kotlin-compiler-$KOTLIN.zip
ENV PATH="/home/dev/bin/kotlinc/bin/:${PATH}"

# https://download.racket-lang.org/
ARG RACKET=8.5
ARG RACKET=8.6
RUN curl -o racket-$RACKET-x86_64-linux-cs.sh \
https://www.cs.utah.edu/plt/installers/$RACKET/racket-$RACKET-x86_64-linux-cs.sh \
&& sh racket-$RACKET-x86_64-linux-cs.sh --unix-style --dest /home/dev/ \
&& rm racket-$RACKET-x86_64-linux-cs.sh

# https://github.com/vlang/v/releases
ARG VLANG=weekly.2022.21
ARG VLANG=weekly.2022.38
RUN curl -Lo v_linux.zip \
https://github.com/vlang/v/releases/download/$VLANG/v_linux.zip \
&& unzip -q v_linux.zip \
Expand All @@ -210,7 +209,7 @@ ENV PATH="/home/dev/bin/$ZIG/:${PATH}"

# Using more stable LuaJIT, used in Alpine and other distros
# https://github.com/openresty/luajit2/tags
RUN export VERSION=2.1-20220411 \
RUN export VERSION=2.1-20220915 \
&& curl -L \
https://github.com/openresty/luajit2/archive/refs/tags/v$VERSION.tar.gz \
| tar -xz \
Expand Down
48 changes: 23 additions & 25 deletions docker/apt.pkgs
Original file line number Diff line number Diff line change
@@ -1,51 +1,49 @@
build-essential=12.9
chezscheme=9.5.4+dfsg-4
clang-13=1:13.0.1-6
cmake=3.23.2-1
clang-14=1:14.0.6-2
cmake=3.24.2-1
cpanminus=1.7046-1
curl=7.83.1-2
curl=7.85.0-1
elixir=1.12.2.dfsg-2.2
gcc-12=12.1.0-2
gccgo-12=12.1.0-2
gdc-12=12.1.0-2
gcc-12=12.2.0-2
gccgo-12=12.2.0-2
gdc-12=12.2.0-2
git=1:2.35.1-1
lbzip2=2.5-2.3
libblas-dev=3.10.1-2
libc++-13-dev=1:13.0.1-6
libc++abi-13-dev=1:13.0.1-6
libc++-13-dev=1:13.0.1-7
libc++abi-13-dev=1:13.0.1-7
libevent-dev=2.1.12-stable-5+b1
libgmp-dev=2:6.2.1+dfsg1-1
libjq-dev=1.6-2.1
libjson-c-dev=0.16-1
libjson-glib-dev=1.6.6-1
liblapack-dev=3.10.1-2
liblua5.4-dev=5.4.4-2
libnuma-dev=2.0.14-3
libomp-13-dev=1:13.0.1-6
liblua5.4-dev=5.4.4-3
libnuma-dev=2.0.15-1
libomp-14-dev=1:14.0.6-2
libonig-dev=6.9.8-1
libopenblas-dev=0.3.20+ds-2
libopenblas-dev=0.3.21+ds-2
libpcre3-dev=2:8.39-14
libssl-dev=3.0.3-8
libssl1.1=1.1.1o-1
libssl-dev=3.0.5-2
libtinfo5=6.3+20220423-2
libtool=2.4.7-4
libtool-bin=2.4.7-4
libxml2=2.9.14+dfsg-1
locales=2.33-7
locales-all=2.33-7
lua5.4=5.4.4-2
libxml2=2.9.14+dfsg-1+b1
locales=2.34-8
locales-all=2.34-8
lua5.4=5.4.4-3
mono-devel=6.8.0.105+dfsg-3.2
nuget=2.8.7+md510+dhx1-1.1
opam=2.1.2-1
php=2:8.1+92
powercap-utils=0.6.0-1
python3=3.10.4-1+b1
python3-numpy=1:1.21.5-1
python3-pip=22.1.1+dfsg-1
python3-ujson=5.3.0-1
python3=3.10.6-1
python3-numpy=1:1.21.5-1+b1
python3-pip=22.2+dfsg-1
python3-ujson=5.5.0-1
tcl=8.6.11+1
tcllib=1.21+dfsg-1
valac=0.56.1-1
vim=2:8.2.4793-1
valac=0.56.3-1
vim=2:9.0.0242-1
xz-utils=5.2.5-2.1
zlib1g=1:1.2.11.dfsg-4
4 changes: 2 additions & 2 deletions json/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ target/json_go_gccgo: test.go | $(gofmt)

# Boost releases:
# https://www.boost.org/users/download/
BOOST_VERSION := boost_1_79_0
BOOST_VERSION := boost_1_80_0
boost = target/$(BOOST_VERSION)
$(boost): | target
cd target && \
curl -L \
https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/$(BOOST_VERSION).tar.bz2 \
https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/$(BOOST_VERSION).tar.bz2 \
| tar -xj

nlohmann_json := target/nlohmann_json
Expand Down
8 changes: 4 additions & 4 deletions matmul/java-nd4j/Maven.list
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#
# lines starting with # are ignored
#
org.nd4j:nd4j-native:1.0.0-M2
org.nd4j:nd4j-native:1.0.0-M2.1

# Usage reference: https://deeplearning4j.konduit.ai/multi-project/explanation/configuration/backends/cpu
org.nd4j:nd4j-native:1.0.0-M2,classifier=linux-x86_64-avx512
org.nd4j:nd4j-native:1.0.0-M2.1,classifier=linux-x86_64-avx512

# Proper logging makes the results more stable (and faster,
# probably because less classpath checks are happening)
org.slf4j:slf4j-api:1.7.36
org.slf4j:slf4j-simple:1.7.36
org.slf4j:slf4j-api:2.0.2
org.slf4j:slf4j-simple:2.0.2
1 change: 1 addition & 0 deletions matmul/matmul_d_lubeck.d
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env dub
/+dub.sdl:
dependency "lubeck" version="~>1.5.1"
dependency "mir-algorithm" version="~>3.15.3"
libs "lapack" "blas"
targetPath "target"
+/
Expand Down
2 changes: 1 addition & 1 deletion primes/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ executables := \
target/primes_zig \
target/primes_nim_clang \
target/primes_nim_gcc

artifacts := $(executables) \
target/primes_scala.jar \
target/Primes.class
Expand Down
10 changes: 5 additions & 5 deletions primes/primes.nim
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import strformat, strutils, sequtils
import deques
import net
import tables
import posix
import deques
import strformat, strutils, sequtils
import tables


const UPPER_BOUND: int = 5_000_000
Expand All @@ -11,7 +11,7 @@ const PREFIX: int = 32_338
type
NodeRef = ref Node
Node = object
children: Table[char, NodeRef]
children: OrderedTable[char, NodeRef]
terminal: bool
Sieve = object
limit: int
Expand Down Expand Up @@ -123,7 +123,7 @@ when isMainModule:
var compiler = "Nim/clang"
when defined(gcc):
compiler = "Nim/gcc"
notify(fmt"{compiler}\t{getpid()}")
notify(&"{compiler}\t{getpid()}")
let result = find(UPPER_BOUND, PREFIX)
notify("stop")
echo result

0 comments on commit e653aa9

Please sign in to comment.