|
Volguus posted:Older crowd? 2000 was just ... twenty years ago. Is there anyone on SA under like 30 anymore
|
# ¿ Jun 4, 2020 19:39 |
|
|
# ¿ May 16, 2024 19:07 |
|
ultrafilter posted:The Something Awful Forums > Main > Post Your Favorite (or Request): I'm existing just for listing!!! › Post My Favorites > Post your favorite forums code Jeffrey of YOSPOS posted:
thanks imagepw33n!
|
# ¿ Jun 19, 2020 21:11 |
|
Plorkyeran posted:I think the suggested limit of 50 characters for the subject line is overly short (especially when you're doing things like putting ticket numbers in the subject), but if you're going way over it then you've probably failed to actually write a subject line and should put most of that in the body. [artbuild] [engine] [jira-420] Fix crash whe...
|
# ¿ Jul 5, 2020 06:18 |
|
a hot gujju bhabhi posted:Why are you printing out many many pages of code? In the late 90s/early 200s when I was in junior high/high school I printed out pages upon pages of Z80 assembly code for TI-82 games, so I could read it when I wasn't at a computer. I would write code on paper too.
|
# ¿ Jul 8, 2020 00:45 |
|
It's "could be called" right? There's multiple reasons why malloc() could return nullptr, for one thing, and func(p) may call free(p). With sz staying the same, it's entirely possible that malloc() would return the same pointer that was just freed.
|
# ¿ Jul 8, 2020 22:28 |
|
Plorkyeran posted:Isn't invoking pointer provenance overcomplicating things there? A simplified version of that code is fairly obviously UB: I guess comparing a pointer (the address itself) is use-after-free? That seems weird, but ok.
|
# ¿ Jul 8, 2020 22:34 |
|
Is casting a pointer to an integer type ever not UB? What about casting an integer type to a pointer? I'm just saying, it might be UB by the standard, but you interact with probably hundreds of pieces of software per day that do just that, and it works just fine. Maybe that's because of compiler flags, but Literally No One except the standards committee works on a C++ project without being able to use "nonstandard" behavior. UB isn't a problem if the actual, real world behavior is defined, consistent, and understood.
|
# ¿ Jul 9, 2020 09:06 |
|
Hammerite posted:Dealing with a legacy database where they've represented quantities that are properly regarded as sequences of integers as single integers so that when the integer is expressed in base-10 it reads like the represented quantity. is there any way to tell if a value has a zero as its least-significant part or if it's just not expressed? like, could 430 be "0 hours, 4 minutes, 30 seconds"
|
# ¿ Jul 15, 2020 16:37 |
|
Hammerite posted:The application I'm replacing was built by slightly less crazy people, unfortunately they weren't really giving it the attention it deserved and so there are loads of 500-line methods that perform one database query after another and then just jam all the variables together at the end (also some of the variables inform how other variables should be interpreted). And the chief guy (who is retired now) was a subject matter expert and didn't feel the need to really document half this poo poo, so occasionally to figure out what something is for I spend time following through C++ code with single-letter variable names. Spend a little bit of your time documenting your efforts. Write up a TDD for the rewrite, write up some estimates, when you hit a snag and have to spend three days figuring out what a component does, document your progress. Then when someone says "why is this taking so long" you have something concrete to point to to show "yes, I'm doing work, it's taking longer than I thought, because this was completely hosed and I have to reverse engineer the entire thing"
|
# ¿ Jul 16, 2020 20:24 |
|
Doc Hawkins posted:so what, you just have to sit through their Time-sharing Presentation?
|
# ¿ Aug 19, 2020 16:44 |
|
zergstain posted:Wasn't the classic Mac epoch Jan 1, 1904? Yes, but the date on some old macs would reset to 1956 if the PRAM battery was dead. I always heard this was Steve Jobs' birthday, but apparently he was born in 1955.
|
# ¿ Aug 28, 2020 20:19 |
|
ultrafilter posted:Speak of the devil: if you're using TI-BASIC as your example of why this is a good idea you've lost me
|
# ¿ Sep 4, 2020 04:53 |
|
What I don't understand is the intersection between the code that's still written using EBCDIC and the code that *needs* to be built on modern C++ compilers. I get not wanting to gently caress with 50 year old code, but why do you need to build that with a modern compiler that you can't just add a switch to?
|
# ¿ Sep 25, 2020 23:30 |
|
Falcorum posted:And then you have the people arguing that the C++ ABI should always be stable and unbroken so they can keep using the same binary blob from 20 years ago, because the vendor has gone out of business and management doesn't want any time to be spent in finding a newer version of a small dependency for their multi million software. I'm guilty of this too, but I port video games for a living, so finding binaries of a version of Scaleform from 2009, but built for "an undisclosed platform, but it needs to be built for x64 Linux against libc++ and using clang >=x.y.z or gcc >=a.b.c" is literally hell, because you can't just replace scaleform without hiring a new UI team and adding 6 months to the project oh and they don't have a source license for scaleform, which was sold to autodesk in 2014 or something and they no longer support it. I mean if you happen to find a source archive of that version, maybe you can tweak their cmake? It'll be illegal, but hey, who knows
|
# ¿ Sep 26, 2020 08:22 |
|
Vanadium posted:I as a C++ pedantry enthusiast under 40 know about EBCDIC, but I can't imagine anyone knowing about it for other reasons. I read like, a lot of fortune files in like 2000 so I hope you're ready for jokes about EBCDIC, VAXen, and PL/1
|
# ¿ Sep 28, 2020 06:38 |
|
I'm so glad I haven't made the transition into enterprise business-case poo poo writing node microservices or something because the idea of working with people who don't know how floats work is terrifying to me
|
# ¿ Sep 28, 2020 19:48 |
|
Arsenic Lupin posted:It's funny; I learned all about shifts because they were fast. Most programmers today don't have to care about that sort of speed issue. The thing that absofuckinglutely should NOT be part of whiteboard interviews is what order sorts are. If I want a sort, I pick one from the library. If I'm doing something really esoteric with sorts, I look at the published papers and possibly talk to an actual computer scientist. And I never, ever, ever use a bubble sort, so why would I remember either its order or how to code one? I don't expect you to know the orders of various algorithms off the top of your head, but I do expect you to be able to reason about the orders of various algorithms, because if you can't, you're going to do some truly heinous poo poo.
|
# ¿ Sep 28, 2020 21:18 |
|
Wait knowing how floats work is theory now
|
# ¿ Sep 28, 2020 23:35 |
|
ultrafilter posted:
this seems fine once i googled what rcpp was?
|
# ¿ Nov 5, 2020 22:58 |
|
Hey, it's constant time at least.
|
# ¿ Nov 18, 2020 18:26 |
|
feedmegin posted:Even Microsoft had __fastcall fastcall, stdcall, and thiscall all resolve to the MS convention, which does use registers.
|
# ¿ Nov 19, 2020 20:32 |
|
The closest thing I've seen to that in production code was a log print that crashed the game on PS3 on anything other than shipping config (which had all log prints disabled). We tracked it down and isolated it to a hash of an asset file being printed that contained the sequence "%n". We were, however, passing the hash through "%s" twice, once to build the string, and once to printf it with boilerplate (log level, system, etc). We were able to narrow it down to printf("%s", "%n") crashing in an empty program, only on PS3. Couldn't replicate it on any other OS/libc, and the assembly looked fine. So... we commented out the log print.
|
# ¿ Dec 30, 2020 09:06 |
|
Tei posted:are not that touch board programable? can be programmed to produce the ESC key? the newer touch bar macbooks have a dedicated physical esc key first
|
# ¿ Jan 15, 2021 19:21 |
|
DoomTrainPhD posted:My high school started with basic and then moved on to C. It should still be this way. We did Basic and then C++, but it was the APCS "C with a string class" C++
|
# ¿ Feb 5, 2021 19:24 |
|
Volte posted:There's no reason to ever teach or use C for anything save maybe embedded programming. It's too abstract to properly teach low-level concepts and too low-level to properly teach abstractions. What language should low-level concepts be taught in?
|
# ¿ Feb 5, 2021 19:49 |
|
I'm a weirdo in that I learned BASIC, then Z-80 assembly (to make calculator games), then "C with a string class" C++, then college where I learned a little Java, but mostly did things in C and C++. In my personal time I did most stuff in Perl 5 because I was an insufferable Unix kid in college. So when I learned about pointers I was confused for a while until I realized they were just memory addresses, just like in assembly. I also took a PL class in college where we did some Common Lisp, some OCaml, some Haskell, and some Prolog, and eventually I wrote a micro-lisp in Smalltalk.
|
# ¿ Feb 5, 2021 21:06 |
|
Hammerite posted:so what? I'm not a C# expert so I don't know off the top of my head if it does it by default, but in the last case, the compiler can determine that the switch doesn't handle all cases, and throw a warning/error. Not handling all cases is a cause of lots of bugs.
|
# ¿ Feb 12, 2021 16:41 |
|
What JSON parsing library is using sscanf? That seems like a terrible idea for a vaguely EBNF-style language. The whole thing smacks of hand rolled.
|
# ¿ Mar 2, 2021 06:07 |
|
meanolmrcloud posted:I’m just a lowly dev one, but I got a crack on a new ‘rules engine’ we are developing, whose ultimate goal is to leverage the power of generics to force all future calculations thru one method, which will yank and apply rules that are expressly written for each business use case. On the one hand, it’s kinda slick, and it was fun getting it to work? On the other, what the gently caress Every time I've worked with one of these systems it's used to do exactly one thing, badly.
|
# ¿ Apr 2, 2021 02:23 |
|
If you want to talk about programming ethics I had to work on NBA Ballers 3: Chosen One
|
# ¿ Apr 11, 2021 09:12 |
|
Sagacity posted:Was this part of some form of mandatory community service? Sort of? I started crunching on it immediately after crunching on John Woo Presents: Stranglehold. Afterwards they wanted me to crunch on Blitz: The League 2 and then MK vs. DC, but I switched teams and got laid off in 6 months (midway went bankrupt)
|
# ¿ Apr 12, 2021 00:42 |
|
Sagacity posted:Was this console stuff or still Midway arcade games? How much duct tape would you say was used during the crunch, trying to get these games out the door? Console, and tons.
|
# ¿ Apr 12, 2021 15:50 |
|
Obfuscation posted:I've always thought that git commit messages should be like mini-branches in themselves, so you could push changes to old commit messages if a need arises Perforce lets you edit changelist descriptions after they're committed. It's abusable I guess, but the only things I've ever seen it used for are: fixing typos/mistakes in the description, or having CI/build system add tags/build info.
|
# ¿ Apr 30, 2021 20:54 |
|
OddObserver posted:They use 32-bit integers and not like 8-digit decimals or something so it can't be anything too strange? That doesn't mean it would be easy to change. No telling how many places in that codebase just assume price is always a uint32.
|
# ¿ May 7, 2021 18:54 |
|
namlosh posted:Lol, like that target article from a while ago: Yeah people don't understand that I want a television that displays its input signal, or a thermostat that switches on and off my furnace/AC based on the reading from an analog temperature probe.
|
# ¿ May 27, 2021 20:12 |
|
Tei posted:I wanted to go back to C++ someday, but if It dropped the C syntax core beliefs this much maybe will be a hard pass. What a ugly re-interpretation of ( and ). This has always been the case in C++, it is not a C++11/14/17/20 phenomenon. The name "most vexing parse" was coined by Scott Myers in Effective C++ 20 years ago: https://en.wikipedia.org/wiki/Most_vexing_parse
|
# ¿ Jun 3, 2021 17:58 |
|
C Unions are still very useful when you need a compact binary representation of data for serialization or something like that, and if you think "memory cheaper" means there aren't still tons of situations where that's something you need, you're naive.
|
# ¿ Jun 7, 2021 17:47 |
|
There are ways to ensure that your representation (for a network or file format, for instance, which you may not have control over the specification of) will be accurate for all architectures/compilers you care about, with compile-time verification. This argument usually comes down to "you should never need to care about the exact memory layout of your data" which is just patently false. There are lots of times when I need to do exactly that. I also don't need my programs to run on all possible architectures or build on all possible compilers. I need them to build on two architectures, with two compilers, for four operating systems. Those are very concrete numbers, and it's extremely possible to make your code explicitly refuse to compile if you're trying to build it for something else without describing how. No one is saying your front end webdev should use C-style unions, but not all of us are front end web devs.
|
# ¿ Jun 8, 2021 17:08 |
|
feedmegin posted:This is what I'm saying when I say there are only two architectures people care about any more - well, more accurately, three. X86-64 and ARM (Thumb if you're in microcontroller land, AArch64 if not). All of these are little endian. Little endian won. You will most likely never need to work with big endian hardware in 2021. The only reason we still have to care about it is that Sun were big endian and defined a bunch of internet protocols and apis in the 90s, hence all that htons/ntohs nonsense in libc. Right, I still do have to care about endian sometimes (moreso in the last console generation, but it's still sometimes relevant for network transmission), but I generally speaking don't use "long int", I use "int32_t" or equivalent, depending on how big of an integer I want. These are defined in platform headers (and if they're not for some reason, they're trivial to define yourself). My point is that lots of "undefined behavior" is undefined by the language standards, not by the actual discrete tools/architectures/platforms you're using. The argument that you can't use these tools safely is the problem -- you just need to know precisely what is going to happen, which, in these situations, you already need to know.
|
# ¿ Jun 8, 2021 19:30 |
|
|
# ¿ May 16, 2024 19:07 |
|
leper khan posted:How long until people start trying to sell me on macroservice architectures? you joke but all these things move in cycles. thin clients vs. fat clients, monolithic vs. modular. someone's going to be selling "Schematic NoSQL" within five years, bet
|
# ¿ Aug 6, 2021 06:54 |