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 index 0c8aaf4..9b42106 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ -.ccls-cache/ -*/.ccls-cache/ -*/target/ +.direnv/ diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..a2dfd6d --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1709204812, + "narHash": "sha256-EjFkpUjz1iV4LZJwgd3PqyLkuyrxrJLobrpNUUumXeI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "728d2d1fd999b9be599793a12bae719709129577", + "type": "github" + }, + "original": { + "owner": "NixOS", + "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..8ccd411 --- /dev/null +++ b/flake.nix @@ -0,0 +1,40 @@ +{ + description = "compilers and interpreters for jpp"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; + }; + + outputs = { + nixpkgs, + ... + }: let + systems = [ "x86_64-linux" "aarch64-linux" ]; + forEachSystem = nixpkgs.lib.genAttrs systems; + pkgsForEach = nixpkgs.legacyPackages; + in { + devShells = forEachSystem (system: + let + pkgs = pkgsForEach.${system}; + in { + default = pkgs.mkShell { + name = "jpp"; + + nativeBuildInputs = with pkgs; [ + gcc + clang + gnat + alire + gprbuild + jdk + go + ghc + clisp + smlnj + swiProlog + ]; + }; + } + ); + }; +} diff --git a/lab0/HelloWorld.hs b/lab0/HelloWorld.hs new file mode 100644 index 0000000..98f25e4 --- /dev/null +++ b/lab0/HelloWorld.hs @@ -0,0 +1,4 @@ +module Main where + +main :: IO () +main = putStrLn "Hello, World!" diff --git a/lab0/HelloWorld.java b/lab0/HelloWorld.java new file mode 100644 index 0000000..70fd330 --- /dev/null +++ b/lab0/HelloWorld.java @@ -0,0 +1,5 @@ +public class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello, World!"); + } +} diff --git a/lab0/hello-world.go b/lab0/hello-world.go new file mode 100644 index 0000000..b7d2a32 --- /dev/null +++ b/lab0/hello-world.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("Hello, World!") +} diff --git a/lab0/hello_world.adb b/lab0/hello_world.adb new file mode 100644 index 0000000..9e04e39 --- /dev/null +++ b/lab0/hello_world.adb @@ -0,0 +1,6 @@ +with Ada.Text_IO; + +procedure Hello_World is +begin + Ada.Text_IO.Put_Line ("Hello, World!"); +end Hello_World; diff --git a/lab0/helloworld.c b/lab0/helloworld.c new file mode 100644 index 0000000..63f8805 --- /dev/null +++ b/lab0/helloworld.c @@ -0,0 +1,6 @@ +#include + +int main(void) { + printf("Hello, World!\n"); + return 0; +} diff --git a/lab0/helloworld.cpp b/lab0/helloworld.cpp new file mode 100644 index 0000000..ad8283b --- /dev/null +++ b/lab0/helloworld.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + std::cout << "Hello, World!\n"; + return 0; +} diff --git a/lab0/helloworld.lisp b/lab0/helloworld.lisp new file mode 100644 index 0000000..582db12 --- /dev/null +++ b/lab0/helloworld.lisp @@ -0,0 +1,4 @@ +(defun helloworld () + (format t "Hello, World!~%")) + +(helloworld) diff --git a/lab0/helloworld.pl b/lab0/helloworld.pl new file mode 100644 index 0000000..12d35b4 --- /dev/null +++ b/lab0/helloworld.pl @@ -0,0 +1,6 @@ +main :- + write("Hello, World!"). + +:- main. + +% vi: ft=prolog diff --git a/lab0/helloworld.sml b/lab0/helloworld.sml new file mode 100644 index 0000000..9074bbc --- /dev/null +++ b/lab0/helloworld.sml @@ -0,0 +1 @@ +print "Hello, World!\n"; diff --git a/lab1/.gitignore b/lab1/.gitignore new file mode 100644 index 0000000..0c8aaf4 --- /dev/null +++ b/lab1/.gitignore @@ -0,0 +1,3 @@ +.ccls-cache/ +*/.ccls-cache/ +*/target/ diff --git a/zad1/.ccls b/lab1/zad1/.ccls similarity index 100% rename from zad1/.ccls rename to lab1/zad1/.ccls diff --git a/zad1/Makefile b/lab1/zad1/Makefile similarity index 100% rename from zad1/Makefile rename to lab1/zad1/Makefile diff --git a/zad1/include/mod.h b/lab1/zad1/include/mod.h similarity index 100% rename from zad1/include/mod.h rename to lab1/zad1/include/mod.h diff --git a/zad1/src/main.c b/lab1/zad1/src/main.c similarity index 100% rename from zad1/src/main.c rename to lab1/zad1/src/main.c diff --git a/zad1/src/mod_iter.c b/lab1/zad1/src/mod_iter.c similarity index 100% rename from zad1/src/mod_iter.c rename to lab1/zad1/src/mod_iter.c diff --git a/zad1/src/mod_rec.c b/lab1/zad1/src/mod_rec.c similarity index 100% rename from zad1/src/mod_rec.c rename to lab1/zad1/src/mod_rec.c diff --git a/zad2/.gitignore b/lab1/zad2/.gitignore similarity index 100% rename from zad2/.gitignore rename to lab1/zad2/.gitignore diff --git a/zad2/iter/module.adb b/lab1/zad2/iter/module.adb similarity index 100% rename from zad2/iter/module.adb rename to lab1/zad2/iter/module.adb diff --git a/zad2/rec/module.adb b/lab1/zad2/rec/module.adb similarity index 100% rename from zad2/rec/module.adb rename to lab1/zad2/rec/module.adb diff --git a/zad2/src/main.adb b/lab1/zad2/src/main.adb similarity index 100% rename from zad2/src/main.adb rename to lab1/zad2/src/main.adb diff --git a/zad2/src/module.ads b/lab1/zad2/src/module.ads similarity index 100% rename from zad2/src/module.ads rename to lab1/zad2/src/module.ads diff --git a/zad2/zad2.gpr b/lab1/zad2/zad2.gpr similarity index 100% rename from zad2/zad2.gpr rename to lab1/zad2/zad2.gpr diff --git a/zad3/Cargo.lock b/lab1/zad3/Cargo.lock similarity index 100% rename from zad3/Cargo.lock rename to lab1/zad3/Cargo.lock diff --git a/zad3/Cargo.toml b/lab1/zad3/Cargo.toml similarity index 100% rename from zad3/Cargo.toml rename to lab1/zad3/Cargo.toml diff --git a/zad3/src/main.rs b/lab1/zad3/src/main.rs similarity index 100% rename from zad3/src/main.rs rename to lab1/zad3/src/main.rs diff --git a/zad3/src/module.rs b/lab1/zad3/src/module.rs similarity index 100% rename from zad3/src/module.rs rename to lab1/zad3/src/module.rs diff --git a/zad4/.ccls b/lab1/zad4/.ccls similarity index 100% rename from zad4/.ccls rename to lab1/zad4/.ccls diff --git a/zad4/include/wrapper.h b/lab1/zad4/include/wrapper.h similarity index 100% rename from zad4/include/wrapper.h rename to lab1/zad4/include/wrapper.h diff --git a/zad4/iter/module.adb b/lab1/zad4/iter/module.adb similarity index 100% rename from zad4/iter/module.adb rename to lab1/zad4/iter/module.adb diff --git a/zad4/rec/module.adb b/lab1/zad4/rec/module.adb similarity index 100% rename from zad4/rec/module.adb rename to lab1/zad4/rec/module.adb diff --git a/zad4/src/main.c b/lab1/zad4/src/main.c similarity index 100% rename from zad4/src/main.c rename to lab1/zad4/src/main.c diff --git a/zad4/src/module.ads b/lab1/zad4/src/module.ads similarity index 100% rename from zad4/src/module.ads rename to lab1/zad4/src/module.ads diff --git a/zad4/zad4.gpr b/lab1/zad4/zad4.gpr similarity index 100% rename from zad4/zad4.gpr rename to lab1/zad4/zad4.gpr diff --git a/zad5/.ccls b/lab1/zad5/.ccls similarity index 100% rename from zad5/.ccls rename to lab1/zad5/.ccls diff --git a/zad5/include/mod.h b/lab1/zad5/include/mod.h similarity index 100% rename from zad5/include/mod.h rename to lab1/zad5/include/mod.h diff --git a/zad5/iter/mod.c b/lab1/zad5/iter/mod.c similarity index 100% rename from zad5/iter/mod.c rename to lab1/zad5/iter/mod.c diff --git a/zad5/rec/mod.c b/lab1/zad5/rec/mod.c similarity index 100% rename from zad5/rec/mod.c rename to lab1/zad5/rec/mod.c diff --git a/zad5/src/main.adb b/lab1/zad5/src/main.adb similarity index 100% rename from zad5/src/main.adb rename to lab1/zad5/src/main.adb diff --git a/zad5/zad5.gpr b/lab1/zad5/zad5.gpr similarity index 100% rename from zad5/zad5.gpr rename to lab1/zad5/zad5.gpr diff --git a/zad6/.ccls b/lab1/zad6/.ccls similarity index 100% rename from zad6/.ccls rename to lab1/zad6/.ccls diff --git a/zad6/Cargo.lock b/lab1/zad6/Cargo.lock similarity index 100% rename from zad6/Cargo.lock rename to lab1/zad6/Cargo.lock diff --git a/zad6/Cargo.toml b/lab1/zad6/Cargo.toml similarity index 100% rename from zad6/Cargo.toml rename to lab1/zad6/Cargo.toml diff --git a/zad6/build.rs b/lab1/zad6/build.rs similarity index 100% rename from zad6/build.rs rename to lab1/zad6/build.rs diff --git a/zad6/src/main.rs b/lab1/zad6/src/main.rs similarity index 100% rename from zad6/src/main.rs rename to lab1/zad6/src/main.rs diff --git a/zad6/src/mod_iter.c b/lab1/zad6/src/mod_iter.c similarity index 100% rename from zad6/src/mod_iter.c rename to lab1/zad6/src/mod_iter.c diff --git a/zad6/src/mod_rec.c b/lab1/zad6/src/mod_rec.c similarity index 100% rename from zad6/src/mod_rec.c rename to lab1/zad6/src/mod_rec.c diff --git a/zad7/.ccls b/lab1/zad7/.ccls similarity index 100% rename from zad7/.ccls rename to lab1/zad7/.ccls diff --git a/zad7/Cargo.lock b/lab1/zad7/Cargo.lock similarity index 100% rename from zad7/Cargo.lock rename to lab1/zad7/Cargo.lock diff --git a/zad7/Cargo.toml b/lab1/zad7/Cargo.toml similarity index 100% rename from zad7/Cargo.toml rename to lab1/zad7/Cargo.toml diff --git a/zad7/Makefile b/lab1/zad7/Makefile similarity index 100% rename from zad7/Makefile rename to lab1/zad7/Makefile diff --git a/zad7/c/main.c b/lab1/zad7/c/main.c similarity index 100% rename from zad7/c/main.c rename to lab1/zad7/c/main.c diff --git a/zad7/c/wrapper.h b/lab1/zad7/c/wrapper.h similarity index 100% rename from zad7/c/wrapper.h rename to lab1/zad7/c/wrapper.h diff --git a/zad7/src/iter.rs b/lab1/zad7/src/iter.rs similarity index 100% rename from zad7/src/iter.rs rename to lab1/zad7/src/iter.rs diff --git a/zad7/src/lib.rs b/lab1/zad7/src/lib.rs similarity index 100% rename from zad7/src/lib.rs rename to lab1/zad7/src/lib.rs diff --git a/zad7/src/rec.rs b/lab1/zad7/src/rec.rs similarity index 100% rename from zad7/src/rec.rs rename to lab1/zad7/src/rec.rs