|
I wrote this masterpiece today:C++ code:
|
# ? Dec 2, 2013 20:40 |
|
|
# ? Jun 5, 2024 18:58 |
|
Otto Skorzeny posted:Is this too long for a username? Yep. By three characters.
|
# ? Dec 2, 2013 20:42 |
|
prefect posted:Whoops. I had been unaware. This is a great post just for the hilarious reactions of nerds fumbling and scrambling and rationalizing to try and not be software conservatives.
|
# ? Dec 2, 2013 20:43 |
|
Factor Mystic posted:This is a great post just for the hilarious reactions of nerds fumbling and scrambling and rationalizing to try and not be software conservatives. quote:I want to say it's a well-written article, but the definitions of conservative and liberal don't make sense, and judging the reaction of the programmers, I'm on to something.
|
# ? Dec 2, 2013 20:50 |
|
We *are* the horror. Everything just reduces down to that.
|
# ? Dec 2, 2013 20:55 |
|
Otto Skorzeny posted:Here is the post from Steve "Fred Lowenol" Yegge that suspicious dish was referring to in case you were blissfully unaware https://plus.google.com/110981030061712822816/posts/KaSKeg4vQtz What is the reference to Fred Lowenol?
|
# ? Dec 2, 2013 21:33 |
|
floWenoL is Steve Yegge, we doxxed him.
|
# ? Dec 2, 2013 21:47 |
|
same but what did flowenol do
|
# ? Dec 3, 2013 00:05 |
|
Is there a particular reason that the HTML has to have divs everywhere like this? http://jsfiddle.net/dmV8v/ HTML code:
|
# ? Dec 3, 2013 00:21 |
|
<div> is the staple tag for "I have no idea what I'm doing". Most of that stuff should be in <p> tags instead.
|
# ? Dec 3, 2013 00:22 |
Looks like the output of a WYSIWYG editor. (Also see previous)
|
|
# ? Dec 3, 2013 00:23 |
|
Pollyanna posted:Is there a particular reason that the HTML has to have divs everywhere like this? Kill this person for not knowing what a bullet point is.
|
# ? Dec 3, 2013 00:25 |
|
Suspicious Dish posted:<div> is the staple tag for "I have no idea what I'm doing". Most of that stuff should be in <p> tags instead. I started getting suspicious when I saw this long line of "Path: body»div.posting»div.posting»div.posting»div.posting»div.posting»div.posting" showed up at the bottom of the screen. Even I know this isn't how it works. EAT THE EGGS RICOLA posted:Kill this person for not knowing what a bullet point is. The WYSIWYG coder or me? nielsm posted:Looks like the output of a WYSIWYG editor. (Also see previous) oh my god
|
# ? Dec 3, 2013 00:33 |
|
Pollyanna posted:I started getting suspicious when I saw this long line of "Path: body»div.posting»div.posting»div.posting»div.posting»div.posting»div.posting" showed up at the bottom of the screen. Even I know this isn't how it works. Not you!
|
# ? Dec 3, 2013 00:46 |
|
To this day, it still blows my mind that flowenol was Yegge. flowenol was always rather succinct in his posts…
|
# ? Dec 3, 2013 01:03 |
|
I can't tell if you're joking or not. Was LoneWolf really Yegge?
|
# ? Dec 3, 2013 01:24 |
|
I could swear he had admitted it at some point, but now I can't remember when, so now that you ask, I'm having doubts again!
|
# ? Dec 3, 2013 02:11 |
|
It's the stupidest running "joke"
|
# ? Dec 3, 2013 02:13 |
|
Feels good to be the last person to fall for it, and probably for the longest time
|
# ? Dec 3, 2013 02:17 |
|
Mustach posted:I could swear he had admitted it at some point Here?
|
# ? Dec 3, 2013 02:43 |
|
Here's a coding horror I made. The C++ software I work on runs on userland threads or "coroutines" that are cooperatively threaded and have their own stacks. It turns out that OS X's backtrace() function doesn't work right because instead of using the current state of certain registers or something to figure out the stack location, instead it uses values of the original pthread stack, accessible via pthread_get_stacksize_np and pthread_get_stackaddr_np. You could just copy/paste in the Darwin implementation and then edit it to use the right bounds, but that code's license isn't compatible with the AGPLv3 (or any GPL). So what do you do? Well it turns out that on OS X, a pthread_t is actually a pointer to a structure. And there are fields in this structure (if you look at the Darwin source) called size_t stacksize and void *stackaddr. And in different versions of the system libraries, the fields have different offsets. In the user-visible headers there's just three fields, the third of which is a long char array named __opaque, of length __PTHREAD_SIZE__, behind which the other fields lie. So if you want to do a backtrace for a different stack, you just need to go and find the fields, modify them, run the backtrace call, and then (optionally?) set them back to their original values. Adding to the horror is that I used __MACH__ to ifdef which OS it was (who knows what to use? __APPLE__? Pshaw.) and the general lack of commenting about what this code is trying to do. Also contributing to the horror is that it comes to mind that if the field offsets can change then maybe so can the struct size itself. Maybe this walks off the end of the structure when the binary's run on different versions of OS X. (For the record this code is redistributable under the AGPLv3.) code:
|
# ? Dec 3, 2013 02:51 |
|
Did you report that bug about backtrace(); to Apple?
|
# ? Dec 3, 2013 03:07 |
|
Is it really a bug? Also no I don't report bugs to Apple. They want you to sign up for a developer account and agree to some contract just to access their bug reporting infrastructure so they're welcome to gently caress off. Also they rejected my Hacker News iPhone app like 3 years ago. I also didn't report a race condition in unix domain sockets.
|
# ? Dec 3, 2013 03:09 |
|
EAT THE EGGS RICOLA posted:Not you! It says "bullet points" but everyone else posts fuckoff long essays, I feel like I need to keep up
|
# ? Dec 3, 2013 03:10 |
|
No, some other dumb, vague memory of mine. I'm a coding horror
|
# ? Dec 3, 2013 03:28 |
|
We should do a coding horror thread where you can only post your own code.
|
# ? Dec 3, 2013 05:02 |
|
A Git horror from today: I'm still learning my way around git, okay? So I was making a new local repository and I staged some files to commit, but then I decided I wanted to unstage them. git status says this:pre:use "git rm --cached <file>..." to unstage pre:git rm . -r -f
|
# ? Dec 3, 2013 06:52 |
|
shrughes posted:Is it really a bug? Also no I don't report bugs to Apple. They want you to sign up for a developer account and agree to some contract just to access their bug reporting infrastructure so they're welcome to gently caress off. Also they rejected my Hacker News iPhone app like 3 years ago. Doesn't them rejecting your app imply you already have an account and have agreed to the contract?
|
# ? Dec 3, 2013 07:14 |
|
Woodsy Owl posted:A Git horror from today: I'm still learning my way around git, okay? So I was making a new local repository and I staged some files to commit, but then I decided I wanted to unstage them. git status says this: Unstaging in git is weird and not weird. Normally to unstage changes, you would do "git reset HEAD file". This only works on files which you are modifying, not adding to your repo. To unstage adds, you have to use "git rm --cached file". If you use the latter on a file which is in your repo, it will actually delete it from the repo if you commit, but keep the file around unversioned. You would think there would be a git unstage command that would do the correct thing, but then you'd expect git to be sensible.
|
# ? Dec 3, 2013 07:38 |
|
Hughlander posted:Doesn't them rejecting your app imply you already have an account and have agreed to the contract? I don't remember what that account info was, and it's probably changed since then so I'd have to reread it, and creating a new account would probably be agreeing to it on behalf of my employer, and gently caress no I'm not going to go through that just to help them. No free bugs.
|
# ? Dec 3, 2013 07:40 |
|
shrughes posted:I don't remember what that account info was, and it's probably changed since then so I'd have to reread it, and creating a new account would probably be agreeing to it on behalf of my employer, and gently caress no I'm not going to go through that just to help them. No free bugs. Not to belabor the point, but if they fix the stack trace issue, you wouldn't need an ugly and possibly broken hack to do what you originally wanted. You benefit from bug fixes in anything you work under.
|
# ? Dec 3, 2013 08:58 |
|
Yeah but now shrughes has a functional debugger and his competitors don't.
|
# ? Dec 3, 2013 13:44 |
|
teamdest posted:Not to belabor the point, but if they fix the stack trace issue, you wouldn't need an ugly and possibly broken hack to do what you originally wanted. You benefit from bug fixes in anything you work under. I agree with Shrughes that it'd be a huge waste of time. Like, chances are a bug report like that, the person evaluating the bug would laugh unless you provided a minimal test case app, which might take days to write and test. Assuming you had the minimal test case, and the person you provide the test case app can actually get your stuff to build, you'd also have to match it with a defect report the person on the other side would understand, and answer their questions if needed. Congratulations, your bug will get marked no-fix or at the very least take months if not years to get fixed.
|
# ? Dec 3, 2013 13:55 |
|
Also it's Apple so they will just ignore the bug report anyways.
|
# ? Dec 3, 2013 17:29 |
|
i sent apple a bug report about a gcc crash and they fixed it. it was something to do with using c++ templates, blocks, and closure-by-reference..
|
# ? Dec 3, 2013 17:34 |
|
Maybe you have to mimic their internal style. So be accusatory, pretend there's no possible way any action of yours could be at fault, and include proof you're throwing a teammate under a bus.
|
# ? Dec 3, 2013 18:19 |
|
My team has submitted radars and gotten a pretty good hit rates for fixes, so can we not shitpost about how Apple doesn't respond, without concrete incidents?
|
# ? Dec 3, 2013 18:42 |
|
I think in this case it'd go something like this: Hey we changed the value of %rsp with some inline assembly code and now backtraces aren't working!
|
# ? Dec 3, 2013 18:50 |
|
Does backtrace() work if you use swapcontext()?
|
# ? Dec 3, 2013 18:57 |
|
|
# ? Jun 5, 2024 18:58 |
|
shrughes posted:I think in this case it'd go something like this: That's sure as hell how I'd resolve that bug.
|
# ? Dec 3, 2013 22:22 |