JuliaHEP / JuliaHEP-2023

Materials for the JuliaHEP 2023 Workshop
https://juliahep.github.io/JuliaHEP-2023/
Creative Commons Attribution 4.0 International
4 stars 4 forks source link

Some very brief initial sketches of material for Julia concepts #2

Closed aoanla closed 11 months ago

aoanla commented 11 months ago

Hello, this PR is mainly to also surface what I've been playing with a bit in my own branch of the repo. There's 3 notebooks, covering aspects of functions in Julia which are a little different to Python and C++ - composition, per-element broadcasting, and multiple dispatch - they're all a bit brief at the moment, but what I want is for composition to flow into broadcasting (hence the Mandelbrot example at the end of ti), and then to go to multiple dispatch.

Comments on level etc appreciated.

tamasgal commented 11 months ago

Looks nice! Can you put them in a folder with a more specific name, like julia-intro or so?

aoanla commented 11 months ago

Sure, I'll move them elsewhere and add more materials [since these are sort of "in the middle" of a julia intro]

Moelf commented 11 months ago

feel free to take from:

aoanla commented 11 months ago

feel free to take from:

Some of this is very good - and faster at moving through stuff than I was being, which I think is probably better in general?

I'll have a look at stealing some stuff today...

aoanla commented 11 months ago

Question for those in this pull request: @Moelf has some lovely "low-level" demonstrations of how Julia's "built-in" JIT, broadcasting and multiple dispatch and function composition operations allow it to optimise more than Python + NumPy + Numba ever can [because NumPy, Numba don't have low-level control of Python stuff], using the Meta package to show the actual compiled code from LLVM.

I think that, whilst I love this, it's also possibly too much for the "intro workshop" we're looking at?

Thoughts? It would be nice to have some discussion on exactly what we want to cover in this set of materials?

Moelf commented 11 months ago

feel free to move them into "bonus" or "backup", I think it's not worth it if it derails you off your original flow of the tutorial

Moelf commented 11 months ago

before you commit can you like reset the notebook? or do the clear and run all

so the diff is more manageable?

aoanla commented 11 months ago

Whoops - I'd forgotten that the cell execution count gets incremented in the ipynb file each time. I'll do that from now on.

aoanla commented 11 months ago

So: I'd appreciate some comments on where we are with the material at the moment (I was hoping to compare to @szabo137 's material that he mentioned a while ago, but I don't know where that is). I think we cover the "unusual bits" of Julia okay, but not sure about level, and if there's more things we want to go over [or anything more complex]. Type hierarchies, maybe? Useful optimisation libraries like StaticArrays? Actual HEP stuff?

graeme-a-stewart commented 11 months ago

Hi @aoanla - sorry, I have been tied up with many other things this last week. I should be able to make suggestions in next 24 hours.

I'd also like to merge this soon and we iterate from there, because then it's a lot easier to manage incremental improvements.

graeme-a-stewart commented 11 months ago

P.S. Can you add a Project.toml for the broadcast example?

[deps]
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19"
ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254"
ImageShow = "4e3cecfd-b093-5904-9786-8bbb286a6a31"
graeme-a-stewart commented 11 months ago

Thanks @aoanla - merged now! BTW, are you coming to JuliaHEP? We also need to sort out how / who presents this material.

szabo137 commented 11 months ago

@aoanla Sorry for the late reply, but as we discussed today in the VC, here is my intro-material: https://github.com/szabo137/mirror-julia_christmas_workshop2022