@shd101wyy/yo 0.1.25 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/.github/skills/yo-async-effects/SKILL.md +4 -4
  2. package/.github/skills/yo-async-effects/async-effects-recipes.md +40 -40
  3. package/.github/skills/yo-core-patterns/SKILL.md +1 -1
  4. package/.github/skills/yo-core-patterns/core-patterns-cheatsheet.md +30 -26
  5. package/.github/skills/yo-project-workflow/SKILL.md +6 -3
  6. package/.github/skills/yo-project-workflow/workflow-cheatsheet.md +34 -11
  7. package/.github/skills/yo-syntax/SKILL.md +7 -6
  8. package/.github/skills/yo-syntax/syntax-cheatsheet.md +78 -60
  9. package/.github/skills/yo-wasm-integration/wasm-integration-cheatsheet.md +3 -3
  10. package/README.md +10 -8
  11. package/out/cjs/index.cjs +583 -567
  12. package/out/cjs/yo-cli.cjs +664 -632
  13. package/out/cjs/yo-lsp.cjs +510 -485
  14. package/out/esm/index.mjs +538 -522
  15. package/out/types/src/codegen/codegen-c.d.ts +2 -2
  16. package/out/types/src/codegen/functions/collection.d.ts +2 -2
  17. package/out/types/src/codegen/functions/context.d.ts +3 -2
  18. package/out/types/src/codegen/types/collection.d.ts +2 -2
  19. package/out/types/src/codegen/utils/index.d.ts +3 -1
  20. package/out/types/src/doc/builder.d.ts +2 -2
  21. package/out/types/src/evaluator/calls/closure-type.d.ts +2 -2
  22. package/out/types/src/evaluator/calls/record-type.d.ts +11 -0
  23. package/out/types/src/evaluator/context.d.ts +8 -9
  24. package/out/types/src/evaluator/index.d.ts +3 -3
  25. package/out/types/src/evaluator/types/record.d.ts +14 -0
  26. package/out/types/src/evaluator/types/validation.d.ts +2 -2
  27. package/out/types/src/evaluator/values/anonymous-module.d.ts +5 -5
  28. package/out/types/src/evaluator/values/impl.d.ts +1 -1
  29. package/out/types/src/expr.d.ts +1 -4
  30. package/out/types/src/formatter.d.ts +11 -0
  31. package/out/types/src/function-value.d.ts +1 -1
  32. package/out/types/src/lsp/document-manager.d.ts +1 -1
  33. package/out/types/src/lsp/formatting.d.ts +2 -0
  34. package/out/types/src/module-manager.d.ts +3 -3
  35. package/out/types/src/tests/formatter.test.d.ts +1 -0
  36. package/out/types/src/types/creators.d.ts +3 -4
  37. package/out/types/src/types/definitions.d.ts +8 -19
  38. package/out/types/src/types/guards.d.ts +3 -3
  39. package/out/types/src/types/tags.d.ts +0 -1
  40. package/out/types/src/types/utils.d.ts +1 -1
  41. package/out/types/src/value-tag.d.ts +0 -1
  42. package/out/types/src/value.d.ts +6 -13
  43. package/out/types/tsconfig.tsbuildinfo +1 -1
  44. package/package.json +1 -1
  45. package/std/alg/hash.yo +13 -21
  46. package/std/allocator.yo +25 -40
  47. package/std/async.yo +3 -7
  48. package/std/build.yo +105 -151
  49. package/std/cli/arg_parser.yo +184 -169
  50. package/std/collections/array_list.yo +350 -314
  51. package/std/collections/btree_map.yo +142 -131
  52. package/std/collections/deque.yo +132 -128
  53. package/std/collections/hash_map.yo +542 -566
  54. package/std/collections/hash_set.yo +623 -687
  55. package/std/collections/linked_list.yo +275 -293
  56. package/std/collections/ordered_map.yo +113 -85
  57. package/std/collections/priority_queue.yo +73 -73
  58. package/std/crypto/md5.yo +191 -95
  59. package/std/crypto/random.yo +56 -64
  60. package/std/crypto/sha256.yo +151 -107
  61. package/std/encoding/base64.yo +87 -81
  62. package/std/encoding/hex.yo +43 -50
  63. package/std/encoding/html.yo +56 -81
  64. package/std/encoding/html_char_utils.yo +7 -13
  65. package/std/encoding/html_entities.yo +2248 -2253
  66. package/std/encoding/json.yo +316 -224
  67. package/std/encoding/punycode.yo +86 -116
  68. package/std/encoding/toml.yo +67 -66
  69. package/std/encoding/utf16.yo +37 -44
  70. package/std/env.yo +62 -91
  71. package/std/error.yo +12 -20
  72. package/std/fmt/display.yo +5 -9
  73. package/std/fmt/index.yo +8 -14
  74. package/std/fmt/to_string.yo +330 -315
  75. package/std/fmt/writer.yo +58 -87
  76. package/std/fs/dir.yo +83 -102
  77. package/std/fs/file.yo +147 -180
  78. package/std/fs/metadata.yo +45 -78
  79. package/std/fs/temp.yo +55 -65
  80. package/std/fs/types.yo +27 -40
  81. package/std/fs/walker.yo +53 -68
  82. package/std/gc.yo +5 -8
  83. package/std/glob.yo +30 -43
  84. package/std/http/client.yo +107 -120
  85. package/std/http/http.yo +106 -96
  86. package/std/http/index.yo +4 -6
  87. package/std/imm/list.yo +88 -93
  88. package/std/imm/map.yo +528 -464
  89. package/std/imm/set.yo +52 -57
  90. package/std/imm/sorted_map.yo +340 -286
  91. package/std/imm/sorted_set.yo +57 -63
  92. package/std/imm/string.yo +404 -345
  93. package/std/imm/vec.yo +173 -181
  94. package/std/io/reader.yo +3 -6
  95. package/std/io/writer.yo +4 -8
  96. package/std/libc/assert.yo +5 -9
  97. package/std/libc/ctype.yo +32 -22
  98. package/std/libc/dirent.yo +26 -25
  99. package/std/libc/errno.yo +164 -90
  100. package/std/libc/fcntl.yo +52 -45
  101. package/std/libc/float.yo +66 -44
  102. package/std/libc/limits.yo +42 -33
  103. package/std/libc/math.yo +53 -82
  104. package/std/libc/signal.yo +72 -47
  105. package/std/libc/stdatomic.yo +217 -188
  106. package/std/libc/stdint.yo +5 -29
  107. package/std/libc/stdio.yo +5 -29
  108. package/std/libc/stdlib.yo +32 -39
  109. package/std/libc/string.yo +5 -23
  110. package/std/libc/sys/stat.yo +58 -56
  111. package/std/libc/time.yo +5 -19
  112. package/std/libc/unistd.yo +5 -20
  113. package/std/libc/wctype.yo +6 -9
  114. package/std/libc/windows.yo +26 -30
  115. package/std/log.yo +41 -55
  116. package/std/net/addr.yo +102 -97
  117. package/std/net/dns.yo +27 -28
  118. package/std/net/errors.yo +50 -49
  119. package/std/net/tcp.yo +113 -124
  120. package/std/net/udp.yo +55 -66
  121. package/std/os/env.yo +35 -33
  122. package/std/os/signal.yo +15 -25
  123. package/std/path.yo +276 -311
  124. package/std/prelude.yo +6316 -4333
  125. package/std/process/command.yo +87 -103
  126. package/std/process/index.yo +12 -31
  127. package/std/regex/compiler.yo +196 -95
  128. package/std/regex/flags.yo +58 -39
  129. package/std/regex/index.yo +157 -173
  130. package/std/regex/match.yo +20 -31
  131. package/std/regex/node.yo +134 -152
  132. package/std/regex/parser.yo +283 -259
  133. package/std/regex/unicode.yo +172 -202
  134. package/std/regex/vm.yo +155 -171
  135. package/std/string/index.yo +5 -7
  136. package/std/string/rune.yo +45 -55
  137. package/std/string/string.yo +937 -964
  138. package/std/string/string_builder.yo +94 -104
  139. package/std/string/unicode.yo +46 -64
  140. package/std/sync/channel.yo +72 -73
  141. package/std/sync/cond.yo +31 -36
  142. package/std/sync/mutex.yo +30 -32
  143. package/std/sync/once.yo +13 -16
  144. package/std/sync/rwlock.yo +26 -31
  145. package/std/sync/waitgroup.yo +20 -25
  146. package/std/sys/advise.yo +16 -24
  147. package/std/sys/bufio/buf_reader.yo +77 -93
  148. package/std/sys/bufio/buf_writer.yo +52 -65
  149. package/std/sys/clock.yo +4 -9
  150. package/std/sys/constants.yo +77 -61
  151. package/std/sys/copy.yo +4 -10
  152. package/std/sys/dir.yo +26 -43
  153. package/std/sys/dns.yo +41 -61
  154. package/std/sys/errors.yo +95 -103
  155. package/std/sys/events.yo +45 -57
  156. package/std/sys/externs.yo +319 -267
  157. package/std/sys/fallocate.yo +7 -11
  158. package/std/sys/fcntl.yo +14 -22
  159. package/std/sys/file.yo +26 -40
  160. package/std/sys/future.yo +5 -8
  161. package/std/sys/iov.yo +12 -25
  162. package/std/sys/lock.yo +12 -13
  163. package/std/sys/mmap.yo +38 -43
  164. package/std/sys/path.yo +3 -8
  165. package/std/sys/perm.yo +7 -21
  166. package/std/sys/pipe.yo +5 -12
  167. package/std/sys/process.yo +23 -29
  168. package/std/sys/seek.yo +10 -12
  169. package/std/sys/signal.yo +7 -13
  170. package/std/sys/signals.yo +52 -35
  171. package/std/sys/socket.yo +63 -58
  172. package/std/sys/socketpair.yo +3 -6
  173. package/std/sys/sockinfo.yo +11 -20
  174. package/std/sys/statfs.yo +11 -34
  175. package/std/sys/statx.yo +25 -52
  176. package/std/sys/sysinfo.yo +15 -20
  177. package/std/sys/tcp.yo +62 -92
  178. package/std/sys/temp.yo +5 -9
  179. package/std/sys/time.yo +5 -15
  180. package/std/sys/timer.yo +6 -11
  181. package/std/sys/tty.yo +10 -18
  182. package/std/sys/udp.yo +22 -39
  183. package/std/sys/umask.yo +3 -6
  184. package/std/sys/unix.yo +33 -52
  185. package/std/testing/bench.yo +49 -52
  186. package/std/thread.yo +10 -15
  187. package/std/time/datetime.yo +105 -89
  188. package/std/time/duration.yo +43 -56
  189. package/std/time/instant.yo +13 -18
  190. package/std/time/sleep.yo +5 -9
  191. package/std/url/index.yo +184 -209
  192. package/std/worker.yo +6 -10
  193. package/out/types/src/evaluator/calls/module-type.d.ts +0 -11
  194. package/out/types/src/evaluator/types/module.d.ts +0 -19
package/std/libc/float.yo CHANGED
@@ -1,56 +1,80 @@
1
1
  //! C11 `<float.h>` — floating-point implementation limits.
2
-
3
- c_include "<float.h>",
2
+ c_include(
3
+ "<float.h>",
4
4
  // Floating-point model parameters
5
- FLT_RADIX : int, // Radix of exponent representation (usually 2)
6
- FLT_ROUNDS : int, // Floating-point rounding mode
7
- FLT_EVAL_METHOD : int, // Evaluation method (C99/C11)
8
-
5
+ FLT_RADIX : int,
6
+ // Radix of exponent representation (usually 2)
7
+ FLT_ROUNDS : int,
8
+ // Floating-point rounding mode
9
+ FLT_EVAL_METHOD : int,
10
+ // Evaluation method (C99/C11)
9
11
  // Decimal precision
10
- DECIMAL_DIG : int, // Decimal digits for round-trip conversion (C99/C11)
11
-
12
+ DECIMAL_DIG : int,
13
+ // Decimal digits for round-trip conversion (C99/C11)
12
14
  // Float (single precision) limits
13
- FLT_DIG : int, // Decimal digits of precision
14
- FLT_EPSILON : f32, // Smallest representable positive number x such that 1.0 + x != 1.0
15
- FLT_MANT_DIG : int, // Number of base-FLT_RADIX digits in mantissa
16
- FLT_MAX : f32, // Maximum representable finite value
17
- FLT_MAX_10_EXP : int, // Maximum int such that 10^n is representable
18
- FLT_MAX_EXP : int, // Maximum int such that FLT_RADIX^(n-1) is representable
19
- FLT_MIN : f32, // Minimum normalized positive value
20
- FLT_MIN_10_EXP : int, // Minimum int such that 10^n is normalized
21
- FLT_MIN_EXP : int, // Minimum int such that FLT_RADIX^(n-1) is normalized
22
-
15
+ FLT_DIG : int,
16
+ // Decimal digits of precision
17
+ FLT_EPSILON : f32,
18
+ // Smallest representable positive number x such that 1.0 + x != 1.0
19
+ FLT_MANT_DIG : int,
20
+ // Number of base-FLT_RADIX digits in mantissa
21
+ FLT_MAX : f32,
22
+ // Maximum representable finite value
23
+ FLT_MAX_10_EXP : int,
24
+ // Maximum int such that 10^n is representable
25
+ FLT_MAX_EXP : int,
26
+ // Maximum int such that FLT_RADIX^(n-1) is representable
27
+ FLT_MIN : f32,
28
+ // Minimum normalized positive value
29
+ FLT_MIN_10_EXP : int,
30
+ // Minimum int such that 10^n is normalized
31
+ FLT_MIN_EXP : int,
32
+ // Minimum int such that FLT_RADIX^(n-1) is normalized
23
33
  // Double (double precision) limits
24
- DBL_DIG : int, // Decimal digits of precision
25
- DBL_EPSILON : f64, // Smallest representable positive number x such that 1.0 + x != 1.0
26
- DBL_MANT_DIG : int, // Number of base-FLT_RADIX digits in mantissa
27
- DBL_MAX : f64, // Maximum representable finite value
28
- DBL_MAX_10_EXP : int, // Maximum int such that 10^n is representable
29
- DBL_MAX_EXP : int, // Maximum int such that FLT_RADIX^(n-1) is representable
30
- DBL_MIN : f64, // Minimum normalized positive value
31
- DBL_MIN_10_EXP : int, // Minimum int such that 10^n is normalized
32
- DBL_MIN_EXP : int, // Minimum int such that FLT_RADIX^(n-1) is normalized
33
-
34
+ DBL_DIG : int,
35
+ // Decimal digits of precision
36
+ DBL_EPSILON : f64,
37
+ // Smallest representable positive number x such that 1.0 + x != 1.0
38
+ DBL_MANT_DIG : int,
39
+ // Number of base-FLT_RADIX digits in mantissa
40
+ DBL_MAX : f64,
41
+ // Maximum representable finite value
42
+ DBL_MAX_10_EXP : int,
43
+ // Maximum int such that 10^n is representable
44
+ DBL_MAX_EXP : int,
45
+ // Maximum int such that FLT_RADIX^(n-1) is representable
46
+ DBL_MIN : f64,
47
+ // Minimum normalized positive value
48
+ DBL_MIN_10_EXP : int,
49
+ // Minimum int such that 10^n is normalized
50
+ DBL_MIN_EXP : int,
51
+ // Minimum int such that FLT_RADIX^(n-1) is normalized
34
52
  // Long double (extended precision) limits
35
- LDBL_DIG : int, // Decimal digits of precision
36
- LDBL_EPSILON : longdouble, // Smallest representable positive number x such that 1.0 + x != 1.0
37
- LDBL_MANT_DIG : int, // Number of base-FLT_RADIX digits in mantissa
38
- LDBL_MAX : longdouble, // Maximum representable finite value
39
- LDBL_MAX_10_EXP : int, // Maximum int such that 10^n is representable
40
- LDBL_MAX_EXP : int, // Maximum int such that FLT_RADIX^(n-1) is representable
41
- LDBL_MIN : longdouble, // Minimum normalized positive value
42
- LDBL_MIN_10_EXP : int, // Minimum int such that 10^n is normalized
43
- LDBL_MIN_EXP : int // Minimum int such that FLT_RADIX^(n-1) is normalized
44
- ;
45
-
53
+ LDBL_DIG : int,
54
+ // Decimal digits of precision
55
+ LDBL_EPSILON : longdouble,
56
+ // Smallest representable positive number x such that 1.0 + x != 1.0
57
+ LDBL_MANT_DIG : int,
58
+ // Number of base-FLT_RADIX digits in mantissa
59
+ LDBL_MAX : longdouble,
60
+ // Maximum representable finite value
61
+ LDBL_MAX_10_EXP : int,
62
+ // Maximum int such that 10^n is representable
63
+ LDBL_MAX_EXP : int,
64
+ // Maximum int such that FLT_RADIX^(n-1) is representable
65
+ LDBL_MIN : longdouble,
66
+ // Minimum normalized positive value
67
+ LDBL_MIN_10_EXP : int,
68
+ // Minimum int such that 10^n is normalized
69
+ LDBL_MIN_EXP : int // Minimum int such that FLT_RADIX^(n-1) is normalized
70
+ );
46
71
  // Export all float limits
47
- export
72
+ export(
48
73
  // General parameters
49
74
  FLT_RADIX,
50
75
  FLT_ROUNDS,
51
76
  FLT_EVAL_METHOD,
52
77
  DECIMAL_DIG,
53
-
54
78
  // Float limits
55
79
  FLT_DIG,
56
80
  FLT_EPSILON,
@@ -61,7 +85,6 @@ export
61
85
  FLT_MIN,
62
86
  FLT_MIN_10_EXP,
63
87
  FLT_MIN_EXP,
64
-
65
88
  // Double limits
66
89
  DBL_DIG,
67
90
  DBL_EPSILON,
@@ -72,7 +95,6 @@ export
72
95
  DBL_MIN,
73
96
  DBL_MIN_10_EXP,
74
97
  DBL_MIN_EXP,
75
-
76
98
  // Long double limits
77
99
  LDBL_DIG,
78
100
  LDBL_EPSILON,
@@ -83,4 +105,4 @@ export
83
105
  LDBL_MIN,
84
106
  LDBL_MIN_10_EXP,
85
107
  LDBL_MIN_EXP
86
- ;
108
+ );
@@ -1,38 +1,51 @@
1
1
  //! C11 `<limits.h>` — implementation-defined limits for integer types.
2
-
3
- c_include "<limits.h>",
2
+ c_include(
3
+ "<limits.h>",
4
4
  // Character limits
5
- CHAR_BIT : int, // Number of bits in a char (at least 8)
6
- SCHAR_MIN : char, // Minimum value for signed char
7
- SCHAR_MAX : char, // Maximum value for signed char
8
- UCHAR_MAX : char, // Maximum value for unsigned char
9
- CHAR_MIN : char, // Minimum value for char (depends on signedness)
10
- CHAR_MAX : char, // Maximum value for char (depends on signedness)
11
- MB_LEN_MAX : int, // Maximum bytes in a multibyte character
12
-
5
+ CHAR_BIT : int,
6
+ // Number of bits in a char (at least 8)
7
+ SCHAR_MIN : char,
8
+ // Minimum value for signed char
9
+ SCHAR_MAX : char,
10
+ // Maximum value for signed char
11
+ UCHAR_MAX : char,
12
+ // Maximum value for unsigned char
13
+ CHAR_MIN : char,
14
+ // Minimum value for char (depends on signedness)
15
+ CHAR_MAX : char,
16
+ // Maximum value for char (depends on signedness)
17
+ MB_LEN_MAX : int,
18
+ // Maximum bytes in a multibyte character
13
19
  // Short integer limits
14
- SHRT_MIN : short, // Minimum value for short
15
- SHRT_MAX : short, // Maximum value for short
16
- USHRT_MAX : ushort, // Maximum value for unsigned short
17
-
20
+ SHRT_MIN : short,
21
+ // Minimum value for short
22
+ SHRT_MAX : short,
23
+ // Maximum value for short
24
+ USHRT_MAX : ushort,
25
+ // Maximum value for unsigned short
18
26
  // Integer limits
19
- INT_MIN : int, // Minimum value for int
20
- INT_MAX : int, // Maximum value for int
21
- UINT_MAX : uint, // Maximum value for unsigned int
22
-
27
+ INT_MIN : int,
28
+ // Minimum value for int
29
+ INT_MAX : int,
30
+ // Maximum value for int
31
+ UINT_MAX : uint,
32
+ // Maximum value for unsigned int
23
33
  // Long integer limits
24
- LONG_MIN : long, // Minimum value for long
25
- LONG_MAX : long, // Maximum value for long
26
- ULONG_MAX : ulong, // Maximum value for unsigned long
27
-
34
+ LONG_MIN : long,
35
+ // Minimum value for long
36
+ LONG_MAX : long,
37
+ // Maximum value for long
38
+ ULONG_MAX : ulong,
39
+ // Maximum value for unsigned long
28
40
  // Long long integer limits (C99/C11)
29
- LLONG_MIN : longlong, // Minimum value for long long
30
- LLONG_MAX : longlong, // Maximum value for long long
31
- ULLONG_MAX : ulonglong // Maximum value for unsigned long long
32
- ;
33
-
41
+ LLONG_MIN : longlong,
42
+ // Minimum value for long long
43
+ LLONG_MAX : longlong,
44
+ // Maximum value for long long
45
+ ULLONG_MAX : ulonglong // Maximum value for unsigned long long
46
+ );
34
47
  // Export all limits
35
- export
48
+ export(
36
49
  // Character limits
37
50
  CHAR_BIT,
38
51
  SCHAR_MIN,
@@ -41,24 +54,20 @@ export
41
54
  CHAR_MIN,
42
55
  CHAR_MAX,
43
56
  MB_LEN_MAX,
44
-
45
57
  // Short integer limits
46
58
  SHRT_MIN,
47
59
  SHRT_MAX,
48
60
  USHRT_MAX,
49
-
50
61
  // Integer limits
51
62
  INT_MIN,
52
63
  INT_MAX,
53
64
  UINT_MAX,
54
-
55
65
  // Long integer limits
56
66
  LONG_MIN,
57
67
  LONG_MAX,
58
68
  ULONG_MAX,
59
-
60
69
  // Long long integer limits
61
70
  LLONG_MIN,
62
71
  LLONG_MAX,
63
72
  ULLONG_MAX
64
- ;
73
+ );