real relative imports
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
// https://brainfuck.org/sierpinski.b
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// needs to be compiled with -m -C "-lraylib"
|
||||
include "std/io.zr"
|
||||
include "std/os.zr"
|
||||
include "$/io.zr"
|
||||
include "$/os.zr"
|
||||
|
||||
extern InitWindow
|
||||
extern SetTargetFPS
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
include "std/io.zr"
|
||||
include "std/net.zr"
|
||||
include "$/io.zr"
|
||||
include "$/net.zr"
|
||||
|
||||
func main[argc: i64, argv: ptr] : i64
|
||||
if argc < 2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
sum := 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
sum := 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
sum := 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
n := 600851475143
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
out := 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
out := 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
sum_of_squares := 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
found := 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
n := "7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
for a in 1..1000
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
sum := 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
include "std/io.zr"
|
||||
include "std/containers.zr"
|
||||
include "$/io.zr"
|
||||
include "$/containers.zr"
|
||||
|
||||
func main[] : i64
|
||||
N := 20
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func num_divisors[n: i64] : i64
|
||||
end := n->isqrt()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
n := 37107287533 + 46376937677 + 74324986199 + 91942213363 + 23067588207 + 89261670696 + 28112879812 + 44274228917 + 47451445736 + 70386486105 + 62176457141 + 64906352462 + 92575867718 + 58203565325 + 80181199384 + 35398664372 + 86515506006 + 71693888707 + 54370070576 + 53282654108 + 36123272525 + 45876576172 + 17423706905 + 81142660418 + 51934325451 + 62467221648 + 15732444386 + 55037687525 + 18336384825 + 80386287592 + 78182833757 + 16726320100 + 48403098129 + 87086987551 + 59959406895 + 69793950679 + 41052684708 + 65378607361 + 35829035317 + 94953759765 + 88902802571 + 25267680276 + 36270218540 + 24074486908 + 91430288197 + 34413065578 + 23053081172 + 11487696932 + 63783299490 + 67720186971 + 95548255300 + 76085327132 + 37774242535 + 23701913275 + 29798860272 + 18495701454 + 38298203783 + 34829543829 + 40957953066 + 29746152185 + 41698116222 + 62467957194 + 23189706772 + 86188088225 + 11306739708 + 82959174767 + 97623331044 + 42846280183 + 55121603546 + 32238195734 + 75506164965 + 62177842752 + 32924185707 + 99518671430 + 73267460800 + 76841822524 + 97142617910 + 87783646182 + 10848802521 + 71329612474 + 62184073572 + 66627891981 + 60661826293 + 85786944089 + 66024396409 + 64913982680 + 16730939319 + 94809377245 + 78639167021 + 15368713711 + 40789923115 + 44889911501 + 41503128880 + 81234880673 + 82616570773 + 22918802058 + 77158542502 + 72107838435 + 20849603980 + 53503534226
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func collatz_num[n: i64] : i64
|
||||
if n % 2 == 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
n := 40
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
include "std/io.zr"
|
||||
include "std/containers.zr"
|
||||
include "$/io.zr"
|
||||
include "$/containers.zr"
|
||||
|
||||
func main[] : i64
|
||||
n := [1]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
include "std/io.zr"
|
||||
include "std/containers.zr"
|
||||
include "$/io.zr"
|
||||
include "$/containers.zr"
|
||||
|
||||
func main[] : i64
|
||||
s1 := [0, 3, 3, 5, 4, 4, 3, 5, 5, 4]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
include "std/io.zr"
|
||||
include "std/containers.zr"
|
||||
include "$/io.zr"
|
||||
include "$/containers.zr"
|
||||
|
||||
func findmax[triangle: Array, row: i64, col: i64] : i64
|
||||
if row == 14
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func days[y: i64, m: i64] : i64
|
||||
if m == 2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
include "std/io.zr"
|
||||
include "std/containers.zr"
|
||||
include "$/io.zr"
|
||||
include "$/containers.zr"
|
||||
|
||||
func multiply[n: Array, x: i64] : void
|
||||
carry := 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func divisors_sum[n: i64] : i64
|
||||
k := n
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
a := 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
func main[] : i64
|
||||
for i in 1..40
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
include "std/io.zr"
|
||||
include "std/os.zr"
|
||||
include "$/io.zr"
|
||||
include "$/os.zr"
|
||||
|
||||
func main[] : i64
|
||||
answer := os.urandom_i64()->abs() % 100
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// needs to be compiled with -m -C "-lraylib"
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
extern InitWindow
|
||||
extern SetTargetFPS
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
include "std/io.zr"
|
||||
include "std/containers.zr"
|
||||
include "$/io.zr"
|
||||
include "$/containers.zr"
|
||||
|
||||
func rule110_step[state: Array] : void
|
||||
new_state := []
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// needs to be compiled with -m -C "-lpthread"
|
||||
include "std/net.zr"
|
||||
include "$/net.zr"
|
||||
|
||||
extern pthread_create
|
||||
extern pthread_detach
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// needs to be compiled with -m -C "-lsqlite3"
|
||||
include "std/io.zr"
|
||||
include "$/io.zr"
|
||||
|
||||
extern sqlite3_open
|
||||
extern sqlite3_exec
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
include "std/io.zr"
|
||||
include "std/net.zr"
|
||||
include "$/io.zr"
|
||||
include "$/net.zr"
|
||||
|
||||
func main[] : i64
|
||||
s, ok := net.create_udp_server("127.0.0.1", 8000)
|
||||
|
||||
Reference in New Issue
Block a user