moved some things around :3

This commit is contained in:
jacekpoz 2024-03-22 13:11:09 +01:00
parent 26a7b3d447
commit 17446b9b1d
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8
59 changed files with 116 additions and 3 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

4
.gitignore vendored
View file

@ -1,3 +1 @@
.ccls-cache/
*/.ccls-cache/
*/target/
.direnv/

26
flake.lock Normal file
View file

@ -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
}

40
flake.nix Normal file
View file

@ -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
];
};
}
);
};
}

4
lab0/HelloWorld.hs Normal file
View file

@ -0,0 +1,4 @@
module Main where
main :: IO ()
main = putStrLn "Hello, World!"

5
lab0/HelloWorld.java Normal file
View file

@ -0,0 +1,5 @@
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}

7
lab0/hello-world.go Normal file
View file

@ -0,0 +1,7 @@
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}

6
lab0/hello_world.adb Normal file
View file

@ -0,0 +1,6 @@
with Ada.Text_IO;
procedure Hello_World is
begin
Ada.Text_IO.Put_Line ("Hello, World!");
end Hello_World;

6
lab0/helloworld.c Normal file
View file

@ -0,0 +1,6 @@
#include <stdio.h>
int main(void) {
printf("Hello, World!\n");
return 0;
}

6
lab0/helloworld.cpp Normal file
View file

@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "Hello, World!\n";
return 0;
}

4
lab0/helloworld.lisp Normal file
View file

@ -0,0 +1,4 @@
(defun helloworld ()
(format t "Hello, World!~%"))
(helloworld)

6
lab0/helloworld.pl Normal file
View file

@ -0,0 +1,6 @@
main :-
write("Hello, World!").
:- main.
% vi: ft=prolog

1
lab0/helloworld.sml Normal file
View file

@ -0,0 +1 @@
print "Hello, World!\n";

3
lab1/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
.ccls-cache/
*/.ccls-cache/
*/target/