Lightning Talk: C++ vs Haskell vs BQN - Conor Hoekstra - C++ on Sea 2023
Ғылым және технология
cpponsea.uk/
---
Lightning Talk: C++ vs Haskell vs BQN - Conor Hoekstra - C++ on Sea 2023
A single problem solved in C++, Haskell and BQN that highlights combinators.
---
Slides: github.com/philsquared/cppons...
Sponsored By think-cell: www.think-cell.com/en/
---
Conor Hoekstra
Conor (he/him) is a Research Scientist at NVIDIA working on array programming models and languages. He is extremely passionate about programming languages, algorithms and beautiful code. He is the founder and organizer of the Programming Languages Virtual Meetup, he has a KZread channel and is the host of two podcasts: ADSP and ArrayCast. Conor is also an avid conference speaker.
---
C++ on Sea is an annual C++ and coding conference, in Folkestone, in the UK.
- Annual C++ on Sea, C++ conference: cpponsea.uk/
- 2023 Program: cpponsea.uk/2023/schedule/
- Twitter: / cpponsea
---
KZread Videos Filmed, Edited & Optimised by Digital Medium: events.digital-medium.co.uk
#cpp #cpponsea #haskell
Пікірлер: 17
He explained it so well, it’s amazing. It all makes sense to me now.
This is how it should be done. No silly explanations, just plain magic.
Returning the filter view in that context is unfortunately undefined behavior since the view holds a ref towards the vector passed by copy to the function that will then be dangling. To fix it you should call std::move on nums when applying the pipe operator, that will make the view owner of the vector itself will be moved alongside it when returning from the function.
@cristian-si1gb
7 ай бұрын
Taking the vector by const reference in the function also wouldn't solve the issue because that vector might be a lifetime extension of an external prvalue (depending on how the function was called) and it will once again be dangling...
🤯
“Am I going to explain it? Absolutely not!” 😅
I love/hate these lightning talks (see also "How Fast Are Computers " by Matt Godbolt) because on one hand they're so good and funny but on the other hand they leave me craving 30 more minutes of what I've just watched
Short code != good and clear code.
code_report! love you man!
thank you, I will absolutely not check that black voodoo magic, I pretty much like having a sound mind
When they say lightning, they mean it. The one problem with the example is it should have been random data because with a linear progression there's an even easier solution just copying every other element down by a progressive count up without even checking whether they're even or odd, but data in real life isn't so neat.
A weird idea, this format. Still, I am enticed by BQN. Fantaxis = fantastic syntax. Drink when he says "absolutely not" and "folks".
not a race, guys
“Absolutely not”
BQN is more confusing than primer
Lol