aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.envrc1
-rw-r--r--.gitignore1
-rw-r--r--.local.lua13
-rw-r--r--flake.lock27
-rw-r--r--flake.nix14
-rw-r--r--main.ua5
6 files changed, 61 insertions, 0 deletions
diff --git a/.envrc b/.envrc
new file mode 100644
index 0000000..3550a30
--- /dev/null
+++ b/.envrc
@@ -0,0 +1 @@
+use flake
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ea1472e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+output/
diff --git a/.local.lua b/.local.lua
new file mode 100644
index 0000000..3835641
--- /dev/null
+++ b/.local.lua
@@ -0,0 +1,13 @@
+-- My repl config: https://github.com/phenax/neovim-config/blob/main/lua/phenax/repl.lua
+--- @type table
+Repl = Repl
+
+Repl.replModes.uiua = {
+ config = {
+ command = 'uiua repl',
+ clear_screen = false,
+ width = function(w) return w * 0.4 end,
+ }
+}
+
+Repl.apply_repl_mode('uiua')
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..34d3333
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,27 @@
+{
+ "nodes": {
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1739020877,
+ "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "a79cfe0ebd24952b580b1cf08cd906354996d547",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..151edd3
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,14 @@
+{
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
+ };
+
+ outputs = { self, nixpkgs }:
+ let
+ pkgs = import nixpkgs { system = "x86_64-linux"; };
+ in {
+ devShells.x86_64-linux.default = pkgs.mkShell {
+ buildInputs = [pkgs.uiua];
+ };
+ };
+}
diff --git a/main.ua b/main.ua
new file mode 100644
index 0000000..7b1ef26
--- /dev/null
+++ b/main.ua
@@ -0,0 +1,5 @@
+ImgW ← &fwa "./output/mandelbrot.png" img "png"
+
+Imgdata ← ⍉⊞<⊞+⇡3∿∩(÷25)⇡240⇡80
+
+ImgW Imgdata