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