From 2b5ac273c2adee5327f58fb34ac30b66da917347 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 9 Feb 2025 15:31:07 +0530 Subject: Init commit with uiua basic shit --- .envrc | 1 + .gitignore | 1 + .local.lua | 13 +++++++++++++ flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 14 ++++++++++++++ main.ua | 5 +++++ 6 files changed, 61 insertions(+) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 .local.lua create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 main.ua 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 -- cgit v1.3.1