Programming thread

  • Want to keep track of this thread?
    Accounts can bookmark posts, watch threads for updates, and jump back to where you stopped reading.
    Create account
God calls functions in PascalCase, it does not matter you think. That's pure truth.

Enlighten yourselves by taking a good look some code that was written with help from God, for talking to God:
View attachment 8445718

God endorses:
  • PascalCase for types and functions.
  • sparse_snakecase for variables and fields.
  • UPPER_SNAKE for defines/global constants.
  • unreadablecase for keywords.
functions in PascalCase?? my language of choice is python so maybe i need to write in other languages more often but the only time i fund myself using pascal case is for classes everything else is some variation of snake_case, and i dont think i have ever used camelCase for literally anything.
 
I've been struggling to learn Python or programming in general for the past few months, not because it's hard, but I keep losing my motivation or getting lazy. I keep wondering how many long videos I need to watch in order to become good or decent at any languages. How should I start again or what should I do?
 
I've been struggling to learn Python or programming in general for the past few months, not because it's hard, but I keep losing my motivation or getting lazy. I keep wondering how many long videos I need to watch in order to become good or decent at any languages. How should I start again or what should I do?
you don't get good at anything by just watching videos
your time should be 10% to 20% watching videos or reading guides, 80% to 90% programming things yourself where you put the stuff you saw in the videos and guides into practice and play around with them to see for yourself how they behave
 
enabled-p is the only answer or enabled? if you are scheme heretic
chars outside [a-z-] always made me squicky when using scheme
to become good or decent at any languages
The cold reality is that if you can't read API docs and such, you're probably not going far. Learn to read the documentation. Learn to read all documentation. There are tricks in there that exist nowhere else.
 
I've been struggling to learn Python or programming in general for the past few months, not because it's hard, but I keep losing my motivation or getting lazy. I keep wondering how many long videos I need to watch in order to become good or decent at any languages. How should I start again or what should I do?
i'm by no means an expert but what i can say with the laziness is you kinda just need to work on something your passionate about (that or something mandatory but from the way youre framing the question im assuming youre not perusing any sort of formal education or are at all employed[in the field of programming , i just read this over and relised how this sounded]). as for learning, like what most people here are saying doing and reading are your best bet. Assuming you know the basic fundementals of programing loops, variables and what have you, pick a thing(calculator, random dice game, black jack) and write something, test if it works great try looking up ways to improve it or do something more efficently, if it doesnt work great, look up how to do the thing youre not too sure about, This ofcourse assumes you know the basics if you dont well idk what to tell you, python isnt what i learned the basics on that was pascal and it was a formal, graded process.In anycase it if Patel and Rajesh can do it you can too. Just keep in mind that noone is going to shoot you if your first attempt doesnt work.
 
you don't get good at anything by just watching videos
your time should be 10% to 20% watching videos or reading guides, 80% to 90% programming things yourself where you put the stuff you saw in the videos and guides into practice and play around with them to see for yourself how they behave
Also, literally just build something. Anything. A small utility, a small game, etc. You'll learn a LOT by just solving one problem at a time.
 
Here's a 15 minute rant by Tim Cain on why he has shipped spaghetti code. It's gamedev, but the reasons can be applied generally.
 
Does anyone by any chance know of any good libraries/projects that involve immediate mode GUIs? Outside of the obvious Dear ImGui I know of very few, I've looked through a lot of the UI code for Rad Debugger too and while I think it has some good ideas I'm looking for something simpler in general to try and build up more ideas from, also not interested in any of the common ones (GTK/Qt/etc.) I'm looking for the obscure stuff if anyone knows of any. Thanks in advance if anyone has any suggestions.


I don't know if I'm missing something but wouldn't that code being generated be correct if there's no checking actually being done on the new call actually allocating properly? I wouldn't say it's on the compiler exactly to make sure you don't do invalid pointer accesses, non-C like C++ code and OOP both give me a headache so maybe I'm misunderstanding.
I haven't used it. But I saw this. Maybe worth a shot.

 
I haven't used it. But I saw this. Maybe worth a shot.

https://youtube.com/watch?v=DYWTw19_8r4
I have. It's nice to work with. It itself is only a layouting library, but you can render it with pretty much whatever you'd like, letting you make retained-mode UIs, immediate-mode UIs, and even websites with WASM + the HTML renderer if you want to mog the jeets churning out garbage sites in a bloated JS framework (its website does this). Hell, IIRC someone made a console renderer for it. It's also easy to customise, it lets you add custom elements and change what allocator you want to use without any friction

It's probably not what you' want if you're trying to learn about immediate UIs (although the default raylib renderer may be of interest), but if it sounds any interesting to you I recommend watching the guy's videos and tinkering around with it

Does anyone by any chance know of any good libraries/projects that involve immediate mode GUIs? Outside of the obvious Dear ImGui I know of very few, I've looked through a lot of the UI code for Rad Debugger too and while I think it has some good ideas I'm looking for something simpler in general to try and build up more ideas from, also not interested in any of the common ones (GTK/Qt/etc.) I'm looking for the obscure stuff if anyone knows of any. Thanks in advance if anyone has any suggestions.
As for more "obscure" immediate mode UI recommendations, maybe try Nuklear? It's not super niche, but it might be sort of what you're looking for
 

For whatever reason, putting on random Linux videos in the background at work has me also exposed to people like Brian Wills and Primeagen. I've got no programming acumen and my shell scripting knowhow ends at making PKHeX run in a dedicated prefix.

Not gonna lie, the above was pretty interesting to intermittently tune into. Brian Will explains stuff in such a manner where I get the gist without necessarily understanding the broader technical implications and ramifications of rejecting granular encapsulation in favour of writing in a purely procedural (not necessarily functional) style.

Kinda takes me back to being a terminally online minor on the internet itching to write Android apps and bashing my head against the wall with Java, blissfully unaware of how horrible of a starting point Java with Eclipse was at the time.

All I know about OOP is that you just tab your way through the program, there's like eleventy billion files where 2-3 functions are atomised into, something something public static void main string args, blah blah blah. C, by stark contrast, was far easier to get started in. Too bad I stopped at "Hello World."

EDIT: Question for the fellas here - is Brian Wills correct in asserting that if the opportunity to make a function pure presents itself, it's best practice to act on that opportunity because they're so few and far between?
 
https://youtube.com/watch?v=QM1iUe6IofM
For whatever reason, putting on random Linux videos in the background at work has me also exposed to people like Brian Wills and Primeagen. I've got no programming acumen and my shell scripting knowhow ends at making PKHeX run in a dedicated prefix.

Not gonna lie, the above was pretty interesting to intermittently tune into. Brian Will explains stuff in such a manner where I get the gist without necessarily understanding the broader technical implications and ramifications of rejecting granular encapsulation in favour of writing in a purely procedural (not necessarily functional) style.

Kinda takes me back to being a terminally online minor on the internet itching to write Android apps and bashing my head against the wall with Java, blissfully unaware of how horrible of a starting point Java with Eclipse was at the time.

All I know about OOP is that you just tab your way through the program, there's like eleventy billion files where 2-3 functions are atomised into, something something public static void main string args, blah blah blah. C, by stark contrast, was far easier to get started in. Too bad I stopped at "Hello World."

EDIT: Question for the fellas here - is Brian Wills correct in asserting that if the opportunity to make a function pure presents itself, it's best practice to act on that opportunity because they're so few and far between?
Primeagen i really dislike these days.

"Getting the gist without actually understanding" is a good starting point, as yo know that you dont fully understand it. Many people equate getting the gist with grok-ing something.

And having the oppurtunity of making functions pure isnt all that rare, but its a good practice to aim for pure functions as much as reasonable anyways.

Also, FP is just easier to understand most of the time than OOP and procedural. (once you get past some of the jargon, like map/fold/reduce functions and such.)
 
Primeagen i really dislike these days.

Can't ever get a good read on him. Apparently he's got ties to the Omarchy crowd if the Omarchy merch is anything to go off. I don't know enough about programming to refute any of his takes, he's more background noise than anything I'd consciously pay attention to, but I'm not gonna lie... something seems incredibly faggy, phoney, and gay about him.

It's like... the same content archetype as Jason Hall/Pirate Software, there's also a huge Twitch audience he pulls from for chat polls, he either mostly reacts to blogs about programming or videos about programming from people like Fireship, maybe some shoddy MS Paint diagrams sketched in while explaining (presumably) basic concepts... but to that end, Primeagen's worst sin (from what I can gather) is having ties to the insufferably faggy and gay Omarchy crowd. I know nothing else about this man.

In absolute fairness, comparing him to Jason Hall is probably a bridge too far. No one could possibly be on the same wavelength of impostor syndrome as Jason Hall, and Primeagen allegedly worked at Netflix and several other Silicon Valley companies. I have no reason to distrust him (thus far) on his credentials because he's reactiontube slop annoying and not sanctimonious ferret abuser iwth impostor syndrome annoying.

i dunno. Maybe I'm way off base but no one who streams on Twitch for that long and with his stream cadence with that big of an audience both on Twitch and on YouTube could ever be a well-adjusted person off camera. Also, I'm sure the coffee he shills is mid for the price point it's sold at. Ain't no one ever making me give up Costco-sized Folgers and Maxwell House. To get bulk quantities of mid coffee at the prices he charges would probably be 2-3 weeks of groceries.
 
Can't ever get a good read on him. Apparently he's got ties to the Omarchy crowd if the Omarchy merch is anything to go off. I don't know enough about programming to refute any of his takes, he's more background noise than anything I'd consciously pay attention to, but I'm not gonna lie... something seems incredibly faggy, phoney, and gay about him.

It's like... the same content archetype as Jason Hall/Pirate Software, there's also a huge Twitch audience he pulls from for chat polls, he either mostly reacts to blogs about programming or videos about programming from people like Fireship, maybe some shoddy MS Paint diagrams sketched in while explaining (presumably) basic concepts... but to that end, Primeagen's worst sin (from what I can gather) is having ties to the insufferably faggy and gay Omarchy crowd. I know nothing else about this man.

In absolute fairness, comparing him to Jason Hall is probably a bridge too far. No one could possibly be on the same wavelength of impostor syndrome as Jason Hall, and Primeagen allegedly worked at Netflix and several other Silicon Valley companies. I have no reason to distrust him (thus far) on his credentials because he's reactiontube slop annoying and not sanctimonious ferret abuser iwth impostor syndrome annoying.

i dunno. Maybe I'm way off base but no one who streams on Twitch for that long and with his stream cadence with that big of an audience both on Twitch and on YouTube could ever be a well-adjusted person off camera. Also, I'm sure the coffee he shills is mid for the price point it's sold at. Ain't no one ever making me give up Costco-sized Folgers and Maxwell House. To get bulk quantities of mid coffee at the prices he charges would probably be 2-3 weeks of groceries.
I have a soft spot for the primagen. I could get why some people wouldn't like him.

I think it's partially because I had addiction issues in the past also. So I can relate to him on that. And seeing what he tells people, I feel like he's generally a good guy. He has a family, tells people they should work hard, they shouldn't give up just because we are moving into the ai age. Also he seems to ignore the gay politics shit which I like, I wish more people were able to do that now days.

Theo, and Thor I absolutely hate. But I'm fine with Primagen. I'm not a fan of his takes on open source. But I wouldn't go to a netflix guy for his thoughts on that anyway.
 
i've been getting a lot of coding done lately and learning a lot but for some reason i have nothing interesting to talk about regarding any of it

i hope your projects are all going well and you're having new thoughts and solving new problems though kiwibros
 
i have this thing where when someone has a hoarse/raspy voice i genuinely cannot listen to it because all i think of is "JUST FUCKING COUGH NIGGA!!!!!!"
and primeagen has this exact type of voice and i cant watch his videos because of that
 
Back
Top Bottom