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

136 Commits

Author SHA1 Message Date
6756d28595 all: 2023 copyright 2023-03-28 22:55:57 +02:00
ae6a48c0e3 all: rename it to index in array inits (#17543) 2023-03-08 20:51:45 +01:00
cad2cd5583 docs: fix typos using codespell (#17332) 2023-02-16 11:43:39 +02:00
c8c70de87d docs: unify format of notes (#17294) 2023-02-13 10:29:02 +02:00
404a9aa442 v: forbid function parameter names, shadowing imported module names (#17210) 2023-02-08 20:37:04 +02:00
4098612a87 rand: add full precision f32 and f64 random functions; fix f32/f64 multipliers (#16875) 2023-01-19 15:21:47 +02:00
eb8e8b8642 rand: add Blackman/Vigna xoroshiro128++ PRNG (#16712) 2022-12-20 10:53:30 +03:00
ef5be22f81 all: replace generic <> with [] - part 2 (#16536) 2022-11-26 18:23:26 +02:00
017ace6ea7 vfmt: change all '$expr' to '${expr}' (#16428) 2022-11-15 16:53:13 +03:00
ca484430e0 checker: check int overflow for const vars (#16332) 2022-11-06 08:22:28 +03:00
51f4d99399 all: change optional to result in most of the libraries (#16123) 2022-10-20 22:14:33 +03:00
09e23e3ed6 rand: add rand.element and prng.element functions with unit test (#16068) 2022-10-14 06:54:02 +03:00
41dbd12bc4 tests: make error handling the same as the main function (#15825) 2022-09-21 19:45:43 +03:00
9e0bf005f7 checker: simplify infer_fn_generic_types() (#15408) 2022-08-11 14:25:43 +03:00
fcde63127f rand: fix incorrect generic function call (#15327) 2022-08-02 20:11:49 +03:00
3647fb4def rand: move dist functions to top module and PRNG interface; minor cleanup (#14481) 2022-05-22 13:21:52 +03:00
d679146a80 fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
8830af5c89 rand: minor cleanup in choose() (#14376) 2022-05-12 11:20:38 +03:00
79f8a3c796 rand: update README.md (#14341)
* update README for rand module

* use concrete values

* make sure code works
2022-05-09 17:59:20 +03:00
fbb9e65c0f all: ~500 more byte=>u8 2022-04-15 18:25:45 +03:00
fb192d949b all: replace []byte with []u8 2022-04-15 15:35:35 +03:00
d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
014c3c97f0 all: byte => u8 2022-04-15 14:45:52 +03:00
a0e7a46be4 rand: speed up MT19937RNG.u64 2022-04-10 13:07:35 +03:00
6c25f5b291 rand: fix needless array allocation in MT19937RNG.u64() 2022-04-10 13:02:31 +03:00
3f90809035 rand: add missing pub modifiers for .byte() and .u32() methods (#13992) 2022-04-10 11:43:46 +03:00
022fae1e7f rand: make mt19937 automatically seeded, add seed_len to wyrand (#13966) 2022-04-07 16:00:30 +03:00
d7817863c6 checker: type inference over a generic type should compile (#13824) 2022-04-01 19:31:27 +03:00
f75ce9dd82 rand: move functions from rand.util to the main module (#13840) 2022-03-27 17:38:59 +03:00
2e963e36ac rand: add pub fn shuffle<T>(mut a []T) { function + tests (#13811) 2022-03-23 15:31:26 +02:00
40504e8600 rand: further bridge gap b/w rand module and PRNG interface (#13719) 2022-03-12 09:41:12 +02:00
36ec47cd20 all: replace "NB:" with "Note:" (docs/comments) 2022-03-06 20:01:22 +03:00
a0d9e6e1c2 rand: extend PRNG interface, add buffering support (#13608) 2022-02-28 13:17:54 +02:00
114a341f5f rand: simplify rand.PRNG, move to optional types for error handling (#13570) 2022-02-23 12:36:14 +02:00
3c38abc56e rand: fix rand.uuid_v4()'s clock_seq_hi_and_reserved field 2022-02-18 12:43:38 +02:00
66f21cae55 rand: add pub fn rand.read(mut buf []byte) and pub fn rand.bytes(needed int) ?[]byte{} + tests 2022-02-06 10:54:34 +02:00
a60b381d5e docs: adding skeleton README.md files for all vlib modules (#13034) 2022-01-05 18:06:08 +02:00
59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
045579fd8a parser: use the [has_globals] module attribute, remove the parser global_enabled_mods whitelist (part 2) 2021-11-16 11:44:36 +02:00
864d6eae6b js: codegen & vlib fixes, replace the Game of Life CLI example (#12272) 2021-10-22 22:03:19 +03:00
d373eba79b js: implement more functions for JS backend (#12167) 2021-10-13 09:40:14 +03:00
0386f2bbea checker: add an interface check for mutability, fixes #1081, fixes #7038 (#11963) 2021-10-11 15:41:31 +03:00
82f187e5e0 js: fix rand build, properly use key values on map, add rand.string (#12020) 2021-10-01 21:23:49 +03:00
afc3531945 ci: work around a failing g++ compilation (order of methods in an interface dispatching table matters for C++ compilers) 2021-09-23 14:08:50 +03:00
8837712f2b rand: fix leaks with -autofree 2021-09-23 12:24:03 +03:00
108a01d65f fmt: fix unnecessary line break in array init (fix #11448) (#11562) 2021-09-21 16:20:09 +03:00
b63ec8fbcf checker: require params attribute to use struct as keyword arguments in function (#11135) 2021-09-14 00:05:30 +03:00
e5360e164a fmt: remove unnecessary parentheses after return (fix #11423) (#11435) 2021-09-08 14:19:53 +03:00
0121c8b4fd v.gen.js: fix method calls and other codegen parts, rand module compiles (#11205) 2021-08-18 11:33:37 +03:00
659f823c5c js: initial work on porting rand module to JS backend (#11188) 2021-08-15 18:09:51 +03:00