Utoljára aktív 1730513051

sierra's Avatar sierra gist felülvizsgálása 1730513051. Revízióhoz ugrás

1 file changed, 2 insertions, 2 deletions

rgb400_ungolfed

@@ -44,9 +44,9 @@
44 44
45 45 |--| Main loop.
46 46 |draw, end of line, x| draw, end of line, draw
47 - |draw, end of line| draw, end of screen?, @display
47 + |draw, end of line| draw, end of screen?, plot_pixel, @display
48 48 |draw, ~end of line| plot_pixel, x-, draw
49 - |draw, end of screen| plot_pixel, x:399, y:399
49 + |draw, end of screen| plot_pixel, x:399, y:399, @display
50 50 |draw, ~end of screen, x| draw, ~end of screen
51 51 |draw, ~end of screen| y-,x:399, draw
52 52 |draw| end of line?, draw

sierra's Avatar sierra gist felülvizsgálása 1730506816. Revízióhoz ugrás

1 file changed, 4 insertions, 1 deletion

rgb400_ungolfed

@@ -37,7 +37,10 @@
37 37 |set pixel| @set-pixel
38 38
39 39 |--| Move the `x/y` coordinates.
40 - |x-,x||x-||y-,y||y-|
40 + |x-,x|
41 + |x-|
42 + |y-,y|
43 + |y-|
41 44
42 45 |--| Main loop.
43 46 |draw, end of line, x| draw, end of line, draw

sierra's Avatar sierra gist felülvizsgálása 1730506685. Revízióhoz ugrás

1 file changed, 2 insertions, 1 deletion

rgb400_ungolfed

@@ -40,7 +40,6 @@
40 40 |x-,x||x-||y-,y||y-|
41 41
42 42 |--| Main loop.
43 - ||x:399,y:399
44 43 |draw, end of line, x| draw, end of line, draw
45 44 |draw, end of line| draw, end of screen?, @display
46 45 |draw, ~end of line| plot_pixel, x-, draw
@@ -53,4 +52,6 @@
53 52 |x|
54 53 |y|
55 54
55 + |--| run the program
56 + ||x:399,y:399
56 57 ||draw

sierra's Avatar sierra gist felülvizsgálása 1730506640. Revízióhoz ugrás

1 file changed, 35 insertions, 27 deletions

rgb400_ungolfed

@@ -1,48 +1,56 @@
1 1 |--| Are we at the end of a line?
2 - | end of line?,x|x, ~end of line| end of line?| end of line
2 + |end of line?, x| x, ~end of line
3 + |end of line?| end of line
3 4
4 5 |--| Are we at the end of the screen?
5 - | end of screen?,y|y, ~end of screen| end of screen?| end of screen
6 + |end of screen?, y| y, ~end of screen
7 + |end of screen?| end of screen
6 8
7 - |--| Co pixel_y the pixel coordinates from `x/y` to `@pixel-x/@pixel-y`.
8 - | pixel_x=x,x|*x,@pixel-x, pixel_x=x
9 - | pixel_x=x|
10 - | pixel_y=y,y|*y,@pixel-y, pixel_y=y
11 - | pixel_y=y|
9 + |--| Copy the pixel coordinates from `x/y` to `@pixel-x/@pixel-y`.
10 + |pixel_x=x, x|*x, @pixel-x, pixel_x=x
11 + |pixel_x=x|
12 + |pixel_y=y, y|*y, @pixel-y, pixel_y=y
13 + |pixel_y=y|
12 14
13 15 |--| Compute some pixel colors based on the `x/y` coordinates.
14 16 |--| r = x, g = y, b = x + y
15 - | pixel_red=x,x|*x,@pixel-r, pixel_red=x| pixel_red=x|
16 - | pixel_green=y,y|*y,@pixel-g, pixel_green=y| pixel_green=y|
17 - | pixel_blue=x+y,x|*x,@pixel-b, pixel_blue=x+y
18 - | pixel_blue=x+y,y|*y,@pixel-b, pixel_blue=x+y
19 - | pixel_blue=x+y|
17 + |pixel_red=x, x| *x, @pixel-r, pixel_red=x
18 + |pixel_red=x|
19 +
20 + |pixel_green=y, y| *y, @pixel-g, pixel_green=y
21 + |pixel_green=y|
22 +
23 + |pixel_blue=x+y, x| *x, @pixel-b, pixel_blue=x+y
24 + |pixel_blue=x+y, y| *y, @pixel-b, pixel_blue=x+y
25 + |pixel_blue=x+y|
20 26
21 27 |--| Copy temporaries back to their respective variables.
22 - |*x|x|*y|y
28 + |*x|x
29 + |*y|y
23 30
24 31 |plot_pixel| pixel_x, pixel_y, pixel_red, pixel_green, pixel_blue, set pixel
25 - | pixel_x | pixel_x=x:399
26 - | pixel_y | pixel_y=y:399
27 - | pixel_red | pixel_red=x:399
28 - | pixel_green | pixel_green=y:399
29 - | pixel_blue | pixel_blue=x+y:399
30 - | set pixel | @set-pixel
32 + |pixel_x| pixel_x=x:399
33 + |pixel_y| pixel_y=y:399
34 + |pixel_red| pixel_red=x:399
35 + |pixel_green| pixel_green=y:399
36 + |pixel_blue| pixel_blue=x+y:399
37 + |set pixel| @set-pixel
31 38
32 39 |--| Move the `x/y` coordinates.
33 40 |x-,x||x-||y-,y||y-|
34 41
35 42 |--| Main loop.
36 43 ||x:399,y:399
37 - |draw, end of line,x |draw, end of line,draw
38 - |draw, end of line |draw, end of screen?, @display
39 - |draw, ~end of line |plot_pixel,x-,draw
40 - |draw, end of screen |plot_pixel,x:399,y:399
41 - |draw, ~end of screen, x |draw, ~end of screen
42 - |draw, ~end of screen |y-,x:399,draw
43 - |draw| end of line?,draw
44 + |draw, end of line, x| draw, end of line, draw
45 + |draw, end of line| draw, end of screen?, @display
46 + |draw, ~end of line| plot_pixel, x-, draw
47 + |draw, end of screen| plot_pixel, x:399, y:399
48 + |draw, ~end of screen, x| draw, ~end of screen
49 + |draw, ~end of screen| y-,x:399, draw
50 + |draw| end of line?, draw
44 51
45 52 |--| clean up remaining facts
46 - |x||y|
53 + |x|
54 + |y|
47 55
48 56 ||draw

sierra's Avatar sierra gist felülvizsgálása 1730504340. Revízióhoz ugrás

1 file changed, 8 insertions, 8 deletions

rgb400_ungolfed

@@ -1,8 +1,8 @@
1 1 |--| Are we at the end of a line?
2 - | end of line?,x|x,~ end of line| end of line?| end of line
2 + | end of line?,x|x, ~end of line| end of line?| end of line
3 3
4 4 |--| Are we at the end of the screen?
5 - | end of screen?,y|y,~ end of screen| end of screen?| end of screen
5 + | end of screen?,y|y, ~end of screen| end of screen?| end of screen
6 6
7 7 |--| Co pixel_y the pixel coordinates from `x/y` to `@pixel-x/@pixel-y`.
8 8 | pixel_x=x,x|*x,@pixel-x, pixel_x=x
@@ -34,12 +34,12 @@
34 34
35 35 |--| Main loop.
36 36 ||x:399,y:399
37 - |draw, end of line,x|draw, end of line,draw
38 - |draw, end of line|draw, end of screen?, @display
39 - |draw,~ end of line|plot_pixel,x-,draw
40 - |draw, end of screen|plot_pixel,x:399,y:399
41 - |draw,~ end of screen,x|draw,~ end of screen
42 - |draw,~ end of screen|y-,x:399,draw
37 + |draw, end of line,x |draw, end of line,draw
38 + |draw, end of line |draw, end of screen?, @display
39 + |draw, ~end of line |plot_pixel,x-,draw
40 + |draw, end of screen |plot_pixel,x:399,y:399
41 + |draw, ~end of screen, x |draw, ~end of screen
42 + |draw, ~end of screen |y-,x:399,draw
43 43 |draw| end of line?,draw
44 44
45 45 |--| clean up remaining facts

sierra's Avatar sierra gist felülvizsgálása 1730504285. Revízióhoz ugrás

1 file changed, 7 insertions, 7 deletions

rgb400_ungolfed

@@ -21,13 +21,13 @@
21 21 |--| Copy temporaries back to their respective variables.
22 22 |*x|x|*y|y
23 23
24 - |plot_pixel| pixel_x, pixel_y, pixel_red, pixel_green, pixel_blue,ps
25 - | pixel_x| pixel_x=x:399
26 - | pixel_y| pixel_y=y:399
27 - | pixel_red| pixel_red=x:399
28 - | pixel_green| pixel_green=y:399
29 - | pixel_blue| pixel_blue=x+y:399
30 - |ps|@set-pixel
24 + |plot_pixel| pixel_x, pixel_y, pixel_red, pixel_green, pixel_blue, set pixel
25 + | pixel_x | pixel_x=x:399
26 + | pixel_y | pixel_y=y:399
27 + | pixel_red | pixel_red=x:399
28 + | pixel_green | pixel_green=y:399
29 + | pixel_blue | pixel_blue=x+y:399
30 + | set pixel | @set-pixel
31 31
32 32 |--| Move the `x/y` coordinates.
33 33 |x-,x||x-||y-,y||y-|

sierra's Avatar sierra gist felülvizsgálása 1730504229. Revízióhoz ugrás

1 file changed, 2 insertions, 2 deletions

rgb400_ungolfed

@@ -18,10 +18,9 @@
18 18 | pixel_blue=x+y,y|*y,@pixel-b, pixel_blue=x+y
19 19 | pixel_blue=x+y|
20 20
21 - |--| Co pixel_y temporaries back to their respective variables.
21 + |--| Copy temporaries back to their respective variables.
22 22 |*x|x|*y|y
23 23
24 - |--| Plot a pixel.
25 24 |plot_pixel| pixel_x, pixel_y, pixel_red, pixel_green, pixel_blue,ps
26 25 | pixel_x| pixel_x=x:399
27 26 | pixel_y| pixel_y=y:399
@@ -43,6 +42,7 @@
43 42 |draw,~ end of screen|y-,x:399,draw
44 43 |draw| end of line?,draw
45 44
45 + |--| clean up remaining facts
46 46 |x||y|
47 47
48 48 ||draw

sierra's Avatar sierra gist felülvizsgálása 1730504167. Revízióhoz ugrás

1 file changed, 48 insertions

rgb400_ungolfed(fájl létrehozva)

@@ -0,0 +1,48 @@
1 + |--| Are we at the end of a line?
2 + | end of line?,x|x,~ end of line| end of line?| end of line
3 +
4 + |--| Are we at the end of the screen?
5 + | end of screen?,y|y,~ end of screen| end of screen?| end of screen
6 +
7 + |--| Co pixel_y the pixel coordinates from `x/y` to `@pixel-x/@pixel-y`.
8 + | pixel_x=x,x|*x,@pixel-x, pixel_x=x
9 + | pixel_x=x|
10 + | pixel_y=y,y|*y,@pixel-y, pixel_y=y
11 + | pixel_y=y|
12 +
13 + |--| Compute some pixel colors based on the `x/y` coordinates.
14 + |--| r = x, g = y, b = x + y
15 + | pixel_red=x,x|*x,@pixel-r, pixel_red=x| pixel_red=x|
16 + | pixel_green=y,y|*y,@pixel-g, pixel_green=y| pixel_green=y|
17 + | pixel_blue=x+y,x|*x,@pixel-b, pixel_blue=x+y
18 + | pixel_blue=x+y,y|*y,@pixel-b, pixel_blue=x+y
19 + | pixel_blue=x+y|
20 +
21 + |--| Co pixel_y temporaries back to their respective variables.
22 + |*x|x|*y|y
23 +
24 + |--| Plot a pixel.
25 + |plot_pixel| pixel_x, pixel_y, pixel_red, pixel_green, pixel_blue,ps
26 + | pixel_x| pixel_x=x:399
27 + | pixel_y| pixel_y=y:399
28 + | pixel_red| pixel_red=x:399
29 + | pixel_green| pixel_green=y:399
30 + | pixel_blue| pixel_blue=x+y:399
31 + |ps|@set-pixel
32 +
33 + |--| Move the `x/y` coordinates.
34 + |x-,x||x-||y-,y||y-|
35 +
36 + |--| Main loop.
37 + ||x:399,y:399
38 + |draw, end of line,x|draw, end of line,draw
39 + |draw, end of line|draw, end of screen?, @display
40 + |draw,~ end of line|plot_pixel,x-,draw
41 + |draw, end of screen|plot_pixel,x:399,y:399
42 + |draw,~ end of screen,x|draw,~ end of screen
43 + |draw,~ end of screen|y-,x:399,draw
44 + |draw| end of line?,draw
45 +
46 + |x||y|
47 +
48 + ||draw
Újabb Régebbi