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

854 Commits

Author SHA1 Message Date
yuyi
a318a2e09e
examples: fix optional in string interpolation and format error (#14079) 2022-04-19 13:29:53 +03:00
Alexander Medvednikov
fbb9e65c0f all: ~500 more byte=>u8 2022-04-15 18:25:45 +03:00
Alexander Medvednikov
af73e195da net: byte fixes 2022-04-15 15:55:39 +03:00
Alexander Medvednikov
fb192d949b all: replace []byte with []u8 2022-04-15 15:35:35 +03:00
Alexander Medvednikov
d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
Delyan Angelov
8788512c4d
checker: make using err.msg and err.code produce an *actual* notice, even with the present compatibility hack (will be *removed* in 2022-06-01) 2022-04-12 14:56:02 +03:00
Larpon
07207db998
examples: reduce C. prefix usage, rename fontstash enums (#14011) 2022-04-11 22:23:06 +03:00
Delyan Angelov
8517b8f8b0
examples: use #[] in news_fetcher.v to simplify the code 2022-04-10 11:11:53 +03:00
Delyan Angelov
88c4a64a15
examples: make examples/sokol/drawing.v more symmetrical 2022-04-10 10:40:14 +03:00
mir.zhou
6425000ce4
example: fix the tuicool.com crawler example (changed html structure) (#13962) 2022-04-07 18:18:10 +03:00
Pascal Masschelier
95753ffb30
examples: fix process_stdin_trick example (#13953) 2022-04-07 13:55:12 +03:00
Delyan Angelov
5b492e26dd
builtin: support a.flags.set(.noslices | .noshrink), use it in the particles example (#13818) 2022-03-24 23:37:13 +02:00
Delyan Angelov
178afd006b
examples: avoid flash of unstyled content in the vweb_assets example 2022-03-21 19:13:53 +02:00
Delyan Angelov
3bae489e35
examples: make the vweb_assets.v example more robust (always change work folder to the folder of the executable). Document the vweb.Context.handle_static behaviour. 2022-03-21 19:05:18 +02:00
Delyan Angelov
ee6b23c2a7
toml: use toml.parse_text and toml.parse_file in the tests 2022-03-18 23:32:06 +02:00
yuyi
49155ec312
parser: notice unnecessary parenthesis of reference (fix #11179) (#13739) 2022-03-15 16:11:53 +02:00
Alexander Medvednikov
36ec47cd20 all: replace "NB:" with "Note:" (docs/comments) 2022-03-06 20:01:22 +03:00
Mihai Galos
4215bb125c
examples: improve the sendbus example (#13604) 2022-02-26 09:50:44 +02:00
Subhomoy Haldar
114a341f5f
rand: simplify rand.PRNG, move to optional types for error handling (#13570) 2022-02-23 12:36:14 +02:00
Vincenzo Palazzo
7bd8503170
datatypes: add a binary search tree implementation (#13453) 2022-02-22 10:28:01 +02:00
Mihai Galos
b8d656b308
examples: enhance the call_v_from_python example, with a fn accepting 2 f64 params (#13480) 2022-02-16 09:12:49 +02:00
Ulises Jeremias Cornejo Fandos
4391ae563d
examples: improve the pendulum simulation, with several modes and diagrams (#13446) 2022-02-12 19:38:07 +02:00
Delyan Angelov
89d399b035
examples: fix leak in examples/sokol/particles/, by marking s.pool and s.bin with .noslices 2022-02-03 18:52:52 +02:00
Delyan Angelov
46a096b95d
Revert "v.util: make mod_path_to_full_name more robust"
This reverts commit b11ce91141.
2022-01-31 06:57:50 +02:00
Delyan Angelov
b11ce91141
v.util: make mod_path_to_full_name more robust 2022-01-30 22:26:36 +02:00
Benjamin Stigsen
ceb05b163a
strings: rename Builder.write_b() to Builder.write_byte(), add deprecation (#13313) 2022-01-28 20:34:44 +02:00
Larpon
41b9b2988a
examples: add port of simple triangle sokol sample (#13298) 2022-01-27 21:16:00 +02:00
Larpon
faaa7035c4
examples: fix segmentation fault crash on exit in sokol 0X_ examples (#13299) 2022-01-27 19:46:55 +02:00
Larpon
65a97a9fbe
examples: fix navigating unicode text in text_editor (#13286) 2022-01-26 17:25:29 +02:00
Larpon
95d86324c3
examples: support unicode in the text_editor.v buffer (#13269) 2022-01-25 15:39:35 +02:00
Wertzui123
22c21e62a1
examples: fix the mandelbrot set example on Windows (#13251) 2022-01-23 00:45:27 +02:00
Delyan Angelov
62c3ad4953
use os.quoted_path more 2022-01-22 22:22:22 +02:00
jeffmikels
7a2705d8ce
scanner: multibyte rune literals now support unicode, hex, and octal escape codes (#13140) 2022-01-19 03:23:25 +03:00
Larpon
7fbd856bf8
os: add font module, move from gg (#13144) 2022-01-13 12:16:18 +02:00
Ikko Ashimine
ea660315e0
examples: fix typo in text_editor.v (#13136) 2022-01-11 17:33:17 +02:00
Charles WANG
7f1cc44b04
examples: detect windows and use correct file in the call_v_from_python example (#13114) 2022-01-10 09:11:54 +02:00
Saptak Bhoumik
5e85d4cb39
examples: show how to call a simple v module from python (#13105) 2022-01-09 19:53:36 +02:00
Larpon
b44b8c472d
examples: use vmemset instead of C.memset (#13104) 2022-01-09 16:08:11 +02:00
penguindark
92fcb82ca3
sokol: fix for example06 (#13101) 2022-01-09 16:02:24 +02:00
penguindark
22fce6a525
sokol: update sokol_gfx.h to the LAST version, and fix example 06 (#13100) 2022-01-08 20:29:29 +02:00
Larpon
5cffa1a2e4
sokol: use V type for SG_SHADERSTAGE_[VS|FS] (#13086) 2022-01-07 19:52:44 +02:00
Delyan Angelov
59357e873d
math: move the math.mathutil generic min/max/abs fns to math (#13042) 2022-01-05 18:02:20 +02:00
Alexander Medvednikov
59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
Larpon
88a973b617
sokol: type alias all sgl structs, support sgl_context (#13018) 2022-01-03 15:05:24 +02:00
Larpon
4d4398fa8a
sokol: type alias all gfx structs (#13014) 2022-01-02 20:36:01 +02:00
Larpon
2210f89ea3
sokol: type alias all sapp structs (#12962) 2021-12-26 13:02:51 +02:00
Benjamin Stigsen
546c388b02
gg: renaming drawing functions (#12913) 2021-12-23 13:31:25 +02:00
playX
a2468e1e0c
js,os: fix integer arithmetic; add Process.close() and os.is_readable() for VJS; Make tetris run on JS backend (#12940) 2021-12-23 11:36:42 +02:00
playX
2b9f993574
gg: add text rendering, keyboard event handling for JS and other fixes (#12932) 2021-12-22 12:26:52 +02:00
Delyan Angelov
7b4d83660a
examples: reduce progress update rate for path_tracing.v (less string interpolations/mallocs) 2021-12-21 23:43:13 +02:00
Delyan Angelov
88435eb769
examples: avoid using go game.run() in Tetris 2021-12-21 16:54:26 +02:00
Sandro Martini
80995f3a2d
log: improve logging interface (#12886) 2021-12-18 12:38:43 +02:00
penguindark
d3b769d1bc
examples: add an image viewer program (#12797) 2021-12-11 22:18:03 +02:00
crthpl
2fbf7fea75
all: initial interpreter code (#12605) 2021-12-08 11:09:10 +03:00
Larpon
047f059fb8
examples: use fontstash wrapper calls (#12718) 2021-12-06 23:39:43 +03:00
penguindark
89eb5425cd
examples: clean file path usage in the examples, move all the fonts in the common assets folder (#12736) 2021-12-06 09:53:46 +02:00
pancake
1b691e7612
native: implement for-c and for-in range loops (#12155) 2021-11-30 11:49:30 +02:00
Larpon
83260e5074
docs: add link to shader inclusion example (#12613) 2021-11-29 18:26:32 +02:00
Delyan Angelov
6d97b0a407
checker: improve checking of a << b, when a and b are numbers (#12589) 2021-11-29 03:48:49 +03:00
playX
f584e70cf2
js: add fixes for generic structures and functions; add promise API; refactor modules (#12575) 2021-11-25 16:49:53 +02:00
playX
b0bc112168
jsdom, examples: add more WebGL APIs; add interactive 3D cube example running on VJS (#12562) 2021-11-24 20:31:39 +02:00
playX
243e66a106
js,jsdom: Canvas & context API; Added TypeSymbol.is_js_compatible & temporary hacks for JS ifaces (#12526) 2021-11-20 21:28:11 +02:00
Larpon
7ec70d5477
toml: small refactor, move all json functionality to submodule (#12502) 2021-11-18 13:27:59 +02:00
playX
2eb02ff5a7
jsdom, js: start refactoring jsdom; improve JS interfaces; add two attributes for them (#12488) 2021-11-17 11:41:33 +02:00
Delyan Angelov
6c5dfc5c2f
examples: fix initial clock size on hdpi displays 2021-11-11 18:09:57 +02:00
Delyan Angelov
4728b975e3
examples: use app.gg.quit() instead of exit(0) 2021-11-11 17:45:22 +02:00
Delyan Angelov
9cb378bb6b
examples: reduce the memory usage of the clock example, without -autofree & -gc boehm 2021-11-11 17:39:02 +02:00
Delyan Angelov
637ebe5d42
examples: improve examples/vweb/file_upload 2021-11-10 18:26:16 +02:00
Delyan Angelov
3c6356ba36
ci: fix request_test.v (add missing \r to hardcoded post data) 2021-11-10 18:16:15 +02:00
Delyan Angelov
466ced2876
net.http: fix multipart/form-data file upload handling 2021-11-10 17:31:41 +02:00
playX
d8f971ffb5
jsdom: add Path2D API, All CanvasRenderingContext2D methods (except image methods) (#12404) 2021-11-07 10:06:28 +02:00
Delyan Angelov
852d85b3a9
gg: cleanup the minimal gg program more 2021-11-07 09:16:49 +02:00
Delyan Angelov
32b74dd348
gg: simplify the minimal gg application even more with context.user_data = context 2021-11-06 18:24:19 +02:00
playX
2b4154910c
jsdom, checker: add more methods for CanvasRenderingContext2D, fix interop check for JS methods (#12372) 2021-11-03 16:54:28 +02:00
Miccah
ce9f26c589
examples/vweb: use map instead of string in call to app.json (#12338) 2021-10-31 12:31:49 +02:00
czkz
81b95ece51
docs: improve the docs by provide better examples and describe module publishing (#12308) 2021-10-31 11:32:31 +02:00
Wertzui123
612e742c1f
examples: remove unneeded workaround (#12336) 2021-10-30 18:49:54 +03:00
playX
a32dae335a
js: fix interfaces behaviour & disable struct deep copy for now (#12333) 2021-10-29 11:23:40 +03:00
Delyan Angelov
8fd66994c7
ci: comment out the main body in draw.js.v for now 2021-10-28 02:18:38 +03:00
playX
cfecb62299
js: DOM API. Part 1 (#12296) 2021-10-27 23:18:09 +03:00
Amund Tenstad
18da724a9f
examples: prevent a 180 turn in snek (#12286) 2021-10-25 10:57:05 +03:00
playX
864d6eae6b
js: codegen & vlib fixes, replace the Game of Life CLI example (#12272) 2021-10-22 22:03:19 +03:00
Larpon
09cc0c7247
gg: use sgl.begin_points for pixels + improve pixels example (#12085) 2021-10-07 10:46:57 +03:00
Louis Schmieder
6391f3d2da
orm: fix other int types (#11981) 2021-09-26 11:17:56 +03:00
Ruofan XU
4fbf3fdf03
examples: make the binary search tree example generic (#11968) 2021-09-24 21:17:26 +03:00
Larpon
5541ec8670
vlib: add toml module + tests (#11964) 2021-09-24 21:13:52 +03:00
yuyi
108a01d65f
fmt: fix unnecessary line break in array init (fix #11448) (#11562) 2021-09-21 16:20:09 +03:00
Alexander Medvednikov
49886b8c40 examples: add a missing vweb header 2021-09-21 08:13:42 +03:00
Alexander Medvednikov
f6bdc6b87e tmpl: fix <div> inside <div> 2021-09-21 07:54:10 +03:00
Michele Zenoni
92bb292113
examples: add Rule 110 example (#11516) 2021-09-17 03:24:28 +03:00
Delyan Angelov
5010d18f27 examples: use double buffering for mandelbrot.v, to remove flickering on m1 2021-09-10 19:46:10 +03:00
Delyan Angelov
fa0983128f
examples: add a mandelbrot viewer example 2021-09-10 18:59:39 +03:00
Delyan Angelov
6ea750da8d
v test-all: add a v run examples/v_script.vsh step too 2021-09-10 12:45:52 +03:00
Alexander Medvednikov
afeb1525a1 native: rename cgen to code_gen to avoid confusion with cgen 2021-09-10 03:17:53 +03:00
yuyi
e5360e164a
fmt: remove unnecessary parentheses after return (fix #11423) (#11435) 2021-09-08 14:19:53 +03:00
Enzo
e3b65092d6
parser: deprecate size_t (#11443) 2021-09-08 13:09:32 +03:00
penguindark
f1cba44154
examples: add a gg drag'n'drop example (#11403) 2021-09-05 16:14:38 +03:00
Delyan Angelov
56993b9e2d
net.http: support passing client certificates in http.fetch (#11356) 2021-09-01 01:43:35 +03:00
Delyan Angelov
e72af5e2ee
examples: fix 404 status code for not found pages in examples/http_server.v 2021-08-31 12:13:58 +03:00
Delyan Angelov
2b92ccecb5
ci: fix v build-examples and v build-tools 2021-08-28 12:44:03 +03:00
Larpon
e85311c2ba
gg: change draw_cubic_bezier* call signatures for speed and to match *_poly (#11323) 2021-08-27 16:52:05 +03:00
Fabricio Pashaj
0bf9197f41
net.http: add a close method to immediatly close the listener of a started http.Server, add more tests (#11248) 2021-08-24 19:21:24 +03:00
Larpon
833bf2cf15
gg: add cubic Bézier curves + examples (#11286) 2021-08-24 06:35:27 +03:00
Delyan Angelov
b5f8a04778
examples/mini_calculator.v: handle ctrl-d gracefully 2021-08-20 10:07:41 +03:00
Benjamin Stigsen
70a658a265
gg: set_pixels() (#11236) 2021-08-20 01:14:25 +03:00
Stefan Schroeder
6983f74a9d
example: add an animated analog clock (#11231) 2021-08-18 17:40:20 +03:00
Delyan Angelov
f96b81b53a
ci: fix failing vweb_test.v 2021-08-17 18:57:04 +03:00
Louis Schmieder
0d30667ab5
orm: fix orm unique lists (#11198) 2021-08-16 14:59:23 +03:00
Daniel Däschle
800c0e5092
vlib: remove deprecated map{} usages as well as deprecated functions (#11035) 2021-08-04 12:44:41 +03:00
Alexander Medvednikov
80976e640c vweb: remove init_server() from all examples, tutorials, and tests 2021-08-03 16:03:16 +03:00
shadow
eca7af107a
examples: fix static vweb assets example (#11008) 2021-08-01 21:46:30 +03:00
Roj Serbest
cd03d31989
examples: fix a typo (#10984) 2021-07-28 22:39:37 +03:00
Delyan Angelov
0d12d55295
gg: allow customisation of the image format in gg.new_streaming_image 2021-07-26 11:05:16 +03:00
Louis Schmieder
1943da54a5
orm: integrate psql to orm (#10933) 2021-07-24 20:49:40 +03:00
Louis Schmieder
26db3b0995
orm: redesign orm (re-write it in V) (#10353) 2021-07-23 12:33:55 +03:00
Delyan Angelov
5098334e65
os: add execute_or_exit(cmd), use it consistently instead of execute_or_panic(cmd) 2021-07-20 15:22:04 +03:00
Daniel Däschle
ad3835b598
parser: deprecate short struct init (#10842) 2021-07-20 11:17:08 +03:00
Miccah
1a6a7a678a
vweb: change Context.headers from string to struct Header (#10749) 2021-07-18 12:21:07 +03:00
Delyan Angelov
05284c45a6
examples: fix x,y dimensions 2021-07-16 22:51:20 +03:00
Miccah
c3c420a41c
vweb: remove chunked encoding support in server responses (#10750) 2021-07-13 15:47:16 +03:00
Delyan Angelov
de9aa987bc
examples: improve progressbar in path_tracing.v 2021-07-12 07:53:48 +03:00
Michiel Vlootman
452c8e14d4
examples: remove unused return types in hanoi.v (#10661) 2021-07-04 17:34:58 +03:00
Tomas Hellström
ec973f5c6e
x.websocket: move to net.websocket module (#10648) 2021-07-03 02:56:00 +03:00
Delyan Angelov
b2391424d9
examples: add examples/gg/random.v demonstrating how to stream images/pixels 2021-06-24 17:45:14 +03:00
Delyan Angelov
5a308005d5
examples: show the tetris ghost by default 2021-06-24 11:59:18 +03:00
Delyan Angelov
f18265e6a8
gg: remove obsolete usages of use_ortho: true 2021-06-24 11:15:12 +03:00
Rasmus Schultz
1c80741886
doc: document type Fn = fn (string) string (type aliases) (#10471) 2021-06-22 12:39:57 +03:00
Delyan Angelov
dd6591b2f5
ci: fix [if xyz ?] usages 2021-06-22 10:46:43 +03:00
Miccah
6a19a13812
vweb: re-enable concurrency and fix the counter example (#10484) 2021-06-17 02:08:02 +03:00
Miccah
d56219a986
examples: add TCP echo server using os.notify (#10481) 2021-06-16 19:15:56 +03:00
Uwe Krüger
60c880a0cc
vlib: use malloc_noscan() where possible (#10465) 2021-06-15 14:47:11 +03:00
Delyan Angelov
b26e1cdc0f
examples: persist and show the personal best score in snek.v 2021-06-14 18:13:26 +03:00
Wes
694b991929
examples: tetris: add ubuntu dependencies list (#10456) 2021-06-14 16:16:40 +03:00
Emily Hudson
535dcac8fa
net: ipv6 support, merge unix+ip;[pack:x] attribute (#9904) 2021-06-13 23:53:38 +03:00
Delyan Angelov
b25c0e5ef6
examples: do not write to files in examples/templates/templates.v 2021-06-12 17:08:14 +03:00
Delyan Angelov
ead445e205
examples: cleanup generated file examples/templates/result.md 2021-06-12 17:08:14 +03:00
shadowninja55
534b59e721
examples: rename "Chield" to "Child" in examples/database/orm.v (#10414) 2021-06-11 11:52:06 +03:00
Delyan Angelov
5b2046342b
Revert "examples: split asm.v to asm.amd64.v and asm.i386.v"
This reverts commit 74e73edac1.
2021-06-07 20:23:44 +03:00
Delyan Angelov
74e73edac1
examples: split asm.v to asm.amd64.v and asm.i386.v 2021-06-07 20:17:45 +03:00
Delyan Angelov
ac0b638b6a examples: run vfmt over psql/customer.v 2021-06-07 18:25:20 +03:00
Delyan Angelov
4f213f4468 examples: conditionally compile an asm amd64 {} block on M1 in asm.v 2021-06-07 18:23:18 +03:00
Yuriy Zymlex
a716a00e38
builder: fix a bug with submodule import (#10318) 2021-06-05 12:45:23 +03:00
Delyan Angelov
e54af19b25
examples: fix -cstrict compilation of c_interop_wkhtmltopdf.v 2021-06-05 10:03:57 +03:00
Delyan Angelov
eac1e25c5d
strings: simplify Builder (#10263) 2021-05-31 14:21:06 +03:00
Ruofan XU
4e55b9c08e
example: improve binary search tree example (#10226) 2021-05-27 20:13:02 +03:00
penguindark
d8d05e0106
all: new string interpolation in pure V (#10181) 2021-05-24 05:20:45 +03:00
Alexander Medvednikov
dcfea5c69b vweb: detect mime type automatically in serve_static() 2021-05-22 07:02:25 +03:00
Enzo
906b207e58
checker: deprecate using V strings in C function calls (#10140) 2021-05-20 09:17:44 +03:00
ScriptBoy2077
a849d52d4a
examples: add web_crawler and get_weather (#10084) 2021-05-14 11:09:21 +03:00
Delyan Angelov
143c3d4bb4
io: deprecate io.make_reader (not needed anymore) 2021-05-13 10:26:26 +03:00