247 Commits

Author SHA1 Message Date
gingerBill
a750fc0ba6 Add #row_major matrix[R, C]T
As well as `#column_major matrix[R, C]T` as an alias for just `matrix[R, C]T`.
This is because some libraries require a row_major internal layout but still want to be used with row or major oriented vectors.
2024-03-19 21:05:23 +00:00
gingerBill
0f83ab466f Minor change to spacing when printing a map 2024-03-08 13:20:27 +00:00
gingerBill
5ff6a25bdc Improve formatting for %# on maps 2024-03-07 13:45:52 +00:00
gingerBill
b6b8e640f5 Replace b with _ as it is not needed 2024-03-07 13:41:54 +00:00
gingerBill
573402c97e Begin work on %w - 'w'rite as valid Odin literals 2024-03-07 13:39:44 +00:00
gingerBill
0a5c85f8e3 Merge pull request #3207 from Tetralux/printfln
Add `fmt.*printfln`
2024-02-29 14:04:38 +00:00
gingerBill
5c5b78cbbe Improve bit_field printing 2024-02-22 19:48:44 +00:00
gingerBill
54515af8cc Add field tags to bit_field 2024-02-22 19:41:48 +00:00
gingerBill
5a84a08225 Add general support for bit_fields 2024-02-22 17:24:42 +00:00
gingerBill
a4b8c1ea17 Begin work adding bit_field 2024-02-22 15:55:54 +00:00
gingerBill
8472338bfa Add reflect.enum_name_from_value and reflect.enum_name_from_value_any 2024-02-21 12:43:09 +00:00
Tetralux
b1e608bfba [fmt] Add *printfln()
Adds the following procedures, which just call through to the `printf` versions, with `newline = true`; a new parameter
also added in this commit.
In all cases, `wprintf` is the one that ultimately writes the newline, if requested.

- printfln
- fprintfln
- eprintfln
- aprintfln
- tprintfln
- bprintfln
- caprintfln
- ctprintfln
- sbprintfln
- wprintfln
2024-02-18 16:14:59 +00:00
gingerBill
539cec7496 Move Tracking_Allocator to its own file. 2024-02-01 13:01:38 +00:00
gingerBill
3e7e779abf Replace core:* to base:* where appropriate 2024-01-28 22:18:51 +00:00
gingerBill
9a9625f885 Fix #3053 2024-01-26 13:04:47 +00:00
Dragos Popescu
90d1f9ab27 Removed return value of assertf. assertf now correctly responds to -disable-assert. Added log.assert and log.assertf. All asserts now do the @cold trick, first added to builtin.assert 2024-01-23 20:56:13 +02:00
Jeroen van Rijn
89084befb0 Remove unnecessary []byte -> []byte conversion. 2023-12-30 21:59:33 +01:00
gingerBill
55f3e99f63 Fix %g in fmt, and make %v default to %g for floats 2023-12-21 17:05:24 +00:00
Yawning Angel
29c80c238d core: Fixed build constraints
Multiple constraints on the same line are combined with logical OR,
while combining multiple negated constraints needs to be done with
logical AND (each constraint on a separate line).
2023-12-17 23:02:46 +09:00
Laytan Laats
e2cecafa66 allow integer verbs in fmt_bit_set 2023-11-07 21:09:42 +01:00
gingerBill
e206d6ba35 Add allocator parameter to fmt's aprint and aprintln 2023-11-03 13:26:33 +00:00
Jeroen van Rijn
1287e8c734 Merge pull request #2839 from Tetralux/aprintf-ally
[fmt] Add allocator parameter to `fmt.aprintf`
2023-10-02 11:23:26 +02:00
Tetralux
7a6ac3ea92 [fmt] Add allocator parameter to fmt.aprintf
This allows you to do `fmt.aprintf("Hello, %v!", name, allocator = ally)`.
2023-10-02 02:46:26 +00:00
gingerBill
14adcb9db8 Use or_break and or_continue where appropriate in the core library 2023-09-30 15:34:39 +01:00
Laytan Laats
d47b0eeee7 update doc 2023-09-12 16:51:21 +02:00
Laytan Laats
287beaff35 use KiB etc. instead of KB 2023-09-12 16:49:42 +02:00
Laytan Laats
735cfcd290 Add formatting of bytes into the best unit of measurement 2023-09-01 19:17:07 +02:00
gingerBill
515163864f Add optional flush := true to many of the core:fmt procedures 2023-08-22 17:24:12 +01:00
gingerBill
49ab935ae9 Disallow for in in favour of for _ in 2023-08-08 14:56:12 +01:00
gingerBill
c91898a888 Remove #relative slices; Replace with #relative multi-pointers 2023-08-05 16:05:39 +01:00
gingerBill
44ea82f845 Clean up usage of using throughout core and vendor 2023-07-31 11:46:40 +01:00
gingerBill
6c6f9f7d25 Fix fmt implementation for js 2023-06-26 15:55:35 +01:00
gingerBill
19ea090633 Merge pull request #2584 from odin-lang/new-io
New and Improved `io.Stream` interface
2023-06-23 12:12:17 +01:00
gingerBill
9b54b99bf6 Use positional and named arguments within the core library 2023-06-21 01:17:05 +01:00
gingerBill
9ee4b76cd9 Just make the io.Reader etc aliases 2023-06-08 16:38:57 +01:00
gingerBill
ae7bf468d1 Merge pull request #2573 from inbelic/inbelic/fmt-zero-padding
[fmt] fix zero-padding behaviour of numbers
2023-06-07 11:44:53 +01:00
gingerBill
d6f45e4d76 Fix fmt for js 2023-06-06 22:38:43 +01:00
gingerBill
0defd1d141 Correct printing in fmt for ODIN_ERROR_POS_STYLE 2023-06-06 11:17:34 +01:00
finn
6952124988 [fmt] fix zero-padding behaviour of numbers
- when formatting a negative number with left zero-padding we expect the
  padding to be placed between the minus (-) sign and the number
- currently the padding is placed before the sign
2023-06-01 16:04:07 +02:00
gingerBill
32ca50a097 Fix special printing for certain named types with fmt.printf related procedures 2023-05-24 20:54:30 +01:00
gingerBill
023cc9ca54 Partially buffer fmt.fprint* related calls using a bufio.Writer 2023-04-27 00:24:00 +01:00
Jeroen van Rijn
7ffca8ed58 Fix caprintf comment 2023-03-27 11:12:21 +02:00
Jeroen van Rijn
030405dbb6 Update fmt.odin
Fix hardcoded 64 bit, use assert instead of branched panic.
2023-03-27 11:06:29 +02:00
jon lipstate
34b037f19b Update fmt.odin
Update example to use set/register procs.
2023-03-26 11:23:37 -07:00
Jon Lipstate
0892d84c17 corrected bprint 2023-03-25 23:55:37 -07:00
Jon Lipstate
2501d50f9c fmt docs 2023-03-25 23:45:53 -07:00
WraithGlade
adcc865c70 Fixed incorrect precision value in fmt doc.
It seems like `%.2f` is the correct implementation of "precision 2" for displaying floats, not `$.3f`. It prints two decimal places.

Either that or the next case (`%8.3f`) would be wrong instead, if it's the other way around. 

So, there's a mistake here one way or the other at the least.
2023-03-19 22:06:39 -04:00
gingerBill
6179d4feb1 Rename to Type_Info_Parameters 2023-02-08 11:23:21 +00:00
MarenFayre
fd4633eb25 Clean up float_fmt logic 2023-01-10 15:03:53 +01:00
gingerBill
b0756f9e29 Merge pull request #2297 from MarenFayre/d-parsing
Fix off by one error in %d parsing
2023-01-10 12:24:13 +00:00