ProgrammerHumor

aICannotReplaceHim

aICannotReplaceHim
https://i.redd.it/pizyq6sl0adf1.jpeg
Reddit

Discussion

critical_patch
:py:

Ahh, back in college 20 years ago I learned how to do UI in C using OpenGL. That was only a two week lesson in an academic setting, and even then I was like nah I’m done with this FOREVER

1 day ago
Dragonasaur

But how performant was that UI

1 day ago
gandalfx
:ts::py::bash:

The thing about low level programming is that while you can make things fast you can also make things slow and shitty and with way more bugs. C doesn't just magically make things faster, it takes actual skill and effort.

1 day ago
You_are_adopted

Oh, skill and effort was what I was missing. Can I import that?

23 hours ago
gandalfx
:ts::py::bash:

There's an npm package but it depends on left pad :/

23 hours ago
Windyvale
:cs:

Obviously that’s an immediate import.

18 hours ago
Fenor

god i recall when lpad was pulled by the developer and it was utter chaos as everything broke

9 hours ago
Im2bored17

Oo I found another package. And it's actively maintained! Huh, looks like there was some drama between the creator and some other guy a few months back and the creator quit...

7 hours ago
Blue_Robin_Gaming
:py::ts::gd:

is it async? I need it in async

3 hours ago
_dactor_

Can only be lazy loaded

15 hours ago
RiceBroad4552
:s:

But the Rust folks say, when you code in Rust it will be "blazingly fast and memory-efficient", just because Rust!

They don't want to believe (even I've seen samples in the past) that when an average dev translates some average code in, say Java, to Rust the result will be almost certainly a few times slower than when run on the JVM.

23 hours ago
ComprehensiveWord201

Ah yes, "The Rust Folks", AKA the straw man/generalized group "they" who all think homogenously.

21 hours ago
port443

The reason they put that in quotes is its literally stated on the Rust website as a fact.

And then here's a literal "I'm a Java dev wanting to use Rust" with multiple Rust people stating that just using Rust will make code more gooder: https://users.rust-lang.org/t/is-rust-really-faster-than-java-because-of-memory-management/80651

So no, its not a straw man.

18 hours ago
Electric-Molasses

Okay but you're comparing it to Java, so in this case they're actually right.

It doesn't have to be Rust. It just has to not be Java.

You should also actually read your source:

I think you actually missed the important point: main different lies not with languages, but with people.

In reality you can write Java code which would be, very often, faster than Rust. Just put all the object in one large array and use indexes to manage data. And JIT would do amazing job.

But that's extremely unidiomatic. The ideomatic way is factory factory factory pattern. And Dependency Injection. And lots of overhead. I have never seen anything like RequestProcessorFactoryFactory.

Because Rust makes you cares about memory and that shows. But no, there are no magic in Rust. Carefully written and thought-out code in Java can be as fast or faster than Rust. Only no one very few write carefully and thoughtfully in Java. While in Rust that's the norm.

You're cherry picking and ignoring everything else.

17 hours ago
RiceBroad4552
:s:

I mean, you're both right. Actually you both just repeat what I've said, paragraph by paragraph. 😃

The main point in fact wasn't Java. It was that Rust is a little overselling. Simply no language does magic. Including C.

When it comes to the concrete comparison I should have said "JVM" not "Java". It's the VM and it's byte code which run reasonably fast. And it runs even the typical Java OOP-spaghetti fast, as it's optimized for it.

The later is the factor which makes naively translated Java to Rust often slower than on the JVM. The JVM can optimize stuff on the go, utilizing runtime information. Rust can not do that usually. (There's PGO, but most of the time you don't know the workload in advance.)

But yes the, the OOP-spaghetti has large overhead. If you did translate it to idiomatic Rust you could get much better performance and especially orders of magnitude better memory utilization.

OOP-spaghetti is in fact a cultural thing. But the JVM doesn't force you to do it like that. You could try to mimic idiomatic Rust, and than it will be likely again competitive fast. (But please let us not talk about the memory overhead. At least not until Valhalla is fully implemented.)

Also, if you like some higher level language on the JVM, there is Scala. It has some features Rust has not. OTOH it lacks currently features for semi-automatic garbage collection without GC, and language level, safe concurrently primitives, like Rust offers, even there is Scala Native. But they work on that.

2 hours ago
Turtvaiz

So no, its not a straw man

But is it even correct? What code runs slower in rust than in java?

The straw man here is thinking that fast language = fast code automatically, which is stupid

17 hours ago
Impressive_Bed_287

https://users.rust-lang.org/t/is-rust-really-faster-than-java-because-of-memory-management/80651

13 hours ago
DearChickPeas

Found the vegan.

13 hours ago
ComprehensiveWord201

I love meat :) But I also hate language evangelists with a fiery passion, and anyone who continues to serve the narrative.

6 hours ago
DearChickPeas

Right, say something negative about rust...

1 hour ago
ComprehensiveWord201

I could rave about most languages all day! They all suck for their own reasons.

Rust is verbose and cumbersome in larger projects. Some might argue the inflexibility is a feature but it's another hurdle to surmount for sure.

And don't get me started on the open/implicit returns. Jesus. Just use the return keyword. ("But that's not idiomatic!" Non-idiomatic my ass ). The programs' over reliance on utilization of C code is a nice stop-gap measure, but ultimately renders much of the safety moot.

C++ sucks because of its build system. And templates. And macros.

C sucks because it lacks most of the features of C++, but the simplicity is a perk in and of itself. The language as a whole is very easily understood. Though, the older, and generally more sophisticated nature of those code bases results in a tangled spaghetti cluster fuck in most prod repos.

Python's lack of a type system is sad and their half-assed attempt at type hints often times does nothing to make the system clearer, though, they tried.

Java is overly verbose and the typified nature of using every design pattern under the sun makes Java a headache factory.

JS sucks because it refuses to fail (which is also a feature, but that's another rant.), but that's why there's so much awkward casting behavior.

I could go on, but I'm most familiar with that bunch.

1 hour ago
WillardWhite

Oh man. I read Java and understood JavaScript. I was bewildered for a moment

19 hours ago
mxmcharbonneau

Is that true? I don't know Rust and Java that much, but it seems counterintuitive. Why is that?

18 hours ago
Major-Peachi

Translation does not transfer the nuance in language. I don't have the grasp of rust but the memory efficiency of rust is a concept not present (or often taught?) in Java, same with pointers of C.

You can probably learn the syntax of analogous features like a for loop, but beyond that, literal translation between languages does not indicate understanding of each language.

17 hours ago
Turtvaiz

Is that true?

I don't think so. It's completely unrelated to low level graphics programming, but if you make the same code in a slow language, and a fast language, the slower one will simply be n times slower.

I can't think of an example where you could somehow make the exact same concept run slower on rust/C/whatever compared to Java. The drawback of lower level languages is having to deal with extra stuff like memory bugs or the borrow checker, not that you can somehow do super slow code with them. I think OP's example makes no sense

17 hours ago
zthe0

So while c is perfomant the better question is: is your c code performant

16 hours ago
Impressive_Bed_287

*sobbing in assembler

13 hours ago
critical_patch
:py:

I remember doing well enough in the class, so I assume it was as performant as any other code written by a college student building UI components with OpenGL would be.

1 day ago
Anarcho_duck
:cp::asm::bash::py:

Not very

1 day ago
ardicli2000

He is using raylib. He is rather talented. The app in context is musializer and it is fucking awesome.

11 hours ago
dismayhurta
:kt::snoo_tableflip::bash::sw::illuminati:

Oh, hey. I had the same experience, but it was a month.

20 hours ago
smokky

I used to do and make games using CPP and directX ( and one time just using graphics.cpp)

Memory leaks are fun..

9 hours ago
Dr__America

I've done GUI by implementing my own draw functions for Java's swing library, so I understand the pain even if I haven't done it as low level as just C and OpenGL.

19 hours ago
Disastrous-Olive-677

I'm not pissed, I'm impressed!

Edit:typo

1 day ago
notexecutive

Impissed!

1 day ago
dan-lugg
:kt::cs::g::j::p:

1 day ago
Sergey5588

Mista zozin is a legend.

1 day ago
ThePi7on

Helo helo everyone and welcome, to yet anotha recreational programming session with a mista a Zozin (starts beatboxing)

13 hours ago
kerbaroast

How do someone become as good as him ? I mean the guy can literally code anything and learn anything in mins ?

1 day ago
AlexTaradov

He codes every day in all languages he can find, even the most stupid ones. And then creates his own and codes in them.

1 day ago
kerbaroast

Man as if he knows how to talk to computers and everything is second nature to him

1 day ago
AlexTaradov

No, him doing it every day made it a second nature. Nothing happens automatically, you actually have to work to get good.

1 day ago
aj9393

"Ahh, I wish I had that kind of talent, but I just wasn't born with it like he was. Oh well"

See? Now isn't that so much easier than all that pesky "work" you're talking about?

10 hours ago
slucker23

Never underestimate hard work

The only difference is that he knows hard work pays off and he enjoys the ride

Fine your enthusiasm, work hard to make it pay off

2 hours ago
Hoxitron

Just hard work and dedication. Easy.

1 day ago
Toannoat

also I think most people forgot that this dude has ben programming for literal decades already. I think many assume hes younger than his actual age due to the... aesthetics

20 hours ago
thecodingnerd256

If working hard was easy even i could do it 🤣

20 hours ago
shootersf

He's a got a gift. Got it.

1 day ago
hyrumwhite

You get used to it, though. Your brain does the translating. I don't even see the code. All I see is blonde, brunette, redhead. Hey uh, you want a drink?

1 day ago
muddboyy
:c::asm::ru::ts::hsk::ocaml:

Bro been straight coding since before 2007 just so you can have an idea. Hard work, staying consistent and loving what you do. This guy literally manages to stream almost everyday of the week (during the whole year) and still not run out of content (and he doesn’t even prepare his coding sessions) + takes the effort to edit / upload the videos to his youtube channel, that is discipline.

20 hours ago
socratic_weeb

Stop using AI

1 day ago
Emergency-Style7392

The real secret in getting really good at anything is heavily focusing on the details and fundamentals, perfecting them. The memes about not knowing basic things out of your head is a meme, a footballer who can't do a perfect pass like a robot without thinking about it is a bad one. When you gather many things to an intuition level you can focus on the big picture. 

16 hours ago
TomLikesGuitar

A really practical and useful answer is to understand computer science and a bit of electrical engineering from the ground up.

If you have a top down view of computing you'll end up in a scenario of often asking "why" and getting an answer that relies on a massive subset of knowledge you maybe don't have. After running into that wall a few times, I can absolutely see someone throwing their hands up and saying "wtf this is an absurd amount of info".

But the key isn't to have all that info on hand. The key is to understand the building blocks at the lowest practically useful level.

Or in programming terms lol, you don't need to store every permutation of engineering knowledge data in memory. You just need to build up a relatively quiet small handful of factory methods and understand a few concepts and everything is just layers of abstraction after that.

... So where's the actual practical takeaway that can get you there?

  1. Learn a little bit about how each part of basic, consumer computer hardware works at the electrical level in a vacuum.
  2. Learn a little bit more about how that hardware operates using machine code.
  3. Learn a lot about fundamental low level languages where you manage your own memory (I'd recommend C++). If you do one thing just do this ngl lol.
  4. Learn how operating systems and drivers work.
  5. Go back to #3 and just keep learning more lol.
  6. Learn about how higher level languages are BUILT (not the APIs of them, but how they run and, if applicable, compile).

Like I shit you not, if you focus on those things for a few years you will be see the black boxes of all programming disappear like magic. :)

6 hours ago
ThePi7on

He puts in the hours and likes what he does, simple as.

13 hours ago
Valuable_Ad9554

If you mean turning a 5 minute task into a 6 hour one, my company seems to be full of people that good

10 hours ago
RiceBroad4552
:s:

IQ is almost exclusively a genetic trait. Either you have it, or you don't.

Until we know which genes are responsible for that (I heard they have some research going in China since some time), and how to reprogram an already grown up organism (which would also require to "rewire the brain", which likely meas to replace it…), there's not much one can do. OTOH you wouldn't be you any more after such procedure, anyway. ¯\_(ツ)_/¯

But regardless, I think programming GUIs in C is not very smart. It's imho actually very stupid. Doing things "just because you can" is almost always idiocy…

23 hours ago
Limekiller

Famously, you can improve at IQ tests by studying

20 hours ago
spreetin

That doesn't mean it's not inherent though. IQ tests are what measures, and IQ is what is being measured. No test will perfectly capture what is being measured. That fact doesn't in itself say anything about the thing itself.

15 hours ago
limes336
:cp::asm::s:

Except that “IQ” is a contrived metric that doesn’t exist beyond IQ tests.

12 hours ago
spreetin

Sure, the actual factor that is being measured is G. IQ is a close proxy to that. So I wouldn't call it contrived, since G (and the ability of IQ tests to measure G) is extremely well substantiated by this point. But, yes, G and IQ isn't the same thing, just closely correlated.

11 hours ago
djengle2

It is not at all well substantiated. Only eugenicists, white supremacists, and grifters think it's anywhere near established.

8 hours ago
20Wizard
:j:

There's this cool thing that when you practice a lot you get very good at what you do! You should try it!

21 hours ago
Gleetide

"IQ is almost exclusively a genetic trait"

No, that is false. Genetics play a role but not as much as one might think it does.

21 hours ago
MeiramDev

I've been reading so many Rust articles, that I've read your first sentence as: "IO is almost exclusively a generic trait"

17 hours ago
Emergency-Style7392

Iq is the entry barrier, it defines your potential, achieving it is hard work. Go try playing chess for 12 hours a day with zero studying just brute forcing, I can guarantee you will improve massively if you keep doing that for long enough

16 hours ago
callous_eater

Believing in IQ is ironically a low IQ take. It's complete bullshit.

2 hours ago
Emergency_3808

Now that is rawdogging hardcore GUI bruh. I cannot imagine putting in the effort of doing GUI programming without object-oriented programming

1 day ago
anotheridiot-
:g::c::py::bash::js:

Immediate mode programming is the one true way.

23 hours ago
Drummerx04

You can mimic a bunch of OOP styles using C. Just looking at the struct he's defining is showing a bunch of other nested Structs within the definition. Only real difference is you don't get to define visibility as part of the language.

18 hours ago
thekamakaji
:c::py::m::j::s::vb:

Not having classes to organize methods is what really does it for me. That being said, I still love C

17 hours ago
GwynnethIDFK

You can even do polymorphism using clever struct padding.

17 hours ago
DearChickPeas

C devs reinventing C++, exhibit #23e34873.

God, everyday I love C++ more.

13 hours ago
CyberWolf755
:cp::unreal:

Take a look at the UI programming series from Ryan Fleury's substack https://open.substack.com/pub/ryanfleury/p/posts-table-of-contents?utm_source=share&utm_medium=android&r=1mq7cs

4 hours ago
vladmashk

Modern React is no longer OO but functional

14 hours ago
Specialist_Brain841

imperative vs declarative

6 hours ago
Silvio257

I love him. Protect him at all cost

1 day ago
stamper2495

Guy just casually visualising fast fourier transform... I wish to never look upon this shit again

23 hours ago
EatingSolidBricks
:cs:

Absolute coding

1 day ago
mdsiaofficial
:py::cp::cs:

This guy is dope

1 day ago
Hola-World
:j:

Doing a UI in C is going to piss off everyone that has to touch it.

20 hours ago
babypho

Does this guy even work at Blizzard though

23 hours ago
tgsmith489

As a React dev, I want to see this!

18 hours ago
Mediocre-Gas-3831

AI would go mechahitler if it tried to comprehend the video

1 day ago
olearyboy

Not all heroes wear capes

1 day ago
walmartbonerpills

I love what this guy does but his videos are so hard to watch

1 day ago
ThePi7on

The exact opposite for me. They're very easy to follow because he clearly talks through his reasoning, he understands and brings you to understand the WHY of things. He doesn't just mindlessly read and copypaste from docs or LLMs, he shows the whole process of discovery and understanding, which imho is very interesting to watch

13 hours ago
Shiny_Gyrodos

I fully agree. I've understood a lot of concepts I couldn't quite grasp before while watching him. He is really talented at explaining things. I do find his accent a bit difficult to understand sometimes though :)

6 hours ago
lunchpacks

Why?

15 hours ago
rosuav

Maybe not C, but... What if you were developing a game, and started making your own engine in C++? https://kittenspaceagency.wiki.gg/wiki/BRUTAL It's already been showing some amazing results.

21 hours ago
Minimum_Cockroach233

Where is the Issue? I am doing UI in Excel+VBA… 😅

17 hours ago
Antlool
:cp::c::rust::asm:

lol

1 day ago
SidNYC

We need to have a pop-up for the summer sale, and the main website should have an animated background of the beach. We need to finish this by tomorrow, and we have bottom of the barrel coders who're paid peanuts.

1 day ago
IMightDeleteMe

I dunno this doesn't sound awful, React is at least as silly and it's somehow widely accepted.

1 day ago
SCP-iota

"Did you make a UI in C with no framework?"

"Yes."

"Does it correctly handle non-Western input methods and accessibility technology?"

"Uh... Well..."

20 hours ago
lunchpacks

What if hes trying to fight globalism AND inclusiveness while coding his UI

15 hours ago
h00chieminh

I wouldn't call a visualization UI programming.

UI programming is dealing with, buttons, hover states, active states, tab indexes, windows, popovers, modals, animations, animation states, the list is endless -- and doing it well is really hard -- AND THEN rendering via GPU.

This example is creating an graph basic on audio input into a FFT.

21 hours ago
elmanoucko

What you meant was "missing interactivity".

Then what you meant was creating a basic graph from the FFT analysis of a given audio source.

Which invalidate your first fist claim as, that graph, is an interface for the user over the data he wants to see, in this context, an overview of the frequency spectrum of the audio he's been giving as source.

Don't worry, we'll stay here to help you in the future. Did you manage to center that div in your react project ?

13 hours ago
h00chieminh

step 1 - loop through frequency blocks

step 2 - draw a fucking line

step 3 - make the fucking line a fucking color

UI programming:

this button must react to mouse clicks, finger events, but make sure it doesn't fire until after we listen for gestures. Oh yes, there are 12984192874981279 fucking interactive buttons on the fucking screen.

40 minutes ago
elmanoucko

Found the developer who makes shitty vst plugins, totally missed the point, but thank god, you nailed the uninstall button.

And before saying "yeah, but a vst isn't common scenario", depends who you ask (it is in my case), and think hard about what you described and what I've said, then realize that maybe it's a matter of what problem you're trying to solve with your software. A frequency graph is just as easy as a button, or as hard, with a wide variety of complexities for both, depending on how important those elements are to the business you're serving. But yeah, not even sure writing it will help you understand the point.

13 minutes ago
JimroidZeus

Doing good work.

18 hours ago
Lonely-Suspect-9243
:s:

I remember making a text based GUI in my freshman year. It's nothing complicated, just arrow key navigation for a 2048 game. It was fun.

Now I create shitty CRUD web apps, so I prefer React.

17 hours ago
Issue_dev

I am way too stupid for this

16 hours ago
TerdSandwich
:ts::js::msl:

Doing UI in binary to piss off the C devs

8 hours ago
switchbox_dev

i been watching this guy for years but wasnt sure... is he pretty well known? hes a guy i tell friends about and most of them havent heard of him but he's a genius... and funny as hell imo

7 hours ago
baltimooree

that looks like a ragebait

18 hours ago
howreudoin

link to the video:

https://youtu.be/dQw4w9WgXcQ

1 day ago
howreudoin

nah, kidding, use this one:

https://youtu.be/SRgLA8X5N_4

1 day ago
Slggyqo
:py:

POV: you’re watching someone implement ecmascript in real time.

20 hours ago
sits79

Learned C in first year nearly 30 years ago. The pointers still give me nightmares.

12 hours ago
Educational-Lemon969

as a game programmer who spent last month fixing bugs in one of our ancient tools written in raw Win32, I have mixed feelings about someone who'd do this for fun

10 hours ago
Jommy_5

If you think that making a GUI in C is horrible, try with Fortran 🙈

9 hours ago
NelsonBelmont
:ru::ru:

give him the windows start menu!!

8 hours ago
lorenzofaith

I disagree with most Tsoding takes on programming languages but I still love to watch him

7 hours ago
HTTP_404_NotFound
:cp::cs::ts::msl:

Look at this mad lad.

Thats, impressive.

5 hours ago
Dm_me_code_pics

Loved his videos until a recent haskell video where he went off on a stupid tangent calling the haskell website slop because it just looked nice lmao

21 hours ago
Mr_2D

That's pretty cool... but as a nerd it's my duty to point out that he's not optimally organizing the data within his struct to minimize the amount of padded bytes.

18 hours ago
InternalCommercial44

I love this guy 🫶🏽

13 hours ago
metaglot

Doing a one-off UI for your weekend project in C is not impressive.

1 day ago
PatriotSAMsystem

Take a walk kid

1 day ago
metaglot

Going fast when you're working alone isn't really impressive. How about doing an actual user interface for other people instead of just some lame visualizer. I've had tons of colleagues bragging about being able to do this sort of stuff, and they make shit interfaces for themselves and noone else.

1 day ago
PatriotSAMsystem

You are the type of guy everyone in the industry hates. Literally, you always know it better and probably are never wrong either. Just shut the fuck up if you don't have anything of value to add or just spread your negativity, scroll the fuck on

1 day ago
ElectionMindless5758

The type of guy everyone in the industry hates is actually the hobbyist that produces 0 value but acts like he's a god programmer (and better than you R*eact devs who actually make things that people use, of course) because he spent 3 months making a shitty native program in C.

1 day ago
PatriotSAMsystem

Why the fuck would people in the industry hate hobbyists LOL they're not even IN the industry that's why it's called hobbyists... Im also not even a react dev but whatever

1 day ago
ElectionMindless5758

I said "react devs" in reference to OP's print screen

1 day ago
metaglot

No i dont know this better, but this doesn't impress me. Gamedevs do it all the time. But if all of your GUI amounts to nested menus, its not fucking impressive, buddy. Doing real interfaces for real people to get actual shit done, impresses me. React or C, i dont care.

1 day ago
Ronin-s_Spirit
:js:

"I'm gonna break a leg to piss off professional olympic runners which have trainers and personal doctors and shit". Goofy ahh attitude.

1 day ago
IncompleteTheory
:c::cp::py:

Are you a React dev?

1 day ago
Ronin-s_Spirit
:js:

No. Just commenting on how ridiculous the title is.

1 day ago
BlackMarketUpgrade
:cp::snoo_trollface:

Not really a good analogy. Plus, it's just a joke, guy.

1 day ago
DanteWasHere22

Ahh he got ya!

1 day ago
Ronin-s_Spirit
:js:

I'm not a react dev tho. The logic of his title got me.

1 day ago
DanteWasHere22

Nahh you got got bro it's alright we all get got every once in a while

1 day ago
Ronin-s_Spirit
:js:

I got ragebaited but not for reasons people seem to think. Especially how the hell was I supposed to know this random guy is specifically making a joke?

12 hours ago
not_some_username

One react dev pissed off. Millions others to come

1 day ago
Birnenmacht
:py::c::bash:

millions must segfault

1 day ago
Miesho

Comparing a broken leg to designing a UI in C — and likening React developers to Olympic athletes — just proves that in both cases, you have absolutely no idea what you're talking about.

1 day ago
Ronin-s_Spirit
:js:

Making a UI in JS+HTML is going to be way easier than having to interface with the OS in C. Running in olympics is going to be way easier for rich pros with all the amenities and benefits.

12 hours ago
Cafuzzler

More like "I'm gonna swim in the sea to piss off people in the kiddie pool"

15 hours ago
Ronin-s_Spirit
:js:

Kinda like that. I mean doing something way more complicated and laborous to piss off people who have it way easier and don't even care about you. A rich olympic pro won't care about some random dude trying to do the same thing but harder.

11 hours ago