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

WIP draft of tuples concept #811

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

colinleach
Copy link
Contributor

A popular exercise to go with this is tisbury-treasure-hunt (Python and several other languages), but we have multiple choices.

@depial
Copy link
Contributor

depial commented Oct 18, 2024

I'm not sure if it's too advanced of a topic, but we could mention that tuples can still be broadcast over (requiring the . syntax to do so).

1 .+ (3, 2) = (4, 3)
1 +  (3, 2) = MethodError

It might also be good to mention that tuples are more performant than vectors, so should be preferred in cases when mutability isn't necessary.

@colinleach
Copy link
Contributor Author

It might also be good to mention that tuples are more performant than vectors

Definitely yes.

we could mention that tuples can still be broadcast over

Maybe/probably. I'm still trying to work out what to do about introducing broadcasting, but it's moving up my TODO list. It's important!

For mixed reasons, I haven't made much progress on the Julia syllabus in the last few days. I'm currently getting near the end of the Randomness concept (I hope!), which turned out to be significantly more complicated and difficult than I expected. There has been talk in the Julia core team about reorganizing all the statistics-related stuff, and I hope they get it sorted. Currently, things are scattered around in a way I find quite confusing, and struggle to explain to students in the syllabus.

@depial
Copy link
Contributor

depial commented Oct 18, 2024

For mixed reasons, I haven't made much progress on the Julia syllabus in the last few days.

You've made huge progress as is, so no need to explain downtime :)

I was wondering if you would like me to make the lessons for these wips when one is decided upon? It's something I quite enjoy doing (since it involves solving the exercise in Julia), so I'm more than happy to contribute in this way.

@depial
Copy link
Contributor

depial commented Oct 18, 2024

Maybe/probably. I'm still trying to work out what to do about introducing broadcasting, but it's moving up my TODO list. It's important!

Come to think of it, I would assume it's best left to a full concept rather than an aside, so maybe best to be left out here.

@colinleach
Copy link
Contributor Author

colinleach commented Oct 18, 2024

I was wondering if you would like me to make the lessons for these wips when one is decided upon?

Absolutely! You'll notice I have mostly concentrated on Concepts, rather than exercises. Various reasons:

  • It helps me get my old, tired head around what needs to be done and how it fits together.
  • Single-author first drafts help keep the style consistent (for better or worse!).
  • You previously expressed an interest in working on exercises, so (with a couple of exceptions) I steered away from them.
  • I'm learning a lot about Julia which I should have known before committing to this syllabus, but very clearly didn't (hubris getting found out!).

Feel free to pick your exercises, either from what we discussed or from your own ideas. Once we know the scope of the exercise, we can cut down the corresponding about.md to an introduction.md. Always remembering "Jeremy's Rule" that the intro should contain only what the student needs to solve the exercise: the boss is pretty intense about this.

I assume you've read the documentation on this? We'll be under pressure to conform, both to avoid repeating past syllabus mistakes (by no means just Julia - several tracks failed and were abandoned), and to help the GH repo integrate well with the website.

@depial
Copy link
Contributor

depial commented Oct 18, 2024

Sounds good! I'll try to follow the specs as best I can.

How should we join the exercises and concepts? Should I just keep them in my fork until we're ready?

@colinleach
Copy link
Contributor Author

How should we join the exercises and concepts? Should I just keep them in my fork until we're ready?

It's a bit complicated to know where to put things, given the pushback we got on tidying up the existing repo structure. When I PRd squeaky-clean and currency-exchange, I put them in exercises/concept (their final location), but submitted them as draft to avoid triggering a review before we're ready. That just requires finding the right option on GH, which I sometimes still struggle with.

I've mostly been putting the concepts in concepts.wip, but with hindsight I don't think that was the best choice.

You'll notice I've been PR'ing stuff well before it is ready for review, so it's entirely up to you how long you keep them on your own fork. I do the early trial-and-error stuff on an entirely separate private repo that I would be embarrassed to show to the world!

@depial
Copy link
Contributor

depial commented Oct 19, 2024

Maybe we can create a new folder to keep the exercises before we merge everything? I find it's kind of a pain to keep more than one on a fork before merging.

I'll look into creating some exercises tomorrow (or the day after) that align with what we've talked about.

@colinleach
Copy link
Contributor Author

Your choice, whatever works for you.

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

Successfully merging this pull request may close these issues.

2 participants