215 Commits
Author SHA1 Message Date
Roman Frołow 72c1a9420b No need to use f for print here 2026-03-18 12:54:07 +01:00
Ribiveer 666c64051a Fix cross_3d in demo.odin
Not a very significant or meaningful change, but it did irk me that the equation was wrong...
2026-02-14 02:11:05 +01:00
gingerBill 2397633618 Update demo.odin 2026-01-30 12:14:59 +00:00
Yawning Angel 0bd6410ea3 examples/demo: Set the RNG to xoshiro256
The example should run on any target, not just first class ones.
2025-11-29 10:45:53 +09:00
Laytan Laats 95a37dd340 remove terminate from demo
This was causing deadlocks because:

1. The main thread would `thread.terminate` a running thread
2. `thread.terminate` does not mean termination happens immediately
3. The thread that was terminated would see that the main thread
   released `print_mutex` and acquire it
4. The worker would execute `fmt.printf` which is a cancellation point
5. Cancellation point reached, cancelled
6. Deadlock because the thread was holding `print_mutex`

You would usually solve this with `pthread_cleanup_push` that would
release the mutex in case it is cancelled, or use
`pthread_setcancelstate` to disable cancellation while the mutex is
held. But the real fix is just not using forced termination and using a
flag or other mechanism to indicate to the thread it should stop.

`thread.terminate` shouldn't even be a thing IMO.
It is way to dangerous and if somebody knows what they are doing they
can use the core:sys procedures to achieve it.

And we certainly shouldn't be using it in the demo as an example.
2025-11-23 19:48:03 +01:00
Gabr1313 2c7ec27445 Fix typos 2025-02-14 14:38:26 +01:00
gingerBill bca08d3b85 Make -no-dynamic-literals the default now 2025-01-05 13:33:06 +00:00
gingerBill e38a08013e Remove #relative types from the compiler 2024-11-14 16:17:24 +00:00
Doeke Wartena 602dab3864 Update demo.odin
type: turns -> returns
2024-11-09 19:47:00 +01:00
Fredrik Vaeng Røtnes 15a8970493 Fix typo in demo.odin 2024-10-09 16:44:17 +00:00
gingerBill 8371ef6681 Merge pull request #4279 from obiwan87/master
Fix compile errors
2024-09-25 17:32:30 +01:00
Jeroen van Rijn 791b05b14f Merge pull request #2600 from Hyrtwol/icon-for-odin-exe
Icon for odin.exe
2024-09-24 17:03:38 +02:00
Antonino Simone Di Stefano 3d202da63f Add missing package qualifier to alloc 2024-09-22 23:15:48 +02:00
Karl Zylinski 19f0127e55 Moved all packages in core, base, vendor, tests and examples to use new #+ file tag syntax. 2024-09-14 18:27:49 +02:00
Thomas la Cour 171d917b7e odin manifest file 2024-08-21 16:26:10 +02:00
gingerBill 649b25fba6 Update the demo.odin to use nil instead of os.ERROR_NONE 2024-08-04 12:47:49 +01:00
gingerBill e9a54666e2 Fix typo. 2024-07-04 14:41:10 +01:00
Laytan Laats 604551eb2d wasi: make the demo run on wasi and run it in CI 2024-06-29 23:15:31 +02:00
gingerBill e296d6fb90 Fix loads of indentation issues with mixing spaces and tabs 2024-06-29 19:50:51 +01:00
gingerBill 913c08a33e Add bit_field to demo.odin 2024-06-29 12:56:46 +01:00
gingerBill 1b593fc1ca Correct core:intrinsics to base:intrinsics 2024-05-13 13:27:44 +01:00
Laytan 043dd98e91 fix demo out of bounds error 2024-05-07 16:52:46 +02:00
Feoramund bbebb4ad60 Fix unseen print call in demo 2024-04-28 17:20:52 -04:00
Vitalii Kravchenko befb0f7868 Core Foundation and Security vendor libraries. 2024-04-13 00:11:42 +01:00
gingerBill d95c28f41b Fix demo docs 2024-01-28 21:39:18 +00:00
gingerBill e57224d6e4 Fix demo 2024-01-28 21:30:08 +00:00
gingerBill 0b83e3dae5 Enforce naming the parameters with builtin.quaternion to reduce confusion 2024-01-05 14:29:14 +00:00
Gary Chike 269957b9fb Update demo.odin
Appears that 'to' and 'abstract' were inverted.
2023-12-21 16:23:00 -05:00
Jeroen van Rijn 4aa8834d39 Add os.args to demo. 2023-11-27 21:01:27 +01:00
gingerBill 648b83d6ea Add or_break and or_continue constructs 2023-09-30 15:04:17 +01:00
gingerBill d9a2d29d00 Update demo.odin to #align(N) style 2023-08-15 15:59:38 +01:00
gingerBill cd74cdfdaf Remove switch in in favour of switch _ in 2023-08-08 14:57:25 +01:00
gingerBill 49ab935ae9 Disallow for in in favour of for _ in 2023-08-08 14:56:12 +01:00
gingerBill 006bd2fe17 Merge pull request #2696 from hwchen/hwchen/fix-parse-call-expr-ellipses
core:odin/parser allow args after varargs in parse_call_expr
2023-08-05 17:07:28 +01:00
gingerBill dd7c2c0574 Update demo for #relative multi-pointers 2023-08-05 16:09:19 +01:00
Walther Chen 4b9afd787c core:odin/parser allow args after varargs in parse_call_expr 2023-08-03 22:45:21 -04:00
gingerBill 60e509b1e0 Add separate -vet flags; -vet-using-* flags; //+vet file flags 2023-07-31 11:09:19 +01:00
gingerBill 9b54b99bf6 Use positional and named arguments within the core library 2023-06-21 01:17:05 +01:00
gingerBill feacc5cd11 Basic enforcement of ordered named arguments/parameters for procedures 2023-06-14 14:03:08 +01:00
Damian Tarnawski c3933cead4 Replace 0 with os.ERROR_NONE in demo.odin 2023-06-11 23:41:26 +02:00
Elusive Porpoise 223ae61c89 added error printing 2023-05-19 11:36:53 -07:00
Elusive Porpoise eff4833840 remove misleading example 2023-05-08 23:13:27 -07:00
Jeroen van Rijn edba99d636 Revert "Use sync.Mutex rather than a spin lock for the threading example"
This reverts commit 8d1f46d837.
2022-08-05 15:03:09 +02:00
gingerBill 8d1f46d837 Use sync.Mutex rather than a spin lock for the threading example 2022-08-05 12:45:26 +01:00
gingerBill 7002f0a7d7 Update demo.odin 2022-05-23 12:07:44 +01:00
Jeroen van Rijn 8fb718245a Implement pthread_cancel. 2022-05-11 15:52:04 +02:00
Florian Behr 1fb76ad768 change usage in demo.odin 2022-04-25 13:41:19 +02:00
gingerBill f2f1330238 Add https://github.com/odin-lang/examples 2022-04-08 10:29:23 +01:00
gingerBill 22b961ea53 Update Thread Pool in core:thread
Thanks to the work of eisbehr
2022-03-31 11:55:46 +01:00
gingerBill 94dbac9a64 Disable thread pool in demo 2022-03-31 01:13:43 +01:00