Тёмный
code_report
code_report
code_report
Подписаться
Welcome to the code_report RU-vid channel.

From 2018 - 2019, this channel focused on showing solutions to competitive programming problems. In 2020, I transitioned to focusing more on programming languages and showing how to solve problems in different languages. I also upload prerecordings of the Programming Languages Virtual Meetup and livestreams.

The Superpower of C++
7:27
Месяц назад
1 Problem, 4 C++'s
7:16
Месяц назад
State of Array Languages in 2024
4:45
4 месяца назад
Top Programming Languages of 2023!
3:50
4 месяца назад
BQN vs Uiua #3
5:29
5 месяцев назад
BQN vs C++
9:43
5 месяцев назад
More Functional C++?
9:48
5 месяцев назад
BQN vs Jelly
8:17
6 месяцев назад
APL vs BQN vs Uiua
18:09
7 месяцев назад
Python vs Uiua vs BQN
15:47
7 месяцев назад
BQN vs Uiua #2
13:02
8 месяцев назад
BQN vs Uiua
9:38
8 месяцев назад
Uiua! A New Array Language!
4:00
8 месяцев назад
Python vs BQN (1 Problem)
6:40
8 месяцев назад
Python + AI = Rust
7:48
9 месяцев назад
I ❤ BQN and Haskell
12:10
Год назад
C++ vs Rust: Tuples
5:22
Год назад
From C ➡️ C++ ➡️  Rust
14:06
Год назад
I ❤️ APL & BQN
11:11
Год назад
Комментарии
@GY-bd9bo
@GY-bd9bo 3 дня назад
your biggest mistake was showing the world you're a hasan fan
@marcthatcher
@marcthatcher 5 дней назад
This is all good stuff but the fact that you need to spend so long justifying using glyphs tells you why they are the wrong choice. And typing words which turn into glyphs is very clever but just makes it worse! Just stick to the words!!
@danishamjad5807
@danishamjad5807 7 дней назад
Why didn't I have this when I was studying SICP 13 years ago? :/ Great content! Keep it up.
@NabekenProG87
@NabekenProG87 7 дней назад
7:22 ok, now I see how you came to like array languages
@lpbigfish3730
@lpbigfish3730 7 дней назад
This is the thing, that bothers me about Haskell, imagine explaining the code someone and the it comes down to 5 min talk about just 3 ascii characters that do something, which can be done with just one extra function 😂😂
@droid806
@droid806 8 дней назад
Hi man! I'm back here from a couple of years away and I see you completed shift the channel. It's not about algorithms anymore but about these esoteric languages. Please go back to C++ and algorithms or "fork" the channel, a lot of ppl here is hostage to the previous content and don't think is fair.
@piraloco5864
@piraloco5864 9 дней назад
Hey, i want to thank you a lot for all of your incredible videos, recently, while watching your videos, i got the idea to make a stack-based programming language. Here is a solution i made for this problem my new language GRP (grape, totally did not steal APLs naming scheme): MaxParenDepth :: {$> . '(' = {if , 1 else ')' = {if -1 else 0} }} {&> 0 /=} {<# +} {<.> =+=} :: "1+(3-(4*6)+(7/(2-3))-1)" MaxParenDepth |<< Here is a version without the custom operators and with documentation: MaxParenDepth :: {Map . '(' = {if , 1 ; Maps over the string/char array, and returns 1 if the character is equal to '('. The comma ignores the duplicated argument (current character) to make this solution point-free else ')' = {if -1 else 0} ; If the character is equal to ')', return -1, else 0 }} {Filter 0 /=} ; This part filters out the elements that are equal to 0 (keeps 1 and -1 only) {ScanLeft +} ; Scans left with the plus operation {Reduce Max} ; Self explanatory :: "1+(3-(4*6)+(7/(2-3))-1)" MaxParenDepth Print ; Calls the function and prints the result
@landin1181
@landin1181 9 дней назад
I watch and am interested. But I also wonder what the benefit of a language like this is? I just have 0 idea. 😅
@AndrewHelgeCox
@AndrewHelgeCox 9 дней назад
It makes sense to terminate the contains algorithm early if a prime greater than the number being looked up is seen. Like this: template <std::ranges::input_range R, typename T> constexpr auto contains_early_terminate(R&& range, const T& value) -> bool { for (const auto& elem : range) { if (elem > value) { return false; // Terminate early if an element greater than the value is found } if (elem == value) { return true; // Return true if the value is found } } return false; // Return false if the value is not found } constexpr auto is_prime(int n) -> bool { // return std::ranges::contains(primes, n); return contains_early_terminate(primes, n); }
@AndrewHelgeCox
@AndrewHelgeCox 10 дней назад
This came out of a leetcode question for which the test cases are not known at compile time so in that context, constexpr would only be useful to generate the prime table rather than hardcoding as literal values. For that case, the most interesting solution is the 100 bools one. By stuffing the bools into individual bits of a 128 bit SIMD register you can get them out again with a short instruction sequence of shifting, masking and moving to a general purpose register. Presumably C# would have the advantage there with its native SIMD types although we do have `std::experimental::simd` and various non-standard libraries and architecture and compiler-specific intrinsics.
@davidzwitser
@davidzwitser 10 дней назад
Super interesting and inspiring. I love the way Marshall thinks and creates. Fundemental and endlessly innovative
@TankorSmash
@TankorSmash 10 дней назад
1:34:50 "and another thing!" love the length of this, I really enjoy that I get a lot of content from this.
@dharmatech
@dharmatech 10 дней назад
For the folks that want a more readable solution in BQN: Sum ← +´ MapGtZero ← {0 < 𝕩} ScanAdd ← +` SortDown ← ∨ MaxScore ← { Sum MapGtZero ScanAdd SortDown 𝕩 } MaxScore ⟨2, -1, 0, 1, -3, 3, -3⟩
@piraloco5864
@piraloco5864 11 дней назад
Amazing episode! Really looking forward for the continuation of this series! ❤
@TankorSmash
@TankorSmash 11 дней назад
Yeah, it's fun to deep dive into all this stuff. Always interesting to hear more
@peterdamaris7112
@peterdamaris7112 15 дней назад
Scala 3 can run any code at compile time. In fact I think it provides three different ways of running code at compile time, although one of those - the type system, is ~decidable rather than arbitrary code.
@hebozhe
@hebozhe 15 дней назад
Smullyan and Priest write some of the most accessible logic books. I don't study much in this area of logic, but I'd definitely pick through the Smullyan text if I wanted a quick comprehensible dive. Good recommendation.
@ganeshjaggineni4097
@ganeshjaggineni4097 16 дней назад
NICE SUPER EXCELLENT MOTIVATED
@user-tw2kr6hg4r
@user-tw2kr6hg4r 17 дней назад
This should work too int calculate (int bottom, int top) { if (top < bottom) return 0; if (top < 0) return -calculate(-top, -bottom); if (bottom < 0) return calculate(0, top) - calculate(0, -bottom); bottom -= 2; bottom += bottom & 1; bottom >>= 1; top >>= 1; bottom *= bottom + 1; top *= top + 1; return top - bottom; } 30 instructions with o2
@user-tw2kr6hg4r
@user-tw2kr6hg4r 17 дней назад
41 with o3
@user-tw2kr6hg4r
@user-tw2kr6hg4r 17 дней назад
im kinda stupid, it turns out; you can simplify to int calculate (int bottom, int top) { if (top < bottom) return 0; if (top < 0) return -calculate(-top, -bottom); if (bottom < 0) return calculate(0, top) - calculate(0, -bottom); bottom = (bottom - 1) >> 1; bottom *= bottom + 1; top >>= 1; top *= top + 1; return top - bottom; } obviously the 2nd and third statements can be left out if the numbers are always positive. anyway, same length in assembly since the compiler is black magic
@exismys
@exismys 18 дней назад
Let's be honest: this was not the point of original video
@machine.angel.777
@machine.angel.777 18 дней назад
Just for fun, here's the code in Uiua: Calc ← /+▽¬◿2.↘-1:+1⇡:
@Leonhart_93
@Leonhart_93 18 дней назад
When will people just accept that functional programming is a great way of taking clear and concise code and then completely murder it, obfuscating its meaning for everyone else in the process? Just because someone doesn't like the "normal" way of doing things. Yeah yeah, it's stylish because you are the special one doing it, I don't care. Just write the shortest version that uses the most basic tools and avoids std functions where they aren't really required for anything.
@H2CO3Szifon
@H2CO3Szifon 19 дней назад
The final point-free solution seems needlessly complicated. All you need is: {+/⍵×∨⌿0=3 5∘.|⍵}
@0LoneTech
@0LoneTech 19 дней назад
You could also use the shape directly rather than just one side length. I.e. instead of =⌜˜↕≠ you can use =´¨↕≢ Downside: It would no longer error out for rectangular matrices, but check diagonals from the top corners.
@Supremebubble
@Supremebubble 20 дней назад
Python can be made even more intuitive: def maximum_difference(nums): differences = [nums[j] - nums[i] for i in range(len(nums)) for j in range(i+1, len(nums))] return max(differences) if len(differences) > 0 else -1
@okefejoseph6825
@okefejoseph6825 22 дня назад
How do I get the logos?
@DirtMcGurtskie
@DirtMcGurtskie 24 дня назад
Haskall is... has a different syntax. Pretty sure that's my next one to learn.
@quirkyquester
@quirkyquester 25 дней назад
Yepp, great time complexity analysis!
@TankorSmash
@TankorSmash 25 дней назад
I was looking for this upload, but I had to swap to the Live tab in your channel, rather than my subscription feed. Thanks to Kaikalii for making Uiua, and Code Report for putting this podcast together!
@hwstar9416
@hwstar9416 26 дней назад
idk I feel like this isn't as useful as you make it out to be. Realistically your program will mostly be runtime data.
@alexisens8989
@alexisens8989 27 дней назад
The solution I came up with was first noticing that, instead of removing an element, we can just replace it with 1 (neutral element of the multiplication). This can easily be done using the "@" operator. The solution becomes (for example): {(⍳≢⍵){×⌿1@⍺⊢⍵}¨⊂⍵}
@amadocabrera5007
@amadocabrera5007 28 дней назад
Loving your podcasts. Btw, I think that the audio was unbalanced and a little low.
@code_report
@code_report 28 дней назад
Yea, I will fix it for next time. And I normalized the audio for the audio only podcast 👍🏻
@amadocabrera5007
@amadocabrera5007 28 дней назад
@@code_report thanks, looking forward to the next episodes. <3
@sergeibatiuk3468
@sergeibatiuk3468 28 дней назад
... "Even though this is hard to read' ...
@sergeibatiuk3468
@sergeibatiuk3468 28 дней назад
Wins what?
@addcoding8150
@addcoding8150 28 дней назад
nice. second monitor food :)
@chickenonaraft508
@chickenonaraft508 28 дней назад
I think the Scala version was the cleanest
@hidude1354
@hidude1354 29 дней назад
nice solution, only thing to add is that k is bounded by n so we can just write the time complexity as O(n^2 logn)
@quirkyquester
@quirkyquester 25 дней назад
Nope, we doing only k pushes, the heap size is max n, so we doing log n each push, so it’s k log n
@hidude1354
@hidude1354 25 дней назад
@@quirkyquester Once again, k is bounded by n. This means k = O(n^2). You can say O(klogn) but O(klogn) = O(n^2logn)
@hidude1354
@hidude1354 25 дней назад
you could only change it to a different bound if you did some amortized analysis on k, but otherwise k = O(n^2)
@skeleton_craftGaming
@skeleton_craftGaming 29 дней назад
You know It's very easy to forget. You can use namespace like that. [That makes using ranges, and Chrono significantly easier.] Well I mean the calculations do happen. They just happen to compile time instead.
@kaikalii
@kaikalii 29 дней назад
Thanks so much for having me, Conor! Looking forward to your future episodes.
@c4tubo
@c4tubo 29 дней назад
Great show and kickoff, with some of my favorite programming language topics and bird-brains (combinators joke ;-)).
@jashanswork
@jashanswork 29 дней назад
what an explanation
@mehdiyahiacherif2326
@mehdiyahiacherif2326 Месяц назад
I like how dynamic languages are trying to be static like python hints and typescript Static panguages are trying to be dynamic with var, and removing types from definitions
@gentlemanbirdlake
@gentlemanbirdlake Месяц назад
I would like to see how to enact side effects from these terse array languages, more inline effects than just the implicit return at exit. Like in order to actually do something with all this efficient syntax as they run perhaps indefinately like a program loop and incorporating input from one or more streams of unknown termination.
@ShadowKestrel
@ShadowKestrel Месяц назад
'is paralleled by no other language' zig: am i a joke to you?
@user-dw5ch6ux3u
@user-dw5ch6ux3u Месяц назад
here is my own uiua attempt : ≍[]⊚≠2♭⊟/+⍉:/+.≠0 not as elegant as yours but still works
@uraid
@uraid Месяц назад
I’m a stickler for verbosity. I don’t like your python solution because I’d rather a much longer but easier to read function, yes even if it’s less performant
@uraid
@uraid Месяц назад
Interesting because I would rank it… exactly opposite. I like the readability of imperative code and despise whatever that 4 character mess is. Er, no offense
Месяц назад
Hi! thanks for the great demonstration of what constexpr does by showing the resulting assembly code! This is the first time finally functionality of constexpr sink in with me. By "Does constexpr make is_prime O(1)?" I've totally meant "whether it'll be handled at compile time?". I should've been more clear about my intention to not confuse other commenters, but you got it right anyway. ^_^
@connormeredith3144
@connormeredith3144 Месяц назад
Ahhh! Doing Scala so dirty in this one!
@user-dw5ch6ux3u
@user-dw5ch6ux3u Месяц назад
uiua solution i came up with : ↙:⊙(⊗:):\+=@ ."hello how are you contestant" 3
@alejandroramos9461
@alejandroramos9461 Месяц назад
Damn! I got the 1.18 right the first time but because of a syntax error (i didn't define double A, I was doing (* 2 A) because I'm lazy), and I named my main procedure "*" I was having an infinite loop. Syntax errors will get ya eh Thanks for the videos! I'm going through each problem one by one and watching your videos after I complete them!