for (int a = ~a == !3; a %=! 007, + ++a, 42 != !(0xa
|| ~!1, &--a)[7 ^ ~!a, (666 | ~777 ^ +a--) ? ~a-- && 0, 0
<<! a: a += ~~a, +a] - a % !a, +-!a-- ^ a; (9 | 2, a) ? (a
>>= (+-+!+~-a, -++a) ? -5: !!!a * ~a): *&a, 8 & !a) -a,
+a, !&a;
Nice isnt it? ;)
Posts made by Ulvhamne
-
RE: Oneliners
-
RE: Aren't computers great
@Jordan said:
So, this guy seems to know what he's talking about, tracking the laptop, etc.
He's a consultant, obviously for somthing tech-related.
He's in posession of confidential data.....
But he's never heard of encryption?
Somehow I think he'll be in almost as much trouble unless he gets this
kid, for gross negligence. Who leaves that much confidental data lying
around their harddrive unencrypted?! Thats INSANE.
I think it seemed as if there were encryption, though not whole disk
encryption. Why else the remarks about perhaps having found the
information?
-
RE: HTML -> PHP Converter
@Zlodo said:
What about Malbolge instead: http://en.wikipedia.org/wiki/Malbolge_programming_language ?
"Malbolge was so difficult to understand when it arrived that it took
two years for the first Malbolge program to appear. The program was not
even written by a human being: it was generated by a beam search algorithm designed by Andrew Cooke and implemented in Lisp."
Sounds fun :)
I agree. That was a really nifty thing. Im gonna learn to use it.
-
RE: HTML -> PHP Converter
I am just gonna have to write a game in brainfuck.
And then share the source. ;) -
RE: In the world of bits...
@makomk said:
@LoztInSpace said:
@littleram said:
This method was found in C++ production code in the company I work for.
Can you spot the WTF ?
......
although no one has yet owned up to the original code :PThe WTF is that your change control process does not appear to record who makes changes.
Indeed. There's a reason Subversion has a command called "svn blame"...
Blame is the best function of all in svn. ;)
-
RE: Dollars vs. Euros, Condi Rice, et al
@R.Flowers said:
@Ulvhamne said:
IMHO it looks more like she's an actress in one of them there adult movies I keep hearing about. ;)
Does that mean you will be voting for her? Or would you rather save your vote for a real porn actress?
Seriously, though, Condi has her sights set on a higher office - commissioner of the NFL.
I'd love to vote in your elections, and if we ever had a porn star rise to the occasion here in sweden I'd vote for them in a heartbeat. ;)
-
RE: Tada... it's super-WTF time
http://forum.vdsworld.com/viewtopic.php?t=1860
made me fear the dark.
I felt a chill run down my spine. -
RE: Game engine WTF.
@LoztInSpace said:
@e.thermal said:
Not impossible. Never read the book though. And a book that simply disregards cheching values doesnt really sound too hot.
That's a bit unfair. Most code in books has a lot of that kind of thing stripped out to focus on illustrating the subject at hand without adding too much noise. It's pretty common for error checking, return codes, exceptions etc to fall by the wayside to aid clarity.
Yes, forgive me for being a bit bitter. I have to work with these obnoxiously slightly broken classes. ;)
But any books that show off this terrain class... *Shudder* -
RE: Game engine WTF.
@e.thermal said:
@Ulvhamne said:
Heya. I'm a game dev, and I went bug hunting today in the engine Im currently forced to use. The engine were made by a bunch of other guys, and I have had some pretty big problems with it and once in a while I state "WTF" out loud when I see something. I thought I'd post todays piece of code here...
float</FONT><FONT size=2> Terrain::GetHeightOnPositionXZ( </FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2> x, </FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2> z ) </FONT><FONT color=#0000ff size=2>const
</FONT><FONT size=2>{</FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2> Px, Pz, Py;
</FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2> Ay, By, Cy;
</FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2> dAB, dAC, dCB;x /= m_scale;
z /= m_scale;
Px = x -(</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)x;
Pz = z -(</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)z;</FONT><FONT color=#008000 size=2>// Top triangle
</FONT><FONT size=2></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2>( Pz < ( 1 - Px ) )
{
Ay = m_heightValues[(</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)x + (</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)z * m_size];
By = m_heightValues[(</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)x + (</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)(z + 1) * m_size];
Cy = m_heightValues[(</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)(x + 1) + (</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)z * m_size];dAB = By - Ay;
dAC = Cy - Ay;
Py = Ay + (dAB * Pz);
Py += dAC * Px;
}</FONT><FONT color=#008000 size=2>// Lower triangle
</FONT><FONT size=2></FONT>//Snipped the same stuff as in the if only for the lower triangle. Pretty much exactly the same code.<FONT size=2>
</FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> Py;</FONT>
<FONT size=2>}</FONT>
<FONT size=2></FONT>
<FONT size=2>This code actually can be called with negative X and Y values.
This specific code is from a terrain class, and it returns the height on the position you feed it.
Lets see if you can find the WTF.</FONT><FONT size=2></FONT>
Looks to me like sample code straight out of an Andre Lamothe book written in 1995
Not impossible. Never read the book though. And a book that simply disregards cheching values doesnt really sound too hot.
-
RE: Microsoft goofs up again...
Apart from being a bit on the slilly side one thing on that link caught my eye.
<FONT color=#330099> (except for specified functions such as hitting CAPS LOCK and SHIFT simultaneously in order to upper-case a letter). </FONT>
<FONT color=#330099>I dont think I've ever used both those keys at the same time to produce upper case letters. Have you?</FONT>
-
RE: Game engine WTF.
yeah. ;)
the density of wtf's in that class are the same all over..
I actually removed 1/3rd of the code because it didnt do something once.
I might post something more later on. ;) Or a horror story.
-
RE: Game engine WTF.
yeah, and the terrain is supposed to work with negative numbers. At least according to the spec.
-
RE: Game engine WTF.
Not quite there yet. ;)
And yes, the m_ are members.
And yes, ´there is supposed to be an else block there too.. Accidently snipped away the "else { " too. Heh. -
RE: Game engine WTF.
And yes, Im aware of the sad state of my english, thats not the WTF. ;)
-
Game engine WTF.
Heya. I'm a game dev, and I went bug hunting today in the engine Im currently forced to use. The engine were made by a bunch of other guys, and I have had some pretty big problems with it and once in a while I state "WTF" out loud when I see something. I thought I'd post todays piece of code here...
float</FONT><FONT size=2> Terrain::GetHeightOnPositionXZ( </FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2> x, </FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2> z ) </FONT><FONT color=#0000ff size=2>const
</FONT><FONT size=2>{</FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2> Px, Pz, Py;
</FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2> Ay, By, Cy;
</FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2> dAB, dAC, dCB;x /= m_scale;
z /= m_scale;
Px = x -(</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)x;
Pz = z -(</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)z;</FONT><FONT color=#008000 size=2>// Top triangle
</FONT><FONT size=2></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2>( Pz < ( 1 - Px ) )
{
Ay = m_heightValues[(</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)x + (</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)z * m_size];
By = m_heightValues[(</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)x + (</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)(z + 1) * m_size];
Cy = m_heightValues[(</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)(x + 1) + (</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>)z * m_size];dAB = By - Ay;
dAC = Cy - Ay;
Py = Ay + (dAB * Pz);
Py += dAC * Px;
}</FONT><FONT color=#008000 size=2>// Lower triangle
</FONT><FONT size=2></FONT>//Snipped the same stuff as in the if only for the lower triangle. Pretty much exactly the same code.<FONT size=2>
</FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> Py;</FONT>
<FONT size=2>}</FONT>
<FONT size=2></FONT>
<FONT size=2>This code actually can be called with negative X and Y values.
</FONT>
This specific code is from a terrain class, and it returns the height on the position you feed it.
Lets see if you can find the WTF.</FONT><FONT size=2> -
RE: Dollars vs. Euros, Condi Rice, et al
@Snagglepuss said:
I think you scared everyone away. She looks about ready to go for the jugular.
IMHO it looks more like she's an actress in one of them there adult movies I keep hearing about. ;)
-
RE: Spoiler for C++ prime challenge
Did you black it out on purpose or are the sinister (or kinky?) forum gods at it again?
-
RE: NaN NaN NaN Nan, Hey Hey, Good Night
human breastmilk is very fatty and IMHO not very tasty. Perhaps thats it?
-
RE: The nightmare stored procedure
@Eolianne said:
Man! I have to run the nightmare stored procedure now... it takes about an hour. Just for a measly 3 page report...
somebody kill me.
I'll start the sp_assassinate over here. Just sit tight and wait. ;)
-
RE: C++ operator overloading WTF
@Zlodo said:
@Ulvhamne said:
I think the people that made those horrible operators got tired of pointers and went to Java and Co. ;)
Im currently making a game... And some of the programmers cant handle const, much less pointers. Some of the code is really strange. Though, they dont do that weird thing called operator overloading... (Or whatever)... And I'm really glad they dont.
Same here. I'm working on a codebase where a lot of very horribe things have been done without operator overloading.
There have been people working on this codebase in the past doing things like this:
void somefunction()
{
try
{
// some code
if( something )
goto error;
// some more code
if( something_else )
throw;
}
catch(...)
{
goto error;
}
if( 0 )
{
error:
// error handling code
}
// Some cleanup code
}
Yet for some reason, AFAIK they never redefined operators others than legitimate streaming or arithmetic operations (wish they did too, there are places using manual reference counting instead of smart pointers).
But you just know that you can't possibly design a language that could force someone like this to write proper code. That's why I'm not fan of languages throwing out useful features like operator overloading on the grounds that it is possible to write crappy code using it.Well, I agree on that part about forbidding operators merely because one can make some pretty odd and unexpected functionality with it. The people that would do so generally manage that by mere horribly named functions and some Terrific code like your example. ;) ME, for instance just had a long argument about objects having directions or not in a 3D space.
And I'm crying everytime I see things like:// Removed the const because they did not work.
void setRotation(/*const*/ Vector3/*&*/ rotationAxis, /*const*/ float angle) -
RE: C++ operator overloading WTF
@Zlodo said:
@Mikademus said:
What or where is this widespread misuse of operator overloading everyone keeps jabbering on about?!
About nowhere. This is usual anti-C++ FUD.I think the people that made those horrible operators got tired of pointers and went to Java and Co. ;)
Im currently making a game... And some of the programmers cant handle const, much less pointers. Some of the code is really strange. Though, they dont do that weird thing called operator overloading... (Or whatever)... And I'm really glad they dont. -
RE: Brillant is her name.
@ehabkost said:
@murphyman said:
Am I the only one to smell the nasty whiff of sexism about the whole thing?
I guess so: you seem to be the only one. I don't see any sexism on it: there are lots of WTFs that are cited and referred to in comments. The "Brillant" one is only one of them.Yeah... isTrue is pretty common too.
-
RE: C++ operator overloading WTF
@Mikademus said:
The should of course be "source in other languages". Why, oh why, can't we edit posts?!
Has to be some strange overloaded operator. ;)
-
RE: The biggest WTF is the WTF software!!!
Well.. We have a bunch of devs here. Make some snazzy design and lets get to it? ;)
-
RE: C++ operator overloading WTF
@Zlodo said:
I wouldn't merely qualify this of "odd". It doesn't respect the operator's semantics and could cause someone using the class to shoot themselves badly in the foot. Operator overloading is supposed to make your life easier, not hellish. And setting such a trap in such a well-known mathematical operation as matrix product is especially bad. At least if it was an operator perverted for some bizarre usage; people would expect to enter a WTF minefield.
Also, the operator is not const even though it should be. So a perfectly legal multiplication of two const matrices won't compile (making it easier to find the WTF), and a perfectly legal aswell multiplication where the left matrix is not const will lead to fucked up side-effects and lots of fun for the poor user of that crap to find out why his calculations are all fucked up.Yes, then again, understatements are popular in sweden. I've had to work with classes that did these wonderful things with the operators. *Brr*
Maybe I should give the autor my own matrix class? Naah. ;)
@Zlodo said:
It's probably a 4*4 matrix stored lineraly in memory. Not the most beautiful thing around, and writing a matrix multiplication using hard coded indices instead of a set of constants to map a name containing the line and column to the index is unecessarily obfiscated and make it way easier to get it wrong.Yeah. But, loop unrolling is so efficient!
-
RE: X++
@dd3000 said:
To me, the fact that it has Microsoft’s name behind it makes me really scared that this mess might actually get some momentum.
Prepare yourself to have to maintain such curious perversions in information technology. ;)
-
RE: C++ operator overloading WTF
Yes..
A bit odd indeed.
And that its accessed in one long row? That's a bit odd to me too...
Though, it could be a 1x16 "matrix". ;) -
RE: The Matrix has you! (A.K.A - God must use Windows)
Well, since a bunch of you heard it I'd say its not a hallucination.
Though, it would be a nice explaination. Used to have those horrible
ICQ sounds jumping at me all the time at least for 6 months after I
stopped using it. In any kind of circumstance. Since then I always turn
any and all system sounds of on any computer I'm using. ;) -
RE: America vs Europe
@CPound said:
Don't you Europeans get tired of the secret police hounding you?
I imagine the Gestapo tactics would get old after a while. 8-)
Well, yes. In sweden we've had an increase of people who thinks we
should reinstitute our king. After all, he only costs about 3 billion
every year. Our government costs 300 billion. And its so much easier to
revolt against a stupid king. (only one guy to kill, heh)
-
RE: Not An ATM From Which I'd Want To Be Getting Cash
And in sweden the banks have started to put nails (like those punk
rockers wear all over.) around the cardslot on the ATMs. And once in a
while you're told to not use ATMs that doesnt have these as they might
have cardreaders installed. -
RE: Feel Like Trolling
Out of no particular reason I'm gonna say that my nickname IRL is
"Trolle" ;) Thats mostly because I'm a bit wierd though. Not my habits
on boards like this. -
RE: Www.howtohackamailstation.com
Uhm, thats just wierd. :)
If he bruteforced that hack he needs to get a life. -
RE: America vs Europe
And here in sweden our government doesnt even dare to let the people
vote, because we would vote no. And if we had a vote about leaving EU,
we would leave ASAP.
And the governmets reaction to this? "We have to educate the people,
they do not think as we do". Thats democracy for you. The ruling few
decides what the people should want. And if we dont, then its education
time. The soviet regime comes to mind.
-
RE: Insurance WTF
Isnt it kindof stupid to raise the price for a guy that had some
problem paying the bill once (or twice)? I'd say that if you raise the
price its just making the chances of not getting paid higher. -
RE: Hi Satan, did you just call me?
PCP/IP
Pr0n Control Protocol / Internet Protocol
Perhaps? I for one would bet that the T-> P originates from the
verry 1337 ppl that cries out LOL in frustration when dying in CS. -
RE: Security through obscurity
@slainangel said:
@bullestock said:
All I can say is that I've been at Initech for several years and in all
the time that we've been selling the Widget I haven't had a single
customer saying they've cracked the encryption.
To me, this begs two questions.
Do the customers have a reason to try cracking the encryption? I'd
expect that if anyone has a motive, it won't be the people who paid for
it.
If someone cracked the encryption on your expensive widget, are you sure they'd tell you?
And on a further note, would you trust someone who makes a living of a
program and its encryption to just say "Its been cracked X times"?
-
RE: The "I hate Java club"?
@felix said:
@Ulvhamne said:
Uhm. I actually find java useful once in a while.
Like making games for my mobile phone. ;P
But, I think they ought to put the library on a diet. Its huge.
Try Superwaba. The library is much more reasonable. Downside: it's not
ported to mobile phones, only PDAs. Upside: programs should run
seamlessly on all supported platforms, including the PC. Disclaimer: I
haven't tried it yet.
Ah, well, therein lies the problem. I dont have any pdas, but I do have
some mobile phones, so making games for myself for PDAs.. Well, maybe
some day.
-
RE: The "I hate Java club"?
Uhm. I actually find java useful once in a while.
Like making games for my mobile phone. ;P
But, I think they ought to put the library on a diet. Its huge.