-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add several more shebang script files
- Loading branch information
Showing
34 changed files
with
302 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Run Benchmarks | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: macOS-14-arm64 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update Homebrew registry | ||
uses: brew update | ||
|
||
- name: Set up Dart | ||
run: | | ||
brew tap dart-lang/dart | ||
brew install dart | ||
- name: Set up Dotnet | ||
run: brew install dotnet | ||
|
||
- name: Set up Elixir | ||
run: brew install elixir | ||
|
||
- name: Set up Elvish | ||
run: brew install elvish | ||
|
||
- name: Set up Fish | ||
run: brew install fish | ||
|
||
- name: Set up Godot for GDScript | ||
run: brew install godot | ||
|
||
- name: Set up Guile | ||
run: brew install guile | ||
|
||
- name: Set up Julia | ||
run: brew install julia | ||
|
||
- name: Set up Lua | ||
run: brew install lua | ||
|
||
- name: Set up Luajit | ||
run: brew install luajit | ||
|
||
- name: Set up Ngs | ||
run: brew install ngs | ||
|
||
# - name: Set up Nim | ||
# run: brew install nim | ||
|
||
- name: Set up Nushell | ||
run: brew install nushell | ||
|
||
- name: Set up Osh | ||
run: brew install osh | ||
|
||
- name: Set up Php | ||
run: brew install php | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
|
||
- name: Set up Racket | ||
run: brew install minimal-racket | ||
|
||
- name: Set up Scala-cli | ||
run: brew install scala-cli | ||
|
||
- name: Set up V | ||
run: brew install v | ||
|
||
- name: Install Make | ||
run: | | ||
sudo apt update | ||
sudo apt install make | ||
- name: Run main benchmark | ||
run: make run | ||
|
||
- name: Run shebang-scripts benchmark | ||
run: make run-shebangs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /bin/bash | ||
|
||
date -u "+%Y-%m-%d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /Users/adrian/.bun/bin/bun | ||
|
||
console.log(new Date().toISOString().slice(0, 10)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! /opt/homebrew/bin/dart | ||
|
||
void main() { | ||
DateTime now = DateTime.now(); | ||
String formattedDate = | ||
'${now.year}-${now.month.toString().padLeft(2,'0')}-${ | ||
now.day.toString().padLeft(2,'0')}'; | ||
print(formattedDate); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /bin/dash | ||
|
||
date -u "+%Y-%m-%d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /usr/bin/env elixir | ||
|
||
# TODO: Directly calling /opt/homebrew/bin/elixir does not work | ||
|
||
date = Date.utc_today() | ||
IO.puts(date) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /opt/homebrew/bin/elvish | ||
|
||
date -u "+%Y-%m-%d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /opt/homebrew/bin/fish | ||
|
||
date -u "+%Y-%m-%d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! /usr/bin/env -S dotnet fsi | ||
|
||
// TODO: Directly calling /opt/homebrew/bin/dotnet does not work | ||
|
||
open System | ||
|
||
printfn "%s" (DateTime.Now.Date.ToString("yyyy-MM-dd")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env -S godot -s | ||
|
||
extends SceneTree | ||
|
||
func _init(): | ||
print(Time.get_date_string_from_system()) | ||
quit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! /opt/homebrew/bin/guile | ||
!# | ||
|
||
(use-modules (srfi srfi-19)) | ||
|
||
(display (date->string (current-date) "~Y-~m-~e")) | ||
(newline) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! /Users/adrian/.ghcup/bin/stack | ||
-- stack script --package time --snapshot lts-22.22 | ||
|
||
import Data.Time | ||
|
||
main :: IO () | ||
main = do | ||
today <- getCurrentTime | ||
print $ utctDay today |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#! /opt/homebrew/bin/julia | ||
|
||
using Dates | ||
|
||
println(today()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /bin/ksh | ||
|
||
date -u "+%Y-%m-%d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /opt/homebrew/bin/lua | ||
|
||
print(os.date("%Y-%m-%dT%H:%M:%S")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /opt/homebrew/bin/luajit | ||
|
||
print(os.date("%Y-%m-%dT%H:%M:%S")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /opt/homebrew/bin/ngs | ||
|
||
date -u "+%Y-%m-%d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! /opt/homebrew/bin/nim e --hints:off | ||
|
||
mode = ScriptMode.Silent | ||
|
||
# TODO: Importing std/times is not working in a NimScript | ||
# import std/times | ||
# echo now().format("yyyy-MM-dd") | ||
|
||
echo "Hello World!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /opt/homebrew/bin/nu | ||
|
||
date now | format date "%Y-%m-%d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#! /usr/bin/env ocaml -I +unix | ||
|
||
#load "unix.cma";; | ||
|
||
let today = Unix.localtime (Unix.time ());; | ||
let day = today.Unix.tm_mday;; | ||
let month = today.Unix.tm_mon + 1;; | ||
let year = today.Unix.tm_year + 1900;; | ||
|
||
Printf.printf "%04d-%02d-%02d\n" year month day;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /opt/homebrew/bin/osh | ||
|
||
date -u "+%Y-%m-%d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /usr/bin/perl | ||
|
||
use DateTime; | ||
|
||
my $dt = DateTime->now; | ||
print $dt->ymd; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /opt/homebrew/bin/php | ||
<?php | ||
echo date("Y-m-d")."\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#! /Users/adrian/.rye/shims/python | ||
|
||
import datetime | ||
|
||
print(datetime.datetime.now().isoformat()[:10]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#! /opt/homebrew/bin/racket | ||
#lang racket/base | ||
|
||
(define (pad-zero n) | ||
(if (< n 10) | ||
(string-append "0" (number->string n)) | ||
(number->string n))) | ||
|
||
(define (get-current-date-iso) | ||
(let* ((current-date (seconds->date (current-seconds))) | ||
(year (date-year current-date)) | ||
(month (date-month current-date)) | ||
(day (date-day current-date))) | ||
(format "~a-~a-~a" year (pad-zero month) (pad-zero day)))) | ||
|
||
(displayln (get-current-date-iso)) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#! /usr/bin/env roc | ||
|
||
app "hello-world" | ||
packages { | ||
pf: "https://github.com/roc-lang/basic-cli/releases/download/0.10.0/vNe6s9hWzoTZtFmNkvEICPErI9ptji_ySjicO6CkucY.tar.br" | ||
} | ||
imports [pf.Stdout, pf.Task.{ Task }, pf.Utc] | ||
provides [main] to pf | ||
|
||
|
||
main : Task {} _ | ||
main = | ||
now = Utc.now! | ||
# TODO: Use https://github.com/imclerran/roc-isodate to format the date | ||
nowStr = now |> Utc.toMillisSinceEpoch |> Num.toStr | ||
Stdout.line! nowStr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#! /usr/bin/ruby | ||
|
||
require 'date' | ||
|
||
puts DateTime.now.to_date.to_s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /opt/homebrew/bin/scala-cli shebang -S 3 | ||
|
||
println(java.time.LocalDate.now) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! /usr/bin/swift | ||
|
||
import Foundation | ||
|
||
let formatter = DateFormatter() | ||
formatter.dateFormat = "yyyy-MM-dd" | ||
let today = formatter.string(from: Date()) | ||
|
||
print(today) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#! /opt/homebrew/bin/v | ||
|
||
import time | ||
|
||
println(time.now().ymmdd()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /opt/homebrew/bin/vala | ||
|
||
void main() { | ||
// TODO: Somehow does not print the message | ||
print("File does not exist.\n"); | ||
} |