Can we talk about the elephant in the room here? What possessed everyone to useC++ code:instead of C++ code:? C99 turns twenty next year...
|
|
|
|
|
|
| # ? Jan 15, 2026 04:39 |
|
VikingofRock posted:Can we talk about the elephant in the room here? What possessed everyone to use i'll sometimes use /* comments */ for inline stuff, e.g. annotating parameters when they aren't obvious C++ code:
|
|
|
|
VikingofRock posted:Can we talk about the elephant in the room here? What possessed everyone to use I preferred the way they emphasised /* the text */ I mostly use // in the wild but it depends. Sure adapt to your team, but what if you're coming in as the architect or tech lead? Probably should spend the first day using IDE/lint/an extremely unsafe regex to rewrite all existing code in your bracket and spacing style then recommit the entire code base to establish dominance.
|
|
|
|
is there a way to auto format comments in jetbrains ides? in java files they support autoformatting when it's a javadoc comment, but not when it's a standard block or line comment. I've looked around and not found anything for it, which is super frustrating because the code to do it is obviously there the main thing that drives me nuts is that i have to hand-janitor mutli-line comments if i ever edit them and change the comment to need more or fewer lines of text. the javadoc formatter does nice line re-wrapping
|
|
|
|
i always use //, but i guess some people prefer the other style because you can easily comment out whole sections by moving the terminator. i just use my IDE's hotkey which //'s out the current selection
|
|
|
|
Lutha Mahtin posted:is there a way to auto format comments in jetbrains ides? in java files they support autoformatting when it's a javadoc comment, but not when it's a standard block or line comment. I've looked around and not found anything for it, which is super frustrating because the code to do it is obviously there select all, code -> reformat code
|
|
|
|
shut the gently caress up about code formatting. this was never an interesting topic the last 500 times it was discussed, and it is still not an interesting topic
|
|
|
|
although on further consideration, it's petty enough to be appropriate for the terrible programmer thread. namaste
|
|
|
|
redleader posted:shut the gently caress up about code formatting. this was never an interesting topic the last 500 times it was discussed, and it is still not an interesting topic you sound like the kind of person who changes formatting in the middle of a line
|
|
|
|
redleader posted:shut the gently caress up about code formatting. this was never an interesting topic the last 500 times it was discussed, and it is still not an interesting topic
|
|
|
|
cjs: i have a job now
|
|
|
|
programming is still bad
|
|
|
|
redleader posted:
|
|
|
|
newjob uses resharper and it forces everyone to use the 100% correct indentation style allman style
|
|
|
|
oh hey assert() is dead, that's good news try {wait i already validated this, gently caress off} throw (my hands in the air like i do not care)
|
|
|
|
tef posted:programming is still bad mlmp
|
|
|
|
A good programmer is a child who is learning to make silly games and having a blast.
|
|
|
|
I am a good programmer because I admit I am a terrible programmer.
|
|
|
|
SardonicTyrant posted:I am a good programmer because I admit I am a terrible programmer. re: terrible programmers: I am a good programmer because I admit I am a terrible programmer.
|
|
|
|
I am a programmer who's just good enough to know he's terrible and not good enough to ever improve, life is suffering and despair namaste.
|
|
|
|
fantastic news everyone!! you'll all be excited to know that my HKT embedding in rust is working without the terrible overhead of packing every possible kind into a single enum. the trick was to model computations over kinds as what is basically lazy iterator with a special evaluator built in. code:code:the interface suffers quite a bit but it still accomplishes my goals. the enum interface is considerably better but i'm pretty sure you're not going to do better without modifying the compiler: code:code:why am i doing this? DONT THREAD ON ME fucked around with this message at 03:35 on Jul 19, 2018 |
|
|
|
oh yeah coroutines motherfuckers!!code:
|
|
|
|
I’ve graduated from embedded C and now I’m just writing a Jaguar game in 68000 assembly also when I tweet about writing the OS for my 68k computer I keep getting followed by kernel engineers who live in San Francisco I may be a good programmer... nah I still suck at my day job of janitoring AWS
|
|
|
|
MALE SHOEGAZE posted:performance is not too bad! are you doing any source inspection? i'll admit i reach for that super early, but you'd want to make sure that the 'native' version isn't getting artificially boosted by the compiler (like that rjmccall post about the swift perf 'regression') . make sure it's actually doing the work, with such a short list it'd be tempted to just solve it at compilation time, you want to see it 'actually' loading values from a list-lookin' thingy and processing them is 'eval' up there a language feature kicking into an interpreter or a hook of your implementation? MALE SHOEGAZE posted:I gave up after 10 minutes, so it appears that compile time increases exponentially with the number of operations chained. Luigi Thirty posted:kernel engineers who live in San Francisco
|
|
|
|
tef posted:cjs: i have a job now
|
|
|
|
male shoegaze you should write a blog chronicling your HKT rust adventures, there's fp nerds on the lang team who would probably love to read about it
|
|
|
|
JawnV6 posted:hi, i still know absolutely nothing about "kinds" despite several generous attempts, but i DO know benchmarking anyhow as you say: vec for sure has at least unsafe optimizations that i could probably implement. but i wouldn't be surprised if there's compiler boosting. so i'm optimistic about where i'll be able to get performance. but yeah, uh, testing a bigger list, that makes sense. same benchmark as before but with 10,000 entries in the list: code:quote:is 'eval' up there a language feature kicking into an interpreter or a hook of your implementation? quote:
yeah, i think so. tinaun posted:male shoegaze you should write a blog chronicling your HKT rust adventures, there's fp nerds on the lang team who would probably love to read about it i decided that i was going to blog about it early on so i've actually been taking notes and stuff. thanks for the prodding, the hard part now is not giving up when i decide that it's all stupid. e: my benchmark currently maps the `Vec<i32>` to a `Vec<String>`, if i skip the string formatting step and just multiply the int a couple of times, the native implementation does much, much, much better. code:DONT THREAD ON ME fucked around with this message at 12:31 on Jul 19, 2018 |
|
|
|
JawnV6 (or anyone else): recommendations on where to get started learning assembly? it's about time. don't say reading luigi's posts
|
|
|
|
MALE SHOEGAZE posted:
Probably gets vectorised if the compiler can prove its a flat array yeah
|
|
|
|
MALE SHOEGAZE posted:JawnV6 (or anyone else): recommendations on where to get started learning assembly? it's about time. https://blogs.msdn.microsoft.com/oldnewthing/20040914-00/?p=37873
|
|
|
|
my x86 assembly knowledge really only applies to DOS and the 486 era
|
|
|
|
Luigi Thirty posted:my x86 assembly knowledge really only applies to DOS and the 486 era hi mister gibson, thanks for warning us about those raw sockets
|
|
|
|
Luigi Thirty posted:my x86 assembly knowledge really only applies to DOS and the 486 era a better time, really.
|
|
|
|
flakeloaf posted:hi mister gibson, thanks for warning us about those raw sockets you’re welcome. buy my hard drive software
|
|
|
|
MALE SHOEGAZE posted:JawnV6 (or anyone else): recommendations on where to get started learning assembly? it's about time. you could look into a textbook or one of those open online classes for an undergrad level "computer organization" course. this is the class where you learn assembly and how the processor, uh, processes it after you learn assembly you can learn how to write a compiler
|
|
|
|
Lutha Mahtin posted:you could look into a textbook or one of those open online classes for an undergrad level "computer organization" course. this is the class where you learn assembly and how the processor, uh, processes it
|
|
|
|
i learmed mips assembly for my compilers class and it was a pretty easy way to get my toes what with an assembly language. i have no loving clue how well that translates to the x86 shibboleth because ive never tried to gently caress with that poo poo.
|
|
|
|
goddamn i'm so excited to have a year to study this stuff in earnest rather than cramming at night or on weekends when i'm already tired.
|
|
|
|
my computer organization course was in masm and it wasn't too bad imo, but we stuck to ia-32 so maybe amd64 is worse?
|
|
|
|
|
| # ? Jan 15, 2026 04:39 |
|
Hey male shoegaze if you're getting exponential compilation times you should file an issue on the rust GitHub. They take solving that sort of thing pretty seriously so I'm sure they would be very interested in hearing about your case.
|
|
|
|


































