Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odin/solution_1 doesn't compile with the current (dev-2024-02) version of Odin #956

Open
rbergen opened this issue Feb 3, 2024 · 2 comments

Comments

@rbergen
Copy link
Contributor

rbergen commented Feb 3, 2024

While updating a number of Docker images published on Docker Hub in the context of this project, I found that the Odin solution does not compile on the current version of Odin.

Without wanting to imply an obligation on the original contributors of the solution, I'm calling out to @omgitsmoe, @gingerBill and @Kelimion in case they would be willing and able to look into this.

@Kelimion
Copy link

Kelimion commented Feb 3, 2024

I don't know why I was credited in this code. It could be that the author asked for some help on the Discord back then.
Anyway, I had a look and it requires substantial changes to get this to run:

  • You can no longer use import statements within a when. The way to do this is to add a foo_windows.odin and foo_linux.odin file that take care of those platform imports depending on the platform. More ideally a get_cpu_topology kind of procedure would be added to core:sys/info, which would tell you how many cores and threads, and if they're E or P cores.
  • -opt:3 has to be be replaced with -o:speed (or -o:aggressive if using LLVM 17)
  • All of the trailing semicolons can go
  • Semaphore became Sema. There's more primitives as well that could be looked at.

And beyond that there may be more. Might be worth someone doing a from scratch rewrite if they're interested.

@rbergen
Copy link
Contributor Author

rbergen commented Feb 4, 2024

@Kelimion Thanks for looking into this to this level, that's very helpful for whoever chooses to pick up making the required changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants