BQN vs C++

  Рет қаралды 4,628

code_report

code_report

Күн бұрын

Пікірлер: 28
@ayoubelmhamdi7920
@ayoubelmhamdi7920 Жыл бұрын
we need more UIUA please
@TankorSmash
@TankorSmash Жыл бұрын
Glad someone said it!
@davidzwitser
@davidzwitser Жыл бұрын
I’m actually very curious about UIUA being so populair. What makes it so appealing and how do you guys look at BQN for example? :) I myself am deep into BQN and want to get really comfortable with array programming before exploring the other languages personally. I really love BQN so I’m curious how it seems UIUA attracted a bigger chuck of people. Not that I know a lot about the UIUA or the community
@TankorSmash
@TankorSmash Жыл бұрын
@@davidzwitser I'm a newbie, but it's ability to write ASCII names instead of glyphs and lack of overloads seems great, and the debugging is easier with ?. With BQN I kept running into trains I couldn't parse. Tldr the developer experience is very nice. I enjoyed your episode of ArrayCast!
@davidzwitser
@davidzwitser Жыл бұрын
​@@TankorSmash Aah I can actually imagine that. I can see how BQN can have a steeper learning curve (tbh, for me it felt like a straight wall I needed to start climbing, luckily Marchall laid out a cool route and some good rope, aka the BQN documentation).Trains can also be very confusing indeed. After you get used to them they're super nice but I don't know how it compares to the stack based composition in UIUA. I kinda don't like that you write UIUA with ascii names for some reason tho. It makes the glyps feel second class to me but that's very subjective. I'll definitely be exploring UIUA some time tho! Thanks for sharing, and cool to hear that you enjoyed the episode! :)
@TankorSmash
@TankorSmash Жыл бұрын
@@davidzwitser Yeah, the docs for BQN are great! Uiua's are 100% inspired by them too, which is awesome. I managed to write a few tiny things in BQN thanks to how good its pad and docs were too. I definitely understand the ascii vs glyph thing, and I think some people on the cast had similar feelings when hearing about it haha! By default the compiler formats your code and converts it for you, so it makes it easier to type, which is real handy!
@sinom
@sinom Жыл бұрын
Problem with "just call it scan" is there also already are "std::inclusive_scan" and "std::exclusive_scan" and you sometimes want one or the other. So they will probably just call them views::inclusive_scan and views::exclusive_scan and have the same issue. The actual nice way of solving this would be for library implementers to add better error messages, but that isn't part of the standard (and I believe would in some cases also be against the standard but I'm not entirely sure) so there hasn't been too much work in trying to do that. Though in general I've usually gotten somewhat better errors from clang than gcc but also not actually significantly better
@Roibarkan
@Roibarkan Жыл бұрын
I also think “just naming it scan” isn’t ideal. The committee chose std::views::transform (and not std::views::fmap) and similarly for reverse and iota. I’d hope the compilers can be smart enough to give “did you mean …” error messages. As for interoperability between std and ranges-v3 - I tend to agree it’s annoying, and tend to ‘blame’ ranges-v3.
@peterevans6752
@peterevans6752 Жыл бұрын
Thanks! Every comparison video like this helps me learn more about BQN.
@logician1234
@logician1234 Жыл бұрын
Is there a standard foundation for array based programming languages? For example, there is lambda calculus for functional programming.
@Tentcl
@Tentcl Жыл бұрын
That was fun. Now compare the performance of the implementations 😀
@pluieuwu
@pluieuwu Жыл бұрын
wow. the reason why the C++ version broke is just.... so C++. incomplete std forcing people to use external libraries incompatible with std, spew of indecipherable template garbage, mysterious inexplicable segfaults - some things just never change i suppose 😅
@kibels894
@kibels894 Жыл бұрын
Typical experience with that pile they call a standard library. And the compile times with just a few lines of templates, you use this kind of code all across a real project and it can take an hour to compile on a fast machine. Staying far away from this language for the rest of my career.
@dholmes215
@dholmes215 Жыл бұрын
We really need to get to the point where standard ranges and third-party range libraries are all compatible with each other. It's 2024 and I still don't use standard ranges because I want things that are only in Range-v3, and I don't want the headache of mixing the two. Unfortunately I don't see that happening for Range-v3.
@travisporco
@travisporco Жыл бұрын
If you had time a little intro to the bqn language might be a lot of fun.
@magnusmarkling
@magnusmarkling 11 ай бұрын
Wow, I really want to learn C++ after watching this.
@CraigWaterman
@CraigWaterman Жыл бұрын
Love these comparison videos, especially when we're looking at real-life use-cases vs. code golf type items. Two questions: 1) Other than language familiarity are there any particulars keeping you from moving towards UIUA for daily driving vs. BQN? 2) If you're going to start using something like BQN for actual code, are there FFI bindings or other mechanisms you'll be employing to integrate your array lang work into C++ projects? (assuming that would even be necessary for your use-cases)
@geri_freki
@geri_freki Жыл бұрын
В последней версии питона 3.12 есть функция butched 😄 ``` from itertools import accumulate as acc, batched from operator import add, mul chunk_scan = lambda arr, n, f: [x for b in batched(arr, n) for x in acc(b, f)] arr = [1, 2, 3, 4, 5, 6] chunk_scan(arr, 3, add) # [1, 3, 6, 4, 9, 15] chunk_scan(arr, 2, mul) # [1, 2, 3, 12, 5, 30] ```
@chewbaccarampage
@chewbaccarampage Жыл бұрын
Crazy coincidence! I had to build this in C++ 14 at work for image processing. I couldn't find it in algorithms and was sad.
@c4tubo
@c4tubo Жыл бұрын
You continue to make strong cases against using C++, which I appreciate. Note that I've programmed in C++ more than any other language--and am still forced to deal with it in Unreal Engine--so I feel justified in raging against it.
@adicide9070
@adicide9070 Жыл бұрын
do you work in cpp and do bqn and such as a passion project? like is cpp your main gig as far as languages go?
@code_report
@code_report Жыл бұрын
Professionally I use Python and C++ the most, but I am starting to use BQN as a daily driver more and more.
@adicide9070
@adicide9070 Жыл бұрын
i was wondering, at that, if BQN and such were used for like paid work,@@code_report
@adicide9070
@adicide9070 11 ай бұрын
ok followup, @@code_report . you clearly like haskell as well, more than cpp, no? why not get a haskell job and do that full time? there's some jobs out there doing interesting stuff, i bet.
@Yupppi
@Yupppi Жыл бұрын
Please don't angry emoji C++ so hard :( Will you give OCaml a play in some future video? Seems to be rather trendy and an interesting combination of functional and imperative. Obviously not as concise as the symbolic languages. I'm actually really curious where these kinds of problems pop up? Something about matrix operations for cache locality? I actually think you should submit the BQN function to Lenny faces emote page.
@oantolin
@oantolin Жыл бұрын
Given how much you like combinators and tacit programming, I'm surprised you don't like J more, since there you can even write modifiers tacitly! For example: ChunkScan =: ,@((/\\~)-)~
@trashcan3958
@trashcan3958 Жыл бұрын
C++ is pain.
BQN vs Uiua #3
5:29
code_report
Рет қаралды 3 М.
Rust vs C++
7:18
conaticus
Рет қаралды 104 М.
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
C++ vs CUDA vs APL vs BQN
20:47
code_report
Рет қаралды 18 М.
Why I Love BQN So Much! (vs Python)
7:07
code_report
Рет қаралды 14 М.
2 Years of C++ Programming
8:20
Zyger
Рет қаралды 273 М.
Some simple problems solved in C3
20:39
C3Lang
Рет қаралды 1,9 М.
REFERENCES in C++
10:13
The Cherno
Рет қаралды 595 М.
Rust Functions Are Weird (But Be Glad)
19:52
Logan Smith
Рет қаралды 146 М.
A new way to generate worlds (stitched WFC)
10:51
Watt
Рет қаралды 554 М.
Should you learn C++ in 2023?
8:06
Dreams of Code
Рет қаралды 58 М.
The purest coding style, where bugs are near impossible
10:25
Coderized
Рет қаралды 1 МЛН