Commit Graph

2740 Commits

Author SHA1 Message Date
Jeroen van Rijn
dd8b71e353 [pbm] WIP unit tests. 2022-04-30 17:52:23 +02:00
Jeroen van Rijn
d6a8216ce4 [pbm] Normalize some errors, correct .depth 2022-04-30 14:34:07 +02:00
Jeroen van Rijn
ae3deea153 Merge branch 'master' into pr/1726 2022-04-30 12:29:28 +02:00
Jeroen van Rijn
9c9c2b483c [i18n] Enable *nix tests again. 2022-04-29 18:41:21 +02:00
Jeroen van Rijn
ff0f0c447f [i18n] Fix segfault on destroy on Linux
Forgot to intern the section string in QT TS loader.
2022-04-29 18:10:13 +02:00
Jeroen van Rijn
aa681932a9 Merge pull request #1336 from Kelimion/i18n
[i18n] Initial i18n support.
2022-04-29 16:27:28 +02:00
Jeroen van Rijn
09e1c0fa27 [i18n] Add tests. 2022-04-29 16:19:13 +02:00
Jeroen van Rijn
957ef8e8fe [i18n/xml] Move I18N XML files to their own assets directory. 2022-04-29 13:16:30 +02:00
Jeroen van Rijn
2e11a8da5b [i18n] Move to core:text/i18n. 2022-04-29 13:02:40 +02:00
sduman
9ce64916e6 Add missing result parameter names
This adds some missing result parameters names back to pop_front_safe.

Currently it the procedure won't compile since it's referencing missing variable names.
2022-04-28 17:08:48 -06:00
Jeroen van Rijn
1289c96e2c [i18n] QT Linguist TS reader. 2022-04-29 00:29:55 +02:00
Jeroen van Rijn
ba23bfb7b9 [i18n] Allow multiple sections. 2022-04-28 20:12:32 +02:00
Jeroen van Rijn
2fae6eda23 [i18n] Initial i18n support.
- Add initial GetText .MO parser
- Add translation struct and helpers
- Pluralized lookup

 TODO:
- Support for more translation catalog file formats.
2022-04-28 18:58:49 +02:00
Jeroen van Rijn
80878264b6 [xml] Speedup. 2022-04-28 15:29:00 +02:00
Jeroen van Rijn
6df21d6a9f Merge branch 'master' into xml 2022-04-27 16:13:47 +02:00
gingerBill
bd73b2845b Unify default Sema and Atomic_Sema behaviour 2022-04-27 15:03:48 +01:00
gingerBill
fbbb0d7610 Update intrinsics.odin for documentation 2022-04-27 14:51:04 +01:00
gingerBill
3a9b0a22e7 Add core:container/intrusive/list 2022-04-27 14:27:33 +01:00
Jeroen van Rijn
c4e0d1efa1 Merge branch 'master' into xml 2022-04-27 14:37:15 +02:00
gingerBill
9349dfba8f Add new builtin container_of 2022-04-27 12:39:45 +01:00
gingerBill
9692496989 Add intrinsics.type_field_type 2022-04-27 12:27:53 +01:00
gingerBill
80df9fbc65 Merge pull request #1745 from eisbehr/patch-1
Make allocator in pool_add_task() explicit
2022-04-26 13:49:44 +01:00
gingerBill
c81fd2e5dd Fix #1644 2022-04-26 11:45:46 +01:00
gingerBill
a412d34574 Fix #1740 2022-04-26 11:35:34 +01:00
Florian Behr
ee67a0b9a1 reorder procedure parameters to make sure the optional argument in pool_add_task() is last, and the argument order is consistent with pool_init() 2022-04-25 14:08:09 +02:00
Florian Behr
ca6a1db757 fix doc comment for pool_init 2022-04-25 13:41:39 +02:00
Florian Behr
e01662c139 Make allocator in pool_add_task() explicit 2022-04-25 13:23:05 +02:00
Jeroen van Rijn
63331ef731 Revert "Merge pull request #1702 from Kelimion/filename_generation"
This reverts commit a40a53b104, reversing
changes made to 5422a3b17e.
2022-04-24 19:53:36 +02:00
Jeroen van Rijn
3d2856db31 Update tests to use new filename generation code. 2022-04-24 14:19:25 +02:00
Tetralux
b44b6e7e50 [path/filepath] Add file stem and long-extension procedures
Adds stem(), short_stem(), and long_ext(); also adds doc-comments to base() and ext().

The 'stem' is usually 'the name' of the file; the basename without the file extension.
To this end, this adds stem(), which is such that:

	stem(path) + ext(path) = base(path)

However, 'file extension' has two different meanings to what constitutes it!

 > What is the extension of: 'name.tar.gz' ?

Colloquially, you would likely think of it as 'a tarball' - which you might think is '.tar.gz'.
But, if you're writing code to process a file of this type, you would first treat it
as a Gzip file, and then treat the result as a TAR file - i.e: '.gz' ... _followed by_ '.tar'.

ext() returns '.gz' here, since that is the most-immediate format that you would need to use
to decode it; it would be a Gzip stream.

Sometimes though, you do actually want to consider these longer file extensions.

Perhaps you're extracting a tarball, and what to know what to call the intermediate tar file;
perhaps you want to check to see if this file is a tarball, or just a Gzip file;
or maybe you just want 'the name' of the file, and not this "strange 'name-and-part-of-the-extension' thing".

So, this also adds short_stem() and long_ext(), such that:

	short_stem(path) + long_ext(path) = base(path)

Thus, we can use either, but the most immediately-useful one is the easiest to reach for:

      stem('name.tar.gz') -> 'name.tar'
       ext('name.tar.gz') -> '.gz'

short_stem('name.tar.gz') -> 'name'
  long_ext('name.tar.gz') -> '.tar.gz'

These procedures are identical to their counterparts when the path only has a simple extension:

      stem('name.txt') -> 'name'
       ext('name.txt') -> '.txt'

short_stem('name.txt') -> 'name'
  long_ext('name.txt') -> '.txt'
2022-04-23 20:25:59 +00:00
Jeroen van Rijn
b022167df1 Remove unused fmt. 2022-04-22 17:56:34 +02:00
Jeroen van Rijn
ac9a358c65 [shoco] Replace 2D slices in model with 1D slices. 2022-04-22 17:52:38 +02:00
Jeroen van Rijn
e799476f90 [compress/shoco] Add short string compressor. 2022-04-22 16:55:47 +02:00
hikari
f026753692 strings: levenshtein_distance: remove do 2022-04-21 21:19:43 +03:00
hikari
71b1cce517 strings: levenshtein_distance: 64 is actually faster than 256 2022-04-21 21:19:11 +03:00
hikari
d8f0da164b strings: levenshtein_distance: improve potential caching 2022-04-21 21:15:11 +03:00
hikari
591732f347 strings: levenshtein_distance: remove costs calculation for default array 2022-04-21 20:58:50 +03:00
hikari
eee97f7f62 strings: add levenshtein_distance procedure 2022-04-21 20:49:32 +03:00
Jeroen van Rijn
3dd9da1b66 Merge pull request #1733 from ftphikari/master
sys/windows: add some procedures
2022-04-19 20:41:32 +02:00
Jeroen van Rijn
a30b9b17b3 [json/unmarshal] Fix quoted strings. 2022-04-19 20:32:22 +02:00
Jeroen van Rijn
29b2c04766 Revert "Fix unmarshal for escaped strings."
This reverts commit 581255bf23.
2022-04-19 20:11:02 +02:00
Jeroen van Rijn
581255bf23 Fix unmarshal for escaped strings. 2022-04-19 20:04:38 +02:00
Jeroen van Rijn
b51358a01c Merge pull request #1734 from hanabi1224/lru-alloc-fix
[core:container/lru] Avoid unnecessary allocations
2022-04-19 15:04:49 +02:00
Jeroen van Rijn
7654afc2db Revert "Update mem.nil_allocator to match the same in runtime"
The change broke JSON unmarshaling.

This reverts commit 4484a3433d.
2022-04-19 15:01:54 +02:00
hanabi1224
ded8342f3f Reduce allocations 2022-04-19 20:46:33 +08:00
ftphikari
240fb9b953 Merge branch 'odin-lang:master' into master 2022-04-19 06:00:30 +03:00
hikari
4997a43763 Merge remote-tracking branch 'origin/master' 2022-04-19 05:59:42 +03:00
hikari
aa4eb35671 sys/windows: add some procedures 2022-04-19 05:58:22 +03:00
Jeroen van Rijn
fdd24f787f [image/tga] Writer for RGB(A) 8-bit images. 2022-04-18 23:28:34 +02:00
WalterPlinge
b6abd691f4 Image: Fix implicit enum error 2022-04-18 20:42:50 +01:00