1 Problem, 16 Programming Languages (C++ vs Rust vs Haskell vs Python vs APL...)
source link: https://www.youtube.com/watch?v=UVUjnzpQKUo
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
1 Problem, 16 Programming Languages (C++ vs Rust vs Haskell vs Python vs APL...)
A video taking a look at 16 programming language solutions (C++, Rust, D, Clojure, Ruby, Elixir, Raku [Perl 6], Haskell, Racket, Julia, Python, APL, J, BQN, Pharo Smalltalk & Fortran) to one problem.
ADSP Podcast: https://adspthepodcast.com/ Array Cast: https://www.arraycast.com/
Contest: 255 Problem Name: Find GCD of Array Problem Link: https://leetcode.com/problems/find-gr... Problem Type: Greedy
Github Links / Chapters: 0:00 Intro 1:47 Problem Statement 2:43 Python: https://github.com/codereport/LeetCod... 3:20 Julia: https://github.com/codereport/LeetCod... 3:50 Raku: https://github.com/codereport/LeetCod... 4:36 Ruby: https://github.com/codereport/LeetCod... 5:00 Elixir: https://github.com/codereport/LeetCod... 5:34 Haskell: https://github.com/codereport/LeetCod... 6:28 Racket: https://github.com/codereport/LeetCod... 6:51 Clojure: https://github.com/codereport/LeetCod... 7:30 C++: https://github.com/codereport/LeetCod... 9:15 D: https://github.com/codereport/LeetCod... 9:35 Rust: https://github.com/codereport/LeetCod... 10:18 APL: https://github.com/codereport/LeetCod... 11:23 Fork / S' Combinator / Starling' / Phoenix 14:18 J: https://github.com/codereport/LeetCod... 15:11 BQN: https://github.com/codereport/LeetCod... 16:52 Pharo: https://github.com/codereport/LeetCod... 17:32 Fortran: https://github.com/codereport/LeetCod... 20:19 Languages not covered 21:30 Rankings 26:00 Summary 26:56 Podcasts and Outro
Follow me on Github: https://github.com/codereport Follow me on Twitter: https://twitter.com/code_report Follow me on LinkedIn: https://www.linkedin.com/company/code...
Show lessShow more
153 Comments
"Languages should have GCD in the core library" - why? How often does the average programmer use this?
Fortran is great for programming array programs across multiple cores and servers - Julia is the modern alternative.
Read more 1 month ago
Read more 1 month ago
liftM2 takes a function (a -> b -> c) and returns a function (f a -> f b -> f c), (f : Monad) note that you don't need the monad constraint since maximum does not rely on the result of minimum or vice versa - and could just use liftA2 from Control.Applicative - not that it matters in this case but Monad is sequential where as solution using Applicative could be made to be parallell.
or: gcd <$> minimum <*> maximum
Read more 1 month ago
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK