Adding Julia exercises for #48in24

This track is is reasonable shape for 48in24, with 37 implemented, 10 missing and 1 foregone. There are 4 months remaining of 2024, so it may be worth filling some gaps.

I just submitted a PR for meetup: PR #764, but the CI hated it for reasons currently unknown. I’ll look into that!

Others I’ll look at in the next few weeks:

  • zebra-puzzle, currently in debugging hell (as usual for this exercise)
  • knapsack
  • diamond

It would be great to add the exercises with concurrency (bank-account and parallel-letter-frequency), given that massively parallel computation is a major use case for Julia. That’s not so easy when using just the standard library, but I’ll look into it. Any thoughts?

1 Like

The issue can be solved by: add practice exercise meetup by colinleach · Pull Request #764 · exercism/julia · GitHub

That’s not so easy when using just the standard library, but I’ll look into it.

Is it easy to do with a defacto standard package/dependency/import (I don’t know how packages in Julia work)? If yes, we could add said package to the test runner etc. so all students could use it in their code.

1 Like

Thank you!!

So obvious, once you mention it, but I read straight past this multiple times. Perhaps I spent too much time recently trying to debug zebra-puzzle, a major cause of brain-rot.

2 Likes

I don’t yet know. Julia documentation talks a lot about CUDA magic on the GPU and message-passing protocols on supercomputer clusters, I still need to look for something at the Exercism level.

I’m optimistic about bank-balance but parallel-letter-frequency could be more of a fudge. Like plenty of other tracks: for example, this exercise is available for JS and Ruby (single-threaded) but not Julia or Kotlin.

1 Like

Update: all test now passing for PR #764

1 Like

Fun fact: plf is implement in js multithreaded! (Whaaaaat? Right. Workers!)

I think we have bank balance in kotlin but its not implemented correctly to force concurrency. Never got around to fixing that :relieved::slightly_smiling_face:‍:arrow_up_down:

1 Like

Better than I thought - I unfairly maligned JS.

1 Like

Great work! Merged your PR

1 Like

Knapsack: PR #765

2 Likes

Diamond: PR #766

2 Likes

Think of these as displacement activities as I avoid looking at Zebra Puzzle again.

Edit: Thanks to @depial for putting me straight on multi-level nesting of the tests.

4 Likes

I’ve been exploring Base.Threads (for shared-memory threading) and Distributed (for separate processes, optionally at remote IP addresses). Both are already standard in the test runner.

I found this long dicussion interesting, apparently involving some quite senior Julia developers. One comment got widespread agreement:

I look forward to whichever Julia release improves on this! This isn’t the first language to find that parallel processing is hard to implement in libraries, and hard to document.

I wondered if the higher-level ThreadsX module might be worth adding, as it got enthusiastic reviews when released in 2021. However:

  • This is a 3rd-party project with a single contributor.
  • No updates since 2022.
  • The author seems to have disappeared completely from GitHub.

I’ll keep investigating…

I’ve approved/merged the PRs!

2 Likes