1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

888 Commits

Author SHA1 Message Date
Daniel Däschle
dbf84520f1
all: update assoc syntax (#8274) 2021-01-22 23:24:48 +01:00
Delyan Angelov
12897d1e2b
examples: fix ./v -W -Wfatal-errors build-examples, run vfmt 2021-01-22 22:33:37 +02:00
Emeric MARTINEAU
081e3c46b4
cli: allow flag to be set multi time (#8256) 2021-01-22 19:03:02 +02:00
shadowninja55
a569dc17e8
gg: allow fonts loaded with $embed_file() to be used (#8263) 2021-01-21 23:07:47 +02:00
shadowninja55
d1286dbf18
examples: add snek (a snake game) (#8257) 2021-01-21 18:34:42 +02:00
Louis Schmieder
f7c251f8f3
vweb: add multipart/form-data parser and file upload (#8160) 2021-01-21 11:08:51 +01:00
Delyan Angelov
d9532eda30
checker: error on a.slice(x,y) outside builtin 2021-01-19 15:55:52 +02:00
Ruofan XU
103901a5cb
example/test: add a binary search tree example and test (#8145) 2021-01-19 15:18:38 +02:00
Sun Junyi
048d8edf62
examples: update mini_calculator.v (#8182) 2021-01-18 18:40:47 +02:00
Lukas Neubert
ac2c3847af
all: update copyright to 2019-2021 (#8029) 2021-01-18 13:20:06 +01:00
Louis Schmieder
38881e4b20
vweb: Implement chunked encoding transfer (#8179) 2021-01-18 13:04:21 +01:00
Larpon
512f62b7a1
android: enable custom (e)println output via android log system (#8135) 2021-01-17 05:32:59 +01:00
Larpon
4044abef0e
tetris: enable to run on android, run v fmt (#8136) 2021-01-17 05:28:09 +01:00
Delyan Angelov
5c3ef588c3
live: move to vlib/v/live 2021-01-16 15:05:01 +02:00
Delyan Angelov
0da40c4ea9
examples: use Empty instead of Leaf in tree_of_nodes.v 2021-01-15 11:15:29 +02:00
Delyan Angelov
944bb294e3
examples: add tree_of_nodes.v, based on a type Tree = Leaf | Node sumtype 2021-01-15 10:09:44 +02:00
yuyi
a2efb5319d
all: change [1,2,3]!! to [1,2,3]! (#8101) 2021-01-14 03:51:13 +01:00
yuyi
a1c67232d0
checker: fix duplicate variable name (fix #265) (#7982) 2021-01-10 21:41:29 +01:00
Delyan Angelov
692a718428
examples: use os.resource_abs_path, so v run examples/ttf_font/example_ttf.v works 2021-01-10 20:36:50 +02:00
penguindark
c067cc0357
vlib: add a TTF font loader and render in x.ttf (#7995) 2021-01-10 20:14:41 +02:00
Don Alfons Nisnoni
d645e45752
mysql: add more documentation (#7846) 2021-01-09 10:40:21 +02:00
Swastik Baranwal
9291fb5e0c
checker: disallow comparison between enum and int (#7886) 2021-01-08 17:41:52 +01:00
Daniel Däschle
5dbc19410c
examples: fix vweb assets example (#7949) 2021-01-07 20:46:23 +01:00
Tomas Hellström
f9a873736e
x.websocket: server broadcast plus examples (#7922) 2021-01-06 15:43:54 +01:00
Delyan Angelov
3a357d9718
gg: add examples/gg/stars.v 2021-01-04 12:19:05 +02:00
Leandro Silva
86df5cd1a9
examples: C interop for HTML to PDF conversion using libwkhtmltox (#7751) 2021-01-03 16:56:55 +01:00
Don Alfons Nisnoni
e943d03298
mysql: migrate connection flags to enum instead of const, fix example (#7803) 2021-01-02 15:09:20 +02:00
Alexander Medvednikov
7bcc5afbb6 ci: run tutorial 2021-01-01 20:25:49 +01:00
Daniel Däschle
5ae3637d27
checker: revert embedded methods fix (#7780) 2021-01-01 14:36:07 +01:00
spaceface
480d78de2e
examples/2048: make tiles have rounded corners (#7763) 2021-01-01 13:04:51 +02:00
Alexander Medvednikov
2bc9ee4d88 vweb: more updates 2020-12-31 17:47:20 +01:00
Alexander Medvednikov
2533c706ae vweb: migrate all tests and examples to the new syntax 2020-12-31 17:22:47 +01:00
Alexander Medvednikov
3ffdcd8910 vweb: embed context 2020-12-31 17:07:27 +01:00
Delyan Angelov
cf978ca1ac
flappylearning: set app.timer_period_ms to 0 with 0 key 2020-12-31 17:51:52 +02:00
Delyan Angelov
06766fd0eb
flappylearning: toggle update period with space, exit with esc 2020-12-31 17:46:50 +02:00
Alexander Medvednikov
0d43ff2453 parser: fix `for i, mut val in vals {; examples: vfmt flappybird 2020-12-27 12:02:18 +01:00
uxnow
e69e5c5b91
examples: add flappylearning to examples (#7605) 2020-12-27 11:19:32 +01:00
Alexander Medvednikov
9f964c9ce0 examples: fix spectral.v 2020-12-21 08:50:31 +01:00
Delyan Angelov
c2064b2cc0 ci: more args = os.args fixes 2020-12-20 19:01:15 +02:00
penguindark
a6baffcb8c
regex: lots of fixes (#7380) 2020-12-18 05:57:31 +01:00
Emily Hudson
553ecf63e7
vlib/io: fix reader bugs, make read_all take a config struct (#7361) 2020-12-16 18:22:26 +01:00
Delyan Angelov
e3a1756b11
net: add tcp_default_read_timeout and tcp_default_write_timeout and use them consistently 2020-12-15 17:54:51 +02:00
Daniel Däschle
11808f9fa3
parser: fix silent errors (#7271) 2020-12-12 04:06:09 +01:00
penguindark
6b7d7cee0c
regex: new examples, new utility functions (#7150) 2020-12-05 22:24:08 +01:00
Delyan Angelov
3f2133c65e
examples,tools: cleanup most warnings 2020-12-04 16:05:39 +02:00
nyx-litenite
36240b2284
examples: term.ui: vyper (a simple snake game) (#6943) 2020-11-27 20:55:53 +01:00
Alexander Medvednikov
f135a9949c ci: build tetris with -autofree 2020-11-27 20:41:17 +01:00
Alexander Medvednikov
5efd393af2 all: make comptime templates usable outside of vweb via $tmpl 2020-11-26 18:40:35 +01:00
spaceface777
e03ae19372
term.ui: approximate colors into ansi if rgb isn't supported (#6951) 2020-11-26 00:28:57 +01:00
Alexander Medvednikov
23c9563600 examples/tetris: remove old array hacks 2020-11-24 18:14:44 +01:00
Lukas Neubert
df4165c7ee
docs_ci: check all md files except thirdparty (#6855) 2020-11-18 18:28:28 +01:00
Larpon
9f5a3b52a7
all: optimize png images (#6860) 2020-11-17 17:42:21 +01:00
Larpon
4a31b5702e
examples: term.ui: add readme, copyright, and pong screenshot (#6858) 2020-11-17 17:41:54 +01:00
Larpon
f44853a87f
examples: term.ui - add a pong clone (#6857) 2020-11-17 15:25:41 +01:00
Larpon
0c54ebdf41
text_editor: add magnet cursor position (#6843) 2020-11-16 14:51:39 +02:00
Emily Hudson
cd2a2cef25
vlib/net: add buffered IO, x.net -> net (#6754) 2020-11-15 22:54:47 +02:00
Delyan Angelov
c8b7cfc297 examples: small fix for ctrl-right at the last word of a line 2020-11-15 14:49:55 +02:00
spaceface777
dcbb285ae4
examples: text editor: implement ctrl+arrows to move by word (#6838) 2020-11-15 13:33:08 +01:00
spaceface777
1ead130eed
term.ui: render to the alternate buffer (#6832) 2020-11-14 21:05:22 +02:00
Carlos Esquerdo Bernat
827fb62c29
examples/text_editor: edit multiple files (#6827) 2020-11-14 19:39:59 +02:00
spaceface777
ec3b96924f
examples/text_editor: make scrolling smoother (#6819) 2020-11-14 09:21:46 +02:00
spaceface777
6b47c61fe4
term.ui: handle middle mouse button events and modifier keys (#6821) 2020-11-14 09:14:54 +02:00
spaceface777
eacd6b5d54
examples/text_editor: minor cleanup and simplifications (#6818) 2020-11-13 19:18:05 +02:00
Larpon
b02f03e20a
examples: add a simple text editor example to term.ui (#6808) 2020-11-13 15:27:12 +01:00
spaceface777
c315218ed1
term.ui: allow setting the terminal title (#6809) 2020-11-13 15:30:47 +02:00
Delyan Angelov
a3404a38c6 term_drawing.v: support arrows, 1, 2 and space 2020-11-13 13:08:28 +02:00
pancake
862cae5b02
term: handle keyboard keys in the term_drawing example (#6810) 2020-11-13 11:49:09 +02:00
spaceface777
24f743ee12
term: add term.ui module (part 2) (#6798) 2020-11-12 12:12:51 +01:00
Delyan Angelov
cd399b7e6e examples: cleanup up the life automaton implementation 2020-11-04 10:00:59 +02:00
Delyan Angelov
9772eb7c96 examples: fix warnings when doing ./v -W -progress -check-syntax build-examples 2020-10-26 13:14:26 +02:00
Quentin Champ
4bc38a2f6c
examples: apply todo suggestion in word counter (#6640) 2020-10-18 22:46:13 +02:00
Delyan Angelov
2f149e6984 vfmt: fix merged param warnings in sokol's particles example and vlib/x/net/udp.v 2020-10-18 13:45:13 +03:00
Delyan Angelov
8b2e704741 examples: make v -prod build-examples pass without warnings/errors 2020-10-18 09:48:13 +03:00
Delyan Angelov
67ecc04580 examples: build examples/hello_v_js.v without warnings/errors 2020-10-18 09:33:55 +03:00
Delyan Angelov
b7233a23d7 examples: build examples/path_tracing.v with -prod, with no warnings/errors 2020-10-18 09:00:30 +03:00
Delyan Angelov
3795aaab5c v test-fmt: reformat some skipped files, comment on the remaining ones 2020-10-15 00:39:09 +03:00
Delyan Angelov
46c5a2c8fc v test-fmt: fix some embedded comments in expressions 2020-10-14 22:52:33 +03:00
Larpon
05ec32c331
examples: fix sokol/particles to start up faster (#6610) 2020-10-13 13:16:51 +03:00
Delyan Angelov
77c29c6b6f examples: add simple visual rendering of the samples in melody.v 2020-10-10 23:45:40 +03:00
Delyan Angelov
86816b1aad examples: add bytebeat melody using sokol.audio 2020-10-10 19:37:03 +03:00
Nicolas Sauzede
8d2f22affe
tetris: display lines (#6533) 2020-10-02 16:42:05 +03:00
Nicolas Sauzede
a0aedfbe5c
tetris: display next tetro (#6532) 2020-10-02 16:37:00 +03:00
Nicolas Sauzede
1ddf46f3c6
tetris: add ghost piece (#6531) 2020-10-02 09:30:15 +02:00
Lukas Neubert
94cf8ef1d8
examples: update v_script.vsh (#6515) 2020-10-02 05:18:08 +02:00
Larpon
0e2f267805
examples: add support for transparency / opacity / alpha in particle example (#6488) 2020-09-28 06:14:15 +02:00
Daniel Däschle
06cade6c31
all: change .ReturnType and .Type to .return_type and .typ (#6494) 2020-09-28 06:13:38 +02:00
Delyan Angelov
71e1ca72ec examples/2048: run v -w fmt 2048.v 2020-09-27 22:47:26 +03:00
spaceface777
faca9e2f06
examples/2048: new end screens with alpha, better touch support (#6482) 2020-09-26 09:54:04 +03:00
Alexander Medvednikov
0cdeaaff6b examples: make 2048 compile 2020-09-23 20:50:03 +02:00
Delyan Angelov
99e607d3ac examples/2048: limit the simulation depth in auto mode to 8 2020-09-23 09:26:22 +03:00
Delyan Angelov
46be0710ac examples/2048: add a simple Monte Carlo player on a 2020-09-22 17:32:35 +03:00
Alexander Medvednikov
8c8fe02000 gg: mouse_move, mouse_down 2020-09-21 02:42:53 +02:00
Alexander Medvednikov
6bf1865678
examples: add a link to the 2048 WA demo 2020-09-20 19:31:16 +02:00
Delyan Angelov
d4fbf422b3 gg: support transparency for rect/triangle/etc primitives too 2020-09-20 12:05:30 +03:00
Delyan Angelov
b4535acbac examples: move the particle module in modules/particle
The goal is enabling running `v build-examples` from outside vroot.
The modules/ folders are already skipped when building examples.
2020-09-18 19:06:04 +03:00
Ruofan XU
11f10fdce2
examples: minor optimization of calculator (#6367) 2020-09-17 02:14:26 +03:00
Lukas Neubert
2464deec82
cli: improvements to help and error messages (#6375) 2020-09-16 22:01:44 +02:00
Ruofan XU
e8909cced0
examples: add regex_with_memoization.v (#6355) 2020-09-12 09:51:30 +03:00
Major Taylor
99a46c8657
2048: fixed movement bug and show score at end (#6353) 2020-09-12 09:25:44 +03:00
spaceface777
4aaeaa4331
examples/2048: some updates and improvements (#6343) 2020-09-11 13:19:38 +03:00
bpryer
3f7970db52
term: add get_cursor_position and set_terminal_title (#6279)
* added functions

added:
  - get_cursor_position()
  - set_terminal_title(title string)

* implement term.get_cursor_position and term.set_terminal_title on unix

* Cleanup

* make x,y fields of term.Coord mutable

* fix vrepl compilation

* use more descriptive var names in term_test.v

* do not change the current terminal title in dumb terminals; do not test term.set_terminal_title outside of CI

* unix: in term.set_terminal_title, return true even for dumb terminals

Co-authored-by: Brent Pryer <brent@pryermachine.com>
Co-authored-by: Delyan Angelov <delian66@gmail.com>
2020-09-08 22:00:10 +03:00
Enzo
18034bb95c
gen: fix multiple call of expression in match (#6324) 2020-09-08 00:38:24 +02:00
spaceface777
35cbca96e1
checker: implement [required] struct field attribute (#6276) 2020-08-31 23:15:40 +02:00
Delyan Angelov
ea31c2a643 examples: fix graph for hdpi screens 2020-08-30 19:58:15 +03:00
pancake
a1dcc3bb9f
examples: make the graph example resizable, use cooler lines (#6267) 2020-08-30 19:11:59 +03:00
Delyan Angelov
2b545f6b90 examples: fix compilation of the graph.v example 2020-08-29 10:14:25 +03:00
Allie
1d39116a6e
examples: fix a typo in the cli example (#6237) 2020-08-27 23:15:49 +03:00
spaceface777
eff319f869
comp_for: allow checking full mehod and arg types (#5997) 2020-08-27 15:00:44 +02:00
Delyan Angelov
f5c245ceb8 ci: fix v build-examples too 2020-08-27 14:35:26 +03:00
Alexander Medvednikov
6921d46185 all: rune type for `` literals 2020-08-27 06:46:37 +02:00
Delyan Angelov
912bc8bca1 2048: fix crash, when compiled with gcc > 6 and -prod 2020-08-24 11:12:52 +03:00
Delyan Angelov
dad2c6608e examples: implement examples/sokol/sounds/wav_player.v 2020-08-23 20:49:37 +03:00
Charadon
bb60b4227e
examples: vfmt calculator.v 2020-08-23 16:18:37 +02:00
Delyan Angelov
1c9e02094c sokol.audio: add simple_sin_tones.v example 2020-08-23 15:28:07 +03:00
Alexander Medvednikov
542b149290 sokol: fix examples and remove copy pasta 2020-08-23 07:47:50 +02:00
Swastik Baranwal
b2e79dbebd
parser: add an error for import mod.sub as mod and import mod as mod (#6194) 2020-08-23 02:12:25 +02:00
Daniel Däschle
fcc61a981d
all: TypeSymbol.source_name (#6187) 2020-08-22 12:29:15 +02:00
Tomas Hellström
fb148e0b61
x.websockets: new websockets module on top of x.net (#6189) 2020-08-22 00:50:38 +02:00
Lukas Neubert
93e6c3df6a
cli: various improvements (#6180) 2020-08-20 23:14:53 +02:00
Emily Hudson
b88569c845
x.net: new net module (#6130) 2020-08-20 23:01:37 +02:00
Lukas Neubert
eabc2daf86
v.mod: remove commas; add example for v.vmod (#6169) 2020-08-19 16:07:10 +02:00
Lukas Neubert
e6e1011e47
examples: cli: more readable and informative program output (#6168) 2020-08-19 14:38:45 +02:00
Larpon
d9aae023b1
android: initial support for C output using sokol_main (#6164) 2020-08-19 11:00:15 +02:00
spaceface777
c1651bd271
gg: fixes and Android support (#6161) 2020-08-19 07:10:42 +02:00
Delyan Angelov
ed156838e6 examples: add 2048 game 2020-08-18 09:29:43 +03:00
Delyan Angelov
b22711ef33 examples/gg/rectangles.v: add missing logo.png picture 2020-08-05 19:56:01 +03:00
Alexander Medvednikov
ecaccafd31 gg: image cache 2020-08-05 16:00:24 +02:00
Wertzui123
c261408f54
examples: remove unused import (#6063) 2020-08-05 05:11:58 +02:00
Alexander Medvednikov
f3ebd3a6e7 gg: fix image rendering 2020-08-05 03:15:40 +02:00
Alexander Medvednikov
60c642f42d gg: clean up draw_image() 2020-08-04 01:26:56 +02:00
Alexander Medvednikov
79b70006e6 examples: simplify gg/rectangles.v 2020-08-02 17:01:10 +02:00
Alexander Medvednikov
fb4550e582 gg: new create_image() (part 1) 2020-08-01 23:40:28 +02:00
Delyan Angelov
9c9533dad9
checker: add error for fn f() Struct { return &Struct{} } (#6019) 2020-07-29 21:40:43 +02:00
Steve Phillips
b5de19dc03
examples/concurrency: cleanup (#6018) 2020-07-29 20:11:08 +03:00
Louis Schmieder
b58b15993c
gen: compile time for (methods and fields) (#5957) 2020-07-25 00:02:44 +02:00
Delyan Angelov
bfca55b87a examples: fix v build-examples 2020-07-24 13:29:47 +03:00
Delyan Angelov
5acc437367 examples: fix compilation 2020-07-24 12:34:19 +03:00
Iman
d820a97c83
examples: update vcasino.v (#5880) 2020-07-22 20:45:55 +03:00
Delyan Angelov
ebbc7bd471 examples: fix crash when running examples/ws/client.v outside of valgrind 2020-07-22 18:42:57 +03:00
Carlos Esquerdo Bernat
38aa5d6930
websocket example: cleanup and simplify (3/4) (#5923) 2020-07-22 17:44:56 +03:00
Carlos Esquerdo Bernat
6dbc143d67
websocket: move ws example to examples folder (#5875) 2020-07-21 00:55:58 +02:00
Ruofan XU
53e7cb124d
example: make quick_sort generic (#5898) 2020-07-20 20:17:01 +03:00
Nedim
b3011b4f19
examples: add example for using the SMTP module (#5870) 2020-07-18 15:59:54 +03:00
Daniel Däschle
c5dc1a33b6
all: remove it smartcast and replace with original variable name (#5764) 2020-07-09 17:14:14 +02:00
Daniel Däschle
5ea17ad2d4
all: if smartcast part 2 (#5754) 2020-07-08 15:46:58 +02:00
Alexander Medvednikov
48f1f814d2 gg: minor fixes 2020-07-06 20:40:54 +02:00
Alexander Medvednikov
ebb4935703 examples: simpify text rendering examples 2020-07-06 19:55:49 +02:00
Alexander Medvednikov
1f3d7d393e gg: simplify text rendering 2020-07-06 19:45:00 +02:00
Nick Treleaven
9e7ba5f138
doc: update sum type docs (#5702) 2020-07-06 18:09:38 +02:00
Louis Schmieder
3cd9e2cab7
vweb: fix index (#5682) 2020-07-05 22:05:58 +02:00
Alexander Medvednikov
1505f3e22c vweb: fix an example 2020-07-05 16:52:20 +02:00
Alexander Medvednikov
36183660e6 remove oldgg, gl, glfw, freetype from vlib now that we have the new sokol based gg 2020-07-05 16:44:28 +02:00
Delyan Angelov
b525553b53 examples: add a simplified mini (v)pwgen program 2020-07-05 01:44:00 +03:00
Delyan Angelov
73771b741c examples: add client ip logging to examples/tcp_echo_server.v 2020-07-04 14:14:43 +03:00
Delyan Angelov
6ec86fa344 vfmt: reformat examples/sokol/particles *.v files 2020-07-02 15:31:42 +03:00
Ruofan XU
aa270263c9
exampleы: clean up quick_sort (#5620) 2020-07-02 13:32:02 +02:00
Larpon
aec3ea5d32
examples: add sokol particle example (#5599) 2020-07-01 14:29:58 +03:00
Alexander Medvednikov
02b846aa72 vweb: fix json() and text() results 2020-06-27 13:56:15 +02:00
Alexander Medvednikov
1d8d19c977 vweb: return $vweb.html() 2020-06-20 03:12:38 +02:00
granbestiapop
02f9b5d0e4
examples: concurrency examples 2020-06-17 02:34:16 +02:00
Alexander Medvednikov
651a203ecb examples: fix sqlite.v 2020-06-16 12:27:47 +02:00
Delyan Angelov
41e0561b05 examples: add overflow protection in path_tracing.v, fix randomization 2020-06-15 19:56:19 +03:00
Delyan Angelov
91df872c36 examples: fix unused variable warning in examples/sokol/fonts.v 2020-06-15 15:40:42 +03:00
Alexander Medvednikov
deddc71720 examples: fix vweb_assets.v 2020-06-10 12:05:35 +02:00
Alexander Medvednikov
b904d7d1ba vweb: debug prints behind $if debug 2020-06-10 11:50:06 +02:00
Hungry Blue Dev
e649cf84e3
rand: reorganize: phase 2 2020-06-09 15:06:07 +02:00
Enzo Baldisserri
11b7b97311
parser: fail when assigning to _ with := 2020-06-08 00:47:04 +02:00
Alexander Medvednikov
30ade1d6ea tests: test more vweb template features 2020-06-07 19:06:07 +02:00
joe-conigliaro
70c18fc7b2
vweb: tmpl access to action method vars 2020-06-07 21:26:47 +10:00
Delyan Angelov
013bfc7ebc vweb: add vweb.run_app(app,port); fix compilation of vweb_assets/main.v 2020-06-07 11:02:35 +03:00
Sumeet Chhetri
442030a7c8
picoev: make compile, add header parsing 2020-06-07 01:23:30 +02:00
Alexander Medvednikov
4d5ac1e16d vweb: $html 2020-06-06 21:36:34 +02:00
Alexander Medvednikov
7815c5b108 cgen: $action (ComptimeCall); vweb: hello world works! 2020-06-06 10:05:26 +02:00
Alexander Medvednikov
11908410f3 vweb: make compile 2020-06-05 21:04:18 +02:00
Delyan Angelov
2237968ec1 gg: fix x11 scaling 2020-06-05 08:19:34 +03:00
Alexander Medvednikov
13a7ce9e69 gg: GG => Context 2020-06-04 20:26:18 +02:00
Alexander Medvednikov
fb7ca56d87 gg: minor fixes 2020-06-04 19:57:16 +02:00
Alexander Medvednikov
42e314d281 examples: skip live gg examples for now 2020-06-04 19:14:24 +02:00
Alexander Medvednikov
c4a6ba76a1 examples: fix bounce.v; clean up tetris.v 2020-06-04 16:53:21 +02:00
Alexander Medvednikov
6b6c9d6738 gg: make the Sokol based gg the default 2020-06-04 16:05:15 +02:00
yuyi
5ae8853648
all: change f mut Foo to mut f Foo 2020-06-04 10:35:40 +02:00
Delyan Angelov
0b7fe0a9d0 gg2: add the rest of the sokol callbacks in gg.new_context 2020-06-04 09:48:49 +03:00
Delyan Angelov
576e80b3a9 tetris: restore text rendering with gg2.ft.draw_text 2020-06-03 23:09:34 +03:00
Delyan Angelov
e91642e615 tetris: more accurate fps counters on -d showfps 2020-06-03 19:52:48 +03:00
Delyan Angelov
8a23cfc0d6 tetris: support instant drop key, add +FPS counter on -d showfps 2020-06-03 16:45:26 +03:00
Alexander Medvednikov
7496c1be2a examples: fix remaining examples and add them to CI 2020-06-02 19:47:28 +02:00
Delyan Angelov
93c44a2199 examples: fix compilation of path_tracing.v 2020-06-02 19:29:27 +03:00
Alexander Medvednikov
4e51867612 make v build-examples work: part 1 2020-06-02 16:09:41 +02:00
Alexander Medvednikov
78f8a8aee6 cgen: remove g_ hack 2020-06-02 15:49:43 +02:00
Alexander Medvednikov
1139d3b458 gg: move text rendering to gg.ft 2020-06-02 15:35:41 +02:00
Alexander Medvednikov
ad8ed851d0 examples: make tetris compile 2020-06-02 09:38:42 +02:00
Alexander Medvednikov
138d730dfa checker: prepare for the is_changed check 2020-06-02 09:00:51 +02:00
Alexander Medvednikov
39bd058acf examples: tetris: remove GLFW dependency 2020-06-01 13:04:46 +02:00
Alexander Medvednikov
9bcbb3868f gg: migrate to sokol; examples: update tetris 2020-06-01 12:57:08 +02:00
Alexander Medvednikov
dd34e65398 gg: sokol fixes and text rendering benchmark 2020-05-30 12:52:27 +02:00
Pradeep Verghese
b52c98ac43
examples: fix compilation of game_of_life due to type mismatch 2020-05-29 09:45:20 +03:00
Pradeep Verghese
4b362862ad
examples: spectral: minor fixes 2020-05-29 06:41:56 +02:00
Alexander Medvednikov
81b44dc2c9 generics: generic call inside generic call; checker: check mut args at call 2020-05-29 04:30:00 +02:00
Tim Basel
d688d356a7
cli: assign parent by default; add disable_flag 2020-05-28 13:32:43 +02:00
Alexander Medvednikov
7c9279c447 vfmt: make work with comptime 2020-05-27 03:33:40 +02:00
Alexander Medvednikov
b1bbb17254 examples: remove glfw3.dll 2020-05-26 02:11:45 +02:00
Delyan Angelov
104359365f examples: fix const name warnings due to gx.White, etc... 2020-05-22 20:00:46 +03:00
yuyi
dda875a9c8
all: unify const names to snake_case 2020-05-22 17:36:09 +02:00
Alexander Medvednikov
0a6d709ce2 http: fix recent changes; picoev: make compile 2020-05-20 05:37:03 +02:00
iRedMail
4a70d2fe51
examples: fix 2 unused var warnings 2020-05-17 14:15:04 +02:00
yuyi
7f4cf08516
parser: check (mut f Foo) syntax 2020-05-17 13:51:18 +02:00
Alexander Medvednikov
c4ca6a9113 sokol: make examples compile 2020-05-15 18:55:29 +02:00
Delyan Angelov
b2e5ae9cd8 examples: fix compilation of the automaton for the game_of_life 2020-05-13 20:25:51 +03:00
Delyan Angelov
f866a8a8e2 examples: fix fibonacci warning 2020-05-13 15:51:17 +03:00
Alexander Medvednikov
3fd852deee
readme: tetris 2020-05-13 04:26:06 +02:00
yuyi
f33de1bc64
all: fix unused variable warnings 2020-05-12 13:57:23 +02:00
Alexander Medvednikov
828f9af64c checker: fmt 2020-05-11 14:38:25 +02:00
jm-duro
8488f7d82b
example: improve json example 2020-05-11 12:06:51 +03:00
Max Mazurov
8f6d69b763
examples: tetris: readme: freetype on Arch 2020-05-11 01:26:59 +02:00
Delyan Angelov
e3366281ee tests: skip sqlite_test.v on musl too, fix compilation of path_tracing.v 2020-05-06 23:50:20 +03:00
Delyan Angelov
e33805b2b3 json.decode: fix expressions in the second argument, also fixes news_fetcher.v 2020-05-06 21:44:50 +03:00
Alexander Medvednikov
0f0b6a0ccd examples: minor bounce.v improvements for the demo 2020-05-04 12:26:39 +02:00
Delyan Angelov
845ffb59a6 live: use mostly pure V code for reloading, eases customization 2020-05-03 20:22:24 +03:00
Delyan Angelov
aa9bb6f71a compiler: fix -live compilation of bounce example with gcc-9 & clang 2020-05-02 02:36:29 +03:00
Delyan Angelov
d6c1ee0202 hot_reload: cleanup message.v 2020-05-02 01:14:44 +03:00
Delyan Angelov
13e0e63514 hot_reload: fix graph.v compilation 2020-05-01 14:44:22 +03:00
Tim Basel
3e4cd12fd0
.gitignore: ignore all binary files by default 2020-04-29 16:49:13 +02:00
jm-duro
210b6e36b6
http: mutable request fields 2020-04-28 13:57:48 +02:00
yuyi
2574dce174
all: fix remaining []array warnings 2020-04-26 16:25:54 +02:00
yuyi
9f4d498ff1
all: updateimport () and []array 2020-04-26 13:49:31 +02:00
yuyi
541b058e90
all: use a !in b instead of !(a in b) 2020-04-26 06:39:23 +02:00
joe-conigliaro
900d96c638
parser: allow deref assign without parens pt2 update vlib 2020-04-25 18:14:01 +10:00
joe-conigliaro
7177e71444
revert parser: allow deref assign without parens pt2 update vlib 2020-04-25 18:11:14 +10:00
joe-conigliaro
f92cf69e60
parser: allow deref assign without parens pt2 update vlib 2020-04-25 18:09:52 +10:00
Delyan Angelov
fb97c2e01e examples: fix path_tracing.v compilation, using (*ptr) = expression 2020-04-23 12:28:16 +03:00
yuyi
4e1abc8503
all: remove commas between enum vals 2020-04-23 01:16:16 +02:00
Enzo Baldisserri
fe249ab0c3
vtest: remove pub before main 2020-04-17 21:41:54 +02:00
Delyan Angelov
aed8370d87 tetris: enable compilation with -prod; cleanup of font loading errors 2020-04-16 19:44:15 +03:00
Alexey
54226e74cf
sokol: add missing C prefixes 2020-04-16 15:53:34 +02:00
Delyan Angelov
1318c27699 tetris: it now works with v2 (on linux) :-) 2020-04-16 13:30:40 +03:00
morganwu
5deb86de4f
examples: fix customer pg table name 2020-04-12 21:51:10 +02:00
yuyi
4d5fe14968
log: fix example error 2020-04-06 17:22:53 +02:00
Alexander Medvednikov
c0d4503f25 gl/glfw: update C definitions 2020-04-04 12:56:35 +02:00
Alexander Medvednikov
88d15c6611 gl, glfw, freetype fixes 2020-04-02 01:45:22 +02:00
Alexander Medvednikov
c6cf8ace22 glfw and tetris fixes; temporary ci fixes 2020-04-01 23:49:11 +02:00
Alexander Medvednikov
3dae1cc131 move sdl module to github.com/vlang/sdl 2020-04-01 15:27:28 +02:00
SleepyRoy
7bbcc484fb
examples: calculator 2020-04-01 14:19:57 +02:00
Alexey
bf9f3057da
gitignore: ignore tcp_echo_server executable 2020-03-29 10:10:24 +02:00
Alexey
a333ac1888
all: remove redundant parentheses in if statements 2020-03-29 10:08:42 +02:00
Delyan Angelov
fa02130359
examples/tcp_echo_server: cleanup, use defer{} 2020-03-28 18:10:48 +01:00
Delyan Angelov
784d27f41b
examples: add a simple self contained tcp echo server 2020-03-28 10:21:22 +01:00
Alexander Medvednikov
eed7c91e87 move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
Alexander Medvednikov
ec4be80bcc Revert "db: increase db module level in vlib "
This reverts commit cd6d175180.
2020-03-26 09:23:54 +01:00
yuyi
cd6d175180
db: increase db module level in vlib 2020-03-26 09:21:34 +01:00
hazohelet
d8bcd13e86
compiler: fix #3973 by dealing with name mangling problem 2020-03-26 08:54:33 +01:00
Alexey
a5c0d89c71
examples: reorganize 2020-03-21 09:47:38 +01:00
yuyi
2f27758a4b
os: realpath => real_path 2020-03-20 16:41:18 +01:00
SleepyRoy
f798a0937a
expression: set floats as f64 by default 2020-03-19 07:24:49 +01:00
Wing-Kam
f1274e34c2
cli: add pre_execute & post_execute 2020-03-10 16:11:17 +01:00
yuyi
783dee1f48
os: merge with filepath 2020-03-07 22:26:26 +01:00
Ian M. Jones
750f37fde7
vweb: fix serving static files 2020-03-07 14:16:03 +01:00
Alexey
5827ff0a01
examples: add license files for fonts 2020-03-07 14:14:37 +01:00
Alexander Medvednikov
a277f7d6ab cgen: string[i]; pointers 2020-03-06 20:23:01 +01:00
Alexey
5142747ceb
examples: move SDL examples from vlib to examples dir 2020-03-06 18:39:40 +01:00
Alexander Medvednikov
a8e45251c4
sync.pool: simplify usages of pool.work_on_items 2020-03-05 18:37:57 +01:00
Alexander Medvednikov
b0ece3a9d8
sync: implement pool.work_on_items to process a list of items in parallel 2020-03-04 20:28:42 +01:00
Alexander Medvednikov
59a65d757b examples: use vcalloc 2020-03-04 17:28:05 +01:00
Hugo Locurcio
69f256b900
use LF line endings in examples/quick_sort.v 2020-03-03 14:41:05 +01:00
Delyan Angelov
f9d5c0110f
compiler: @VMODULE 2020-02-29 14:23:45 +01:00
SleepyRoy
c26016b132
examples: add quick_sort example 2020-02-26 13:32:39 +01:00
spaceface777
ef8c1203b4
cleanup: replace C for loops with range 2020-02-24 17:55:16 +01:00
Delyan Angelov
195f3f465b
option to disable bounds checking; examples/path_tracing.v: optimizations 2020-02-16 16:13:45 +01:00
penguindark
ce6ee1505f
path tracing example 2020-02-13 19:22:35 +01:00
Mahmoud Samir Fayed
99217da6ca
examples: update tetris readme 2020-02-07 18:47:05 +01:00
Delyan Angelov
1618596218
os: fix compiler warnings when just importing os 2020-02-05 11:23:49 +01:00
Exa Stencil
1db07f52d1
Improve vweb example to output the cookie 2020-02-05 10:53:16 +01:00
joe-conigliaro
7f709c3285
update copyright years 2020-02-03 05:00:36 +01:00
toman222
932392a7fd
sqlite: modify exec functions + other fixes 2020-02-02 02:56:09 +01:00
kemalcan bora
c90b53b89d
examples: simple linear regression 2020-01-31 02:44:38 +01:00
Steve Phillips
c617cf8e05 examples: fizz_buzz.v 2020-01-27 16:56:46 +01:00
joe-conigliaro
20f6cdc53a compiler: fix module alias resolution 2020-01-23 21:07:53 +01:00
Shun Sakai
c8c43a2475 update copyright year 2020-01-23 21:04:46 +01:00
S-YOU
7b345e207d pico.v and dependencies 2020-01-23 03:26:30 +01:00
Alexander Medvednikov
0502a54a36 new gg/freetype modules with sokol/fontstash backends 2020-01-22 20:54:36 +01:00
Abdullah Atta
43ba6766ba improve eventbus 2020-01-22 17:41:08 +01:00
Delyan Angelov
0d52cc97e4 sync: make new_mutex() and new_waitgroup() return &Mutex and &Waitgroup 2020-01-19 20:32:22 +01:00
Delyan Angelov
24d34a4f2c sokol: fix building of examples and ci tests 2020-01-17 20:05:45 +01:00
Alexander Medvednikov
ccf6134beb rename sokol examples, so that they can be run from root 2020-01-17 00:58:49 +01:00
Alexander Medvednikov
62481e88f3 sokol and fontstash modules 2020-01-16 20:45:52 +01:00
Chris Watson
84a6c019e8 http: refactor and reduce duplication 2020-01-16 18:16:11 +01:00
Alexander Medvednikov
d5f6e37c65 fix graph.v example 2020-01-16 00:07:59 +01:00
Delyan Angelov
4838dda59a compiler: make [live] fn unlock its mutex on early return 2020-01-14 18:58:46 +01:00
Alexander Medvednikov
4c7df98ac9 make private struct warning an error 2020-01-12 19:59:57 +01:00
Alexander Medvednikov
29564ed63d interface fix 2020-01-09 01:40:10 +01:00
Ricardo Tomasi
15415b2aae Update tetris/README for macOS 2020-01-05 11:52:58 +01:00
sh0f
3c65af8b9a cli: fix warning 2020-01-02 18:09:24 +01:00
Alexander Medvednikov
b1d6021875 x64 fixes 2020-01-01 22:34:46 +01:00
lutherwenxu
286a0a1371 time: rewrite unix() function 2019-12-31 17:11:47 +01:00
Charles WANG
26ee09c9bb examples: hanoi.v 2019-12-30 11:25:07 +01:00
Alexander Medvednikov
cba6a6fdea as casting 2019-12-30 10:47:34 +01:00
Abdullah Atta
63b70ddb06 move http module to net.http 2019-12-30 05:42:23 +01:00
Alexander Medvednikov
a251db068f run vfmt on math and sha; add vfmt check to test-compiler 2019-12-22 02:50:20 +03:00
Alexander Medvednikov
848cd3cb3e run vfmt on http, net, sync, strconv 2019-12-22 01:57:50 +03:00
Alexander Medvednikov
61bfecfa09 vweb: minor fixes 2019-12-21 05:19:26 +03:00
BigBlack
aa0ad9d922 fix vweb example 2019-12-19 03:38:39 +03:00
Abdullah Atta
489ec05b23 eventbus: remove hacks, add sender 2019-12-18 08:16:33 +03:00
Alexander Medvednikov
02c29624d8 freetype: minor fixes 2019-12-12 14:44:29 +03:00
Bryan Christopher Johnson
f86ddcf496 examples/tetris: use standard colors 2019-12-12 14:36:01 +03:00
Delyan Angelov
13769f440f vweb: continue after bad http client connection; performance fixes
* Enable compiling vweb with -prod (by supressing 'declared and not used' warning about 'reset') .

* Fix http responses (now wrk is happy and shows no errors) by adding a Content-Length header.

* Fix -g compilation for urllib.v .

* vweb: println action= only in debug mode.

* vweb: max request headers counting fix.

* Make vweb.html get a 'ctx mut Context' param, just like the other methods.

* vweb: simplify add_header.

* Use a string builder for the most common html case so that the response http text can be send in one go.

* vweb: reduce _STR/string interpolation usage in the most common html response case.

* vweb: refactor common http response formatting into Context.send_response_to_client/2 method.
2019-12-11 17:32:54 +03:00
Alexander Medvednikov
cd54b2878e fix pg orm example 2019-12-10 00:06:37 +03:00
Alexander Medvednikov
51051cdf92 vweb: enable @ logic in the header + fix the example 2019-12-09 23:34:38 +03:00
Alexander Medvednikov
6f49d4c1d2 orm: bool support; vweb fixes 2019-12-09 23:20:29 +03:00
Delyan Angelov
32b0225079 remove os/time references from live programs, fix warnings 2019-12-09 18:53:17 +03:00
Alexander Medvednikov
5330859034 2 more unneeded casts removed 2019-12-08 01:39:27 +03:00
Alexander Medvednikov
7d58dc2350 fix examples/v_script.vsh and add it to CI 2019-12-07 18:27:09 +03:00
Alexander Medvednikov
ad6adf327e vlib: fix missing else{} in match statements 2019-12-07 17:23:37 +03:00
Alexander Medvednikov
329485d4b6 vweb: fix headers and cookies 2019-12-07 15:04:05 +03:00
João Victor Oliveira Couto
5a8c07dcf5 strings: builder: write_b() 2019-12-06 23:02:09 +03:00
Alexander Medvednikov
55f32fc413 more mutability fixes 2019-12-06 19:23:24 +03:00
Alexander Medvednikov
c8d111924d check unused and unmodified vars in all modules, not just main 2019-12-06 18:43:56 +03:00
Alexander Medvednikov
71c0c4803f ORM fixes 2019-12-06 02:00:37 +03:00
Delyan Angelov
b907cf2179 sync/waitgroup: force sleeping for 1ms
fixes issues #2874 and #2961
2019-12-03 15:05:08 +03:00
Alexander Medvednikov
d308fef0c2 examples: fix spectral.v 2019-12-03 11:52:38 +03:00
Delyan Angelov
ec15bfb7d1 v test v => v test-compiler 2019-12-01 12:50:13 +03:00
Alexander Medvednikov
3fea8f3de5 *char => charptr everywhere 2019-12-01 10:33:26 +03:00
Alexander Medvednikov
7e4799334f array: make left/right/slice private 2019-11-30 12:37:34 +03:00
Alexander Medvednikov
431568faad x64: fix off by one error in for loops 2019-11-29 12:33:36 +03:00
Alexander Medvednikov
9e19472c33 show an info message if a C compiler is not installed 2019-11-29 12:12:06 +03:00
Alexander Medvednikov
52d25336db x64: function calls; http: download_file() 2019-11-28 13:24:02 +03:00
Alexander Medvednikov
cb8a19efaf vweb: bring back html() test 2019-11-26 09:34:09 +03:00
_leif
ee52b4166f log: enum for logger level 2019-11-25 07:50:59 +03:00
Abdullah Atta
d4ae39348f eventbus: make it usable and add README 2019-11-24 14:27:50 +03:00
Alexander Medvednikov
1bd8c465d3 do not allow casting bool to int 2019-11-23 20:40:59 +03:00
Alexander Medvednikov
0fb0c43c0a pg: minor fixes 2019-11-23 19:48:00 +03:00
Delyan Angelov
f42be0622e examples/game_of_life: add a GUI frontend; compiler: local modules relative to a main module 2019-11-23 16:33:25 +03:00
Alexander Medvednikov
9712213f50 x64 machine code generation (ELF) 2019-11-22 14:33:22 +03:00
joe-conigliaro
8fbfceed30 compiler: generics - support across modules/files 2019-11-22 08:22:11 +03:00
Tim Basel
597a6fead2 vlib: cli module 2019-11-21 15:03:12 +03:00
Steve Phillips
0e852e9c81 examples: add random_ips.v 2019-11-20 17:58:24 +03:00
Alexander Medvednikov
01dc267e20 examples: fix gg/freetype example 2019-11-20 07:35:13 +03:00
Alexander Medvednikov
759644ab36 examples: empty gg/freetype project 2019-11-20 07:26:52 +03:00
Alexander Medvednikov
e081791eaf fix repl tests 2019-11-18 02:34:49 +03:00
Swastik Baranwal
5d5268a53d expression: add a check for raw strings 2019-11-16 22:15:22 +03:00
Alexander Medvednikov
7d924679a6 []: update all examples and tests 2019-11-14 10:00:22 +03:00
Alexander Medvednikov
714d61aed7 examples: fix a small tetris bug 2019-11-13 06:43:05 +03:00
Delyan Angelov
3643dcbf4b sqlite: use in-memory database in examples and tests 2019-11-12 19:25:30 +03:00
Alexander Medvednikov
f6d06fcda2 update tests and examples after the mutability fix 2019-11-06 06:57:04 +03:00
Delyan Angelov
59efd42483 tools/vget => tools/v , search, install, etc
* compiler: rename vget to tools/vpm, implement draft support for v vpm search, v vpm update, v vpm install, v vpm remove, v vpm help .

* compiler: use "v pm" instead of "v vpm" to reduce the redundancy of typing, as suggested by slapden


* Use 'v install modulename', 'v search keywords', 'v update modulename', 'v remove modulename' instead of the longer 'v pm install modulename' etc.
2019-11-01 15:19:04 +03:00
ath3
9abbfa7862 examples/fibonacci: stop before overflowing and use u64 2019-10-30 14:54:38 +03:00
Michael Chrisco
ed445860eb tetris: update readme 2019-10-28 16:47:17 +03:00
Alexander Medvednikov
d54bbc8737 fix sqlite test 2019-10-28 10:21:32 +03:00
Alexander Medvednikov
1ac1626357 sqlite example 2019-10-28 00:10:58 +03:00
Alexander Medvednikov
6e0a789b6d tetris: minor fixes 2019-10-27 10:24:28 +03:00
Alexander Medvednikov
efdadc3758 tetris/glfw: fix warnings 2019-10-27 10:13:40 +03:00
joe-conigliaro
59378dce46 compiler/vlib: replace substr/left/right with [start..end] everywhere 2019-10-27 10:03:15 +03:00
Delyan Angelov
32b3611026 sync: new_mutex() and new_waitgroup() 2019-10-25 17:24:40 +03:00
Toby Webb
97096e4e6c Add fibonnaci example to gitignore 2019-10-25 10:28:26 +03:00
Alexander Medvednikov
892d1c6aab vweb: first step to revive it 2019-10-24 22:46:58 +03:00
Anders Nissen
1ce2acb4ef examples: use i64 in Fibonacci 2019-10-24 10:25:47 +03:00
Alexander Medvednikov
f14425ec18 do not allow one letter struct names 2019-10-23 23:46:07 +03:00
Sergio Abreu García
374133086d tetris.v: minor User Interface improvements 2019-10-23 16:19:05 +03:00
Robin Martijn
03cd34fb54 examples: use is_letter() method 2019-10-22 08:00:28 +03:00
Simon Heuser
8a31ee4b53 generic functions 2019-10-20 10:19:37 +03:00
Swastik Baranwal
5c5cdea4f2 examples: V script 2019-10-18 20:18:30 +03:00
Cc
22e7e807f3 examples: fibonacci 2019-10-17 11:11:24 +03:00
ytakahashi
c3e1ada405 examples: fix word_counter 2019-10-16 02:52:36 +03:00
joe-conigliaro
9a2b8a0814
compiler: move msvc compiler to -cc flag instead of -os (#2338)
* move msvc to -cc flag instead of -os

* undo unrelated change

* do first build without msvc

* remvove flags temp

* fix comment
2019-10-14 16:41:46 +11:00
joe-conigliaro
8e90724684
compiler: optimize parse_lib_imports (#2319)
* optimize parse_lib_imports
* comment unused import
2019-10-13 15:11:40 +11:00
joe-conigliaro
dd053d79b0 vlib/examples: fix gl/glfw/gg examples. rename init functions 2019-10-12 06:03:15 +03:00
Alexander Medvednikov
d482b1f824 struct capitalization: fix the rest of tests 2019-09-28 22:26:44 +03:00
Delyan Angelov
a4cbe78d97 compiler: streamline main function handling
* compiler: streamline C main function generation

* fix most tests

* compiler: fix for 'go update()' in graph.v . More precise parser error messages.

* Fix temporarily examples/hot_reload/message.v by using os inside it (os.clear).

* Make graph.v easier to quickly modify by defining y outside the loop.

* Fix failure of /v/nv/compiler/tests/defer_test.v when run with 'v -g' (#line directive was not on its own line, but right after } ).

* Do not pass the os.args to tests, even if the tests import os (they are more stable when run in a controlled environment).

* fix declared and not used in the js backend.

* fix js main => main__main too.
2019-09-28 20:42:29 +03:00
Delyan Angelov
3fbfc5fbd4 repl: tests show difference (in color where available) 2019-09-25 22:00:56 +03:00
Alexander Medvednikov
bf1ee28194 ui: Objective-C @interface support for Cocoa; minor clean-ups 2019-09-23 15:54:17 +03:00
joe-conigliaro
23c84516e2 compiler: error on unused imports 2019-09-23 13:42:20 +03:00
Zaoqi
104e4c9fc7 github actions: simplify ci.yml, test js backend on windows 2019-09-21 18:34:17 +03:00
Alexander Medvednikov
90e26a34c5 scanner: better interpolation names + disable vweb html test for now 2019-09-21 01:27:13 +03:00
Alexander Medvednikov
79abc0c16f vweb: fix html example 2019-09-21 01:10:37 +03:00
iRedMail
55720e7f98 tetris: add "module main" 2019-09-20 19:05:14 +03:00
Zaoqi
5a03eaca89 .gitignore: prepend / 2019-09-20 17:06:00 +03:00
Alexander Medvednikov
0a2f7a6ba7 fix tests 2019-09-17 13:37:25 +03:00
unknown-v
5f43a61e0d examples: update [0;n] to [0].repeat(n) 2019-09-16 01:55:54 +03:00
Delyan Angelov
35f927e64e repl: add some timing statistics when running REPL test files 2019-09-15 18:08:16 +03:00
joe-conigliaro
f077fbd32d vlib: change [0;n] to [0].repeat(n) 2019-09-15 12:26:05 +03:00
Carlos Esquerdo Bernat
8a77d4482c vweb: fix headers 2019-09-05 15:46:24 +03:00
Joe Conigliaro
2ae2ede06a fix *Type warning in examples 2019-09-04 19:48:19 +03:00
Delyan Angelov
ecb661f719 tetris: fix &Foo instead of *Foo warnings. 2019-09-03 11:39:06 +03:00
Alexander Medvednikov
dae4c4b83f
final linguist test 2019-08-30 13:57:53 +03:00
kawa-yoiko
6d35f68242 parser: restore outer variable in index exprs 2019-08-30 12:16:39 +03:00
joe-conigliaro
32683ad6fd sync: fix mutex on win & waitgroup (all os) update. fixes news_fetcher example on win (#1776) 2019-08-29 11:48:03 +03:00
Robin Martijn
d88315d789 news_fetcher: unlock mutex before terminating 2019-08-26 20:04:14 +03:00
Delyan Angelov
aa438c7c3f os: fix exec() and get_raw_line(); fix Windows tests and examples 2019-08-26 13:51:48 +03:00
Alexander Medvednikov
f61b14584a remove "import const" everywhere 2019-08-23 00:09:03 +03:00
Alexander Medvednikov
75b632baad examples: use == instead of = in pg/customer.v 2019-08-22 22:33:57 +03:00
Alexander Medvednikov
abe61e28fe examples: fix tetris 2019-08-22 22:28:27 +03:00
Delyan Angelov
1ddc9dc604 orm: allow variables like q.nr_orders in queries too. 2019-08-20 21:35:13 +03:00
Delyan Angelov
cf06faf09b orm: allow both integer and string arguments in db.select and db.select limit 1 2019-08-20 17:32:39 +03:00
Alexander Medvednikov
707ddba143 examples: rename hot_code_reloading to hot_reload 2019-08-20 00:08:45 +03:00
S-YOU
0066afe7fc mysql module 2019-08-18 17:24:43 +03:00
Alexander Medvednikov
100bb7c54c os: clean up windows functions 2019-08-17 16:17:43 +03:00
Massimiliano Bertinetti
845ae8cf5a tetris: Added instruction for Arch / Manjaro Linux 2019-08-17 15:53:06 +03:00
Nicolas Sauzede
4760fea489 examples/tetris: use better unique colors, implement game over/pause 2019-08-17 02:56:09 +03:00
unknown-v
49205dcce3 examples: fix maps warnings 2019-08-17 02:55:11 +03:00
Alexander Medvednikov
89d0b75311 vweb: remove the broken test for now 2019-08-13 01:15:09 +03:00
Alexander Medvednikov
a11961b0d3 vweb: make mime_types a const 2019-08-13 01:04:26 +03:00
Alexander Medvednikov
6002511052 pg: remove printf 2019-08-12 16:41:41 +03:00
Alexander Medvednikov
8c3475b902 generate .str() for all arrays 2019-08-11 22:39:45 +03:00
Alexander Medvednikov
68a4c125c5 examples/tetris: ttf font for printing the score 2019-08-10 13:37:15 +02:00
Julian Schurhammer
1864e92ff4 parser: disallow statements after a return, branch check $if, $else, switch, and loops correctly 2019-08-10 10:26:42 +02:00
Alexander Medvednikov
d4441e4353 freetype: clean up new_context() 2019-08-10 07:13:25 +02:00
Alexander Medvednikov
11c2f634f3 examples/tetris: better font initialization 2019-08-10 07:13:25 +02:00
Rendims
fdb1433c24 Makefile: rebuild compiler when sources change 2019-08-10 00:11:17 +02:00
Nicolas Sauzede
efa540e883 examples: tetris: draw score 2019-08-09 13:03:29 +02:00
Julian Schurhammer
61983a6799 parser: check that functions return in all if/else branches 2019-08-08 09:49:56 +02:00
Alexander Medvednikov
4b69d43f9f fix examples 2019-08-07 14:16:10 +02:00
Alexander Medvednikov
7a7b5040e2 http: fix response headers and status code; clean up ft and gg 2019-08-06 03:06:27 +02:00
Alexander Medvednikov
aac8503d83 http: use optionals (finally) 2019-07-31 22:15:24 +02:00
jilio
6294c7878e vweb: recursive handle_static with mime types 2019-07-31 06:10:53 +02:00
Alexander Medvednikov
ad8b105b2c vweb example 2019-07-30 21:15:17 +02:00
Richard Warburton
07ed320110 sync: WaitGroup 2019-07-30 15:06:16 +02:00
Delyan Angelov
4a1970a322 http: return ?string 2019-07-29 19:18:26 +02:00
Alexander Medvednikov
2ac579ca0a wrap up the new mut check 2019-07-25 14:13:35 +02:00
Alexander Medvednikov
505f784047 fix log example 2019-07-24 17:59:54 +02:00
yep84
94a599d630 log: allow file logging 2019-07-24 17:50:29 +02:00
Alexander Medvednikov
facf55cbc0 examples/news_fetcher: don't print the ids 2019-07-24 00:56:42 +02:00
lutherwenxu
4f11185231 Fix news_fetcher example
News_fetcher now uses proper numbering with mutex lock instead of the cursor
2019-07-24 00:54:16 +02:00
d2verb
e25664dfbf Update .gitignore & add examples/hot_code_reloading/.gitignore 2019-07-23 13:30:02 +02:00
Alexander Medvednikov
89042b0f97 examples/tetris: an extra collision check 2019-07-23 03:29:11 +02:00
Alexander Medvednikov
a2a0b149b2 examples/graph: update the graph instantly; add a couple of graphs 2019-07-23 00:24:42 +02:00
Alexander Medvednikov
5933f2107a examples/graph: a small import fix 2019-07-22 13:45:02 +02:00
Alexander Medvednikov
5d188130e5 fix memory free 2019-07-21 16:30:10 +02:00
Alexander Medvednikov
975286302c fix Tetris onkeydown 2019-07-21 11:56:43 +02:00
Alexander Medvednikov
7f512eaf72 examples/hot_code_reloading: graph builder improvements 2019-07-20 17:59:40 +02:00
Alexander Medvednikov
769cda1d1f simplify gg; remove forced OpenGL dependency; graph builder /w hot code reloading 2019-07-20 16:06:15 +02:00
Alexander Medvednikov
26ed3fb372 examples/hot_code_reloading: graph builder 2019-07-19 13:15:47 +02:00
Alexander Medvednikov
c35adbea91 vfmt fixes 2019-07-17 21:00:39 +02:00
Alexander Medvednikov
bdf1717703 examples/bounce.v: minor fixes 2019-07-17 02:55:28 +02:00
Alexander Medvednikov
8c516bec4f [][]int 2019-07-16 13:56:48 +02:00
Alexander Medvednikov
48d5650765 examples/hot_code_reloading: move the square faster 2019-07-16 02:23:09 +02:00
Alexander Medvednikov
840e496a51 force snake_case in variable names 2019-07-15 22:53:33 +02:00
Alexander Medvednikov
b36a9f7e55 glfw always on top 2019-07-15 19:23:09 +02:00
Delyan Angelov
37aff9b107 hot reload: no -sanitize is needed anymore, -live is now enough on both Linux and MacOS X
* hot reload for GL programs: force the main executable (the shared library loader) to be build with -rdynamic flag, when -live is passed to v compiler.

* hot reload: optimize away a redundant load_so/0 call at the start of the reload_so thread.

* hot code reload for MacOSX requires -flat_namespace flag instead of -rdynamic (on linux).
2019-07-15 17:32:00 +02:00
Carl Bordum Hansen
92fb9c8b94 VCasino was printing the opposite of intended 2019-07-15 17:20:16 +02:00
Delyan Angelov
60ad97c4fb fix hot code reloading for GUI example bounce on linux: works when compiled with 'v -live -sanitize bounce.v' .
It crashes with SIGSEGV, when -sanitize is not given.
Also thirdparty/glad/glad.o should be build with -fPIC .
2019-07-15 12:28:35 +02:00
Alexander Medvednikov
3b1964e9df migrate remaining code to the new maps 2019-07-14 22:26:21 +02:00
d2verb
2cb12b4f4e rand: change rand.seed() to receive seed value 2019-07-13 18:17:45 +02:00
d2verb
14bbf766b0 Update examples/.gitignore 2019-07-12 20:46:58 +02:00
Alexander Medvednikov
28d379dc7b make glfw work on Windows 2019-07-12 05:04:27 +02:00
Alexander Medvednikov
045d480c8c clean up the examples a bit 2019-07-07 22:09:08 +02:00
Alexander Medvednikov
de8dc4cddb hot code reloading examples 2019-07-07 22:02:27 +02:00
pverghese
144d7ca362 Added benchmarks 2019-07-07 01:19:54 +02:00
vertical222
8c3e47c9de nbody.v fixes 2019-07-07 01:18:04 +02:00
pverghese
758267254d Added Benchmark-games: spectralnorm 2019-07-06 16:49:30 +02:00
vertical222
0f8682d2f0 Create nbody.v 2019-07-06 12:03:30 +02:00
d2verb
504c0d6077 Modify examples/.gitignore 2019-07-04 22:05:12 +02:00
musou1500
668646f8f9 add str function for rune 2019-07-01 17:36:23 +02:00