Skip to content

Commit 9772eb7

Browse files
committed
examples: fix warnings when doing ./v -W -progress -check-syntax build-examples
1 parent a7e3092 commit 9772eb7

File tree

14 files changed

+201
-155
lines changed

14 files changed

+201
-155
lines changed

examples/2048/2048.v

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ enum Direction {
202202

203203
// Utility functions
204204
[inline]
205-
fn min(a, b int) int {
205+
fn min(a int, b int) int {
206206
if a < b {
207207
return a
208208
} else {
@@ -211,7 +211,7 @@ fn min(a, b int) int {
211211
}
212212

213213
[inline]
214-
fn max(a, b int) int {
214+
fn max(a int, b int) int {
215215
if a > b {
216216
return a
217217
} else {
@@ -229,7 +229,7 @@ fn abs(a int) int {
229229
}
230230

231231
[inline]
232-
fn avg(a, b int) int {
232+
fn avg(a int, b int) int {
233233
return (a + b) / 2
234234
}
235235

@@ -676,7 +676,7 @@ fn (app &App) draw_tiles() {
676676
}
677677
match app.tile_format {
678678
.normal {
679-
app.gg.draw_text(xpos, ypos, '${1<<tidx}', fmt)
679+
app.gg.draw_text(xpos, ypos, '${1 << tidx}', fmt)
680680
}
681681
.log {
682682
app.gg.draw_text(xpos, ypos, '$tidx', fmt)
@@ -693,7 +693,7 @@ fn (app &App) draw_tiles() {
693693
}
694694
.shifts {
695695
fs2 := int(f32(fmt.size) * 0.6)
696-
app.gg.draw_text(xpos, ypos, '2<<${tidx-1}', {
696+
app.gg.draw_text(xpos, ypos, '2<<${tidx - 1}', {
697697
fmt |
698698
size: fs2
699699
})

examples/concurrency/concurrency.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import sync
22
import time
33

44
// Simulate expensive computing using sleep function
5-
fn expensive_computing(id, duration int, mut wg sync.WaitGroup) {
6-
println('Executing expensive computing task (${id})...')
5+
fn expensive_computing(id int, duration int, mut wg sync.WaitGroup) {
6+
println('Executing expensive computing task ($id)...')
77
time.sleep_ms(duration)
8-
println('Finish task ${id} on ${duration} ms')
8+
println('Finish task $id on $duration ms')
99
wg.done()
1010
}
1111

examples/game_of_life/life.v

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
module main
2+
23
import time
34
import automaton
45

5-
fn print_automaton(a &automaton.Automaton){
6-
for y := 1; y<a.field.maxy; y++ {
6+
fn print_automaton(a &automaton.Automaton) {
7+
for y := 1; y < a.field.maxy; y++ {
78
mut s := ' '
8-
for x := 1; x<a.field.maxx; x++ {
9-
cell := a.field.get(x,y)
9+
for x := 1; x < a.field.maxx; x++ {
10+
cell := a.field.get(x, y)
1011
s += if cell == 1 { '@' } else { '.' }
1112
}
1213
println(s)
@@ -22,4 +23,3 @@ fn main() {
2223
time.sleep_ms(100)
2324
}
2425
}
25-

examples/game_of_life/life_gg.v

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,53 @@ import gx
55
import automaton
66

77
const (
8-
screen_width = 800
8+
screen_width = 800
99
screen_height = 600
10-
filled_color = gx.blue
11-
)
12-
13-
fn new_graphics() &gg.Context {
14-
glfw.init_glfw()
15-
return gg.new_context(gg.Cfg{
16-
width: screen_width
17-
height: screen_height
18-
use_ortho: true
19-
create_window: true
20-
resizable: false
21-
window_title: 'v life (with gg, glfw, gx)'
22-
window_user_ptr: 0
23-
})
24-
}
25-
26-
const (
27-
graphics = new_graphics()
10+
filled_color = gx.blue
2811
)
2912

3013
[live]
31-
fn print_automaton(a &automaton.Automaton){
32-
gg.clear(gx.white)
14+
fn print_automaton(app &App) {
3315
square_size := 18
34-
for y := 1; y<a.field.maxy; y++ {
35-
for x := 1; x<a.field.maxx; x++ {
36-
cell := a.field.get(x,y)
16+
for y := 1; y < app.a.field.maxy; y++ {
17+
for x := 1; x < app.a.field.maxx; x++ {
18+
cell := app.a.field.get(x, y)
3719
if cell == 1 {
38-
graphics.draw_rect(f32(square_size*x), f32(square_size*y), f32(square_size),
20+
app.gg.draw_rect(f32(square_size * x), f32(square_size * y), f32(square_size),
3921
f32(square_size), filled_color)
4022
}
4123
}
4224
}
4325
}
4426

27+
struct App {
28+
mut:
29+
gg &gg.Context
30+
a automaton.Automaton
31+
}
32+
33+
fn frame(mut app App) {
34+
app.gg.begin()
35+
app.a.update()
36+
print_automaton(app)
37+
app.gg.end()
38+
}
39+
4540
fn main() {
46-
mut a := automaton.gun()
47-
for {
48-
if graphics.window.should_close() { graphics.window.destroy() break }
49-
gg.post_empty_event() // needed so the animation does not stop
50-
///////////////////////////////////////////////
51-
a.update()
52-
print_automaton(a)
53-
graphics.render()
41+
mut app := App{
42+
gg: 0
43+
a: automaton.gun()
5444
}
45+
app.gg = gg.new_context({
46+
bg_color: gx.white
47+
frame_fn: frame
48+
user_data: &app
49+
width: screen_width
50+
height: screen_height
51+
use_ortho: true
52+
create_window: true
53+
resizable: false
54+
window_title: 'v life (with gg, gx)'
55+
})
56+
app.gg.run()
5557
}
Lines changed: 104 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,91 @@
11
module automaton
22

3-
/////////////////////////////////////////////////////////////
4-
3+
// ///////////////////////////////////////////////////////////
54
pub struct A2D {
65
pub mut:
76
maxx int
87
maxy int
98
data &int
109
}
11-
[inline] pub fn (a &A2D) set(x,y int, newval int) {
10+
11+
[inline]
12+
pub fn (a &A2D) set(x int, y int, newval int) {
1213
unsafe {
1314
mut e := &int(0)
14-
e = a.data + y*a.maxx + x
15+
e = a.data + y * a.maxx + x
1516
*e = newval
1617
}
1718
}
18-
[inline] pub fn (a &A2D) get(x,y int) int {
19+
20+
[inline]
21+
pub fn (a &A2D) get(x int, y int) int {
1922
unsafe {
2023
mut e := &int(0)
21-
e = a.data + y*a.maxx + x
24+
e = a.data + y * a.maxx + x
2225
return *e
2326
}
2427
}
25-
[inline] pub fn (a &A2D) clear() {
26-
for y := 0; y<a.maxy; y++ {
27-
for x := 0; x<a.maxx; x++ {
28-
a.set(x,y,0)
28+
29+
[inline]
30+
pub fn (a &A2D) clear() {
31+
for y := 0; y < a.maxy; y++ {
32+
for x := 0; x < a.maxx; x++ {
33+
a.set(x, y, 0)
2934
}
3035
}
3136
}
3237

33-
/////////////////////////////////////////////////////////////
34-
38+
// ///////////////////////////////////////////////////////////
3539
pub struct Automaton {
3640
pub mut:
37-
field &A2D
41+
field &A2D
3842
new_field &A2D
3943
}
4044

4145
fn new_automaton(f [][]int) Automaton {
4246
maxy := f.len
4347
mut maxx := 0
44-
for y := 0; y<f.len; y++ {
48+
for y := 0; y < f.len; y++ {
4549
if maxx < f[y].len {
4650
maxx = f[y].len
4751
}
4852
}
4953
size := (maxx * maxy)
50-
field := &A2D{ maxx: maxx maxy: maxy data: &int( vcalloc( 4 * (size) ) ) }
51-
new_field := &A2D{ maxx: maxx maxy: maxy data: &int( vcalloc( 4 * (size)) ) }
52-
for y in 0..field.maxy {
53-
for x in 0..field.maxx {
54-
field.set( x, y, f[y][x] )
54+
field := &A2D{
55+
maxx: maxx
56+
maxy: maxy
57+
data: &int(vcalloc(4 * (size)))
58+
}
59+
new_field := &A2D{
60+
maxx: maxx
61+
maxy: maxy
62+
data: &int(vcalloc(4 * (size)))
63+
}
64+
for y in 0 .. field.maxy {
65+
for x in 0 .. field.maxx {
66+
field.set(x, y, f[y][x])
5567
}
5668
}
57-
return Automaton{ field: field new_field: new_field }
69+
return Automaton{
70+
field: field
71+
new_field: new_field
72+
}
5873
}
5974

6075
pub fn (mut aa Automaton) update() {
6176
aa.new_field.clear()
62-
for y := 1; y<aa.field.maxy; y++ {
63-
for x := 1; x<aa.field.maxx; x++ {
64-
moore_sum := ( 0 +
65-
aa.field.get(x-1,y-1) + aa.field.get(x,y-1) + aa.field.get(x+1,y-1) +
66-
aa.field.get(x-1,y ) + 0 + aa.field.get(x+1,y ) +
67-
aa.field.get(x-1,y+1) + aa.field.get(x,y+1) + aa.field.get(x+1,y+1)
68-
)
69-
cell := aa.field.get(x,y)
70-
v := if cell == 1 {
71-
moore_sum in [2, 3]
77+
for y := 1; y < aa.field.maxy; y++ {
78+
for x := 1; x < aa.field.maxx; x++ {
79+
moore_sum := (0 + aa.field.get(x - 1, y - 1) + aa.field.get(x, y - 1) + aa.field.get(x +
80+
1, y - 1) + aa.field.get(x - 1, y) + 0 + aa.field.get(x + 1, y) + aa.field.get(x - 1, y + 1) +
81+
aa.field.get(x, y + 1) + aa.field.get(x + 1, y + 1))
82+
cell := aa.field.get(x, y)
83+
v := if cell == 1 { moore_sum in [2, 3] } else { moore_sum == 3 }
84+
aa.new_field.set(x, y, if v {
85+
1
7286
} else {
73-
moore_sum == 3
74-
}
75-
aa.new_field.set(x,y, if v { 1 } else { 0 })
87+
0
88+
})
7689
}
7790
}
7891
tmp := aa.field
@@ -82,35 +95,64 @@ pub fn (mut aa Automaton) update() {
8295

8396
pub fn gun() Automaton {
8497
mut field := [
85-
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
86-
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
87-
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
88-
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
89-
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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