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...
|
|
# ? Jul 18, 2018 20:01 |
|
|
# ? Oct 13, 2024 15:18 |
|
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:
|
# ? Jul 18, 2018 20:42 |
|
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.
|
# ? Jul 18, 2018 21:16 |
|
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
|
# ? Jul 18, 2018 21:20 |
|
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
|
# ? Jul 18, 2018 21:23 |
|
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
|
# ? Jul 18, 2018 22:16 |
|
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
|
# ? Jul 18, 2018 22:50 |
|
although on further consideration, it's petty enough to be appropriate for the terrible programmer thread. namaste
|
# ? Jul 18, 2018 22:51 |
|
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
|
# ? Jul 18, 2018 22:52 |
|
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
|
# ? Jul 18, 2018 23:08 |
|
cjs: i have a job now
|
# ? Jul 19, 2018 00:04 |
|
programming is still bad
|
# ? Jul 19, 2018 00:06 |
|
redleader posted:
|
# ? Jul 19, 2018 00:07 |
|
newjob uses resharper and it forces everyone to use the 100% correct indentation style allman style
|
# ? Jul 19, 2018 00:12 |
|
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)
|
# ? Jul 19, 2018 00:46 |
|
tef posted:programming is still bad mlmp
|
# ? Jul 19, 2018 01:09 |
|
A good programmer is a child who is learning to make silly games and having a blast.
|
# ? Jul 19, 2018 01:39 |
|
I am a good programmer because I admit I am a terrible programmer.
|
# ? Jul 19, 2018 02:08 |
|
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.
|
# ? Jul 19, 2018 02:09 |
|
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.
|
# ? Jul 19, 2018 02:23 |
|
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 04:35 on Jul 19, 2018 |
# ? Jul 19, 2018 04:02 |
|
oh yeah coroutines motherfuckers!!code:
|
# ? Jul 19, 2018 04:21 |
|
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
|
# ? Jul 19, 2018 04:42 |
|
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
|
# ? Jul 19, 2018 04:55 |
|
tef posted:cjs: i have a job now
|
# ? Jul 19, 2018 05:09 |
|
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
|
# ? Jul 19, 2018 05:24 |
|
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 13:31 on Jul 19, 2018 |
# ? Jul 19, 2018 13:08 |
|
JawnV6 (or anyone else): recommendations on where to get started learning assembly? it's about time. don't say reading luigi's posts
|
# ? Jul 19, 2018 13:24 |
|
MALE SHOEGAZE posted:
Probably gets vectorised if the compiler can prove its a flat array yeah
|
# ? Jul 19, 2018 13:35 |
|
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
|
# ? Jul 19, 2018 14:24 |
|
my x86 assembly knowledge really only applies to DOS and the 486 era
|
# ? Jul 19, 2018 15:38 |
|
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
|
# ? Jul 19, 2018 15:45 |
|
Luigi Thirty posted:my x86 assembly knowledge really only applies to DOS and the 486 era a better time, really.
|
# ? Jul 19, 2018 15:46 |
|
flakeloaf posted:hi mister gibson, thanks for warning us about those raw sockets you’re welcome. buy my hard drive software
|
# ? Jul 19, 2018 15:50 |
|
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
|
# ? Jul 19, 2018 16:30 |
|
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
|
# ? Jul 19, 2018 16:56 |
|
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.
|
# ? Jul 19, 2018 17:04 |
|
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.
|
# ? Jul 19, 2018 17:13 |
|
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?
|
# ? Jul 19, 2018 17:15 |
|
|
# ? Oct 13, 2024 15:18 |
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.
|
|
# ? Jul 19, 2018 17:29 |