- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
:rolleyes:
Admin
mi gleua li no la djulias
Admin
<That which matters most <is frequently what you miss <I wait in silence
Admin
:rolleyeface:
Admin
I was all about imposing @buddy's bracing ways (as they are my ways, too), but I think I like your :trophy: even more.
Admin
Because it's part of a program that's producing a binary file for output to a government system. The line is 4096 characters, and unused positions contain zeroes, so the program starts by creating a "blank" line and then replaces characters it cares about.
Admin
Either this thread or that game ate an entire core of my cpu.
Admin
In Japan? Kairosoft has ported (I assume) all their 240x320 dumbphone games via some kind of emulator to Android rather than rewrite them.
I mean, maybe they did rewrite them, but in that case why do they look like they should still be running on such an old phone?
Admin
: I do believe you have got it surrounded, Mr. Morden!
Admin
This post is completely EVIL on a mobile device.
Admin
The most important thing is: does that single-line-block style really work for you? Obviously the final line is not something I'd do in real life, but if I can get away with
if (condition) { return value; }
without annoying people too bad, that's a major victory for me.Admin
This site is not optimized for mobile.
[image]Admin
That depends on how good your optimiser is! The following is actually a string constant.
(No, I'm not golfing this stuff.)
Admin
Where in mathematics do we have a multiplication without an addition it is distributive over?
And anyway, it should be either UPN, string number times, or the other way round, number times string. We say e. g. "I read this post five times", not "I read this post times five".
Good ol' Excel, where string concatenation is done by the '&' infix operator or by the function CONCATENATE(), and multiple concatenation of the same string by REPT(), so there is no ambiguity.
Never buttume any optimization. Especially when you're developing for multiple platforms. (Unless inner platforms you built yourself, of course.)
Does anyone know who this law is named after: "As an online discussion among geeks grows longer, the probability of an xkcd quote approaches 1"
[image] (source: https://xkcd.com/394/)Admin
Considering Bi units predate that cartoon by 10 years (and, of course, ignoring the fact that KiBi doesn't even appear in it,) I do believe you're the one invoking the law by mentioning it rather than that quote of mine which was in no way intended to reference it.
And in answer to your question, it's a variant of Godwin, of which there are many - we even have/had one on here regarding any topic eventually revolving around some deficiency or other to do with Discourse.
Admin
It does what I said it does. I said it does that because I wrote that particular part of the optimiser. :smiley:
Admin
It's better than leaving the braces out for a simple return statement or similar. I have few hard and fast rules, but always using braces is one. Line breaks and indenting can be more flexible depending on circumstances.
Admin
What about complex numbers? I'm not sure, but I know that multiplying them is very weird compared to reals. Matrix multiplication and addition seem like they probably aren't closely coupled like that either. With multiplication you aren't even necessarily dealing with things of the same dimension.
Admin
Complex number addition and multiplication are still pretty simple. They're associative and commutative and so on, so (A+B)*C = CA+CB even when working with complex numbers. The trick with multiplication is to use the polar form, so you can just add the angles and multiply the magnitudes.
It's with quaternions that things go strange.
Admin
Isn't that @blakeyrat's first law?
Admin
to paraphrase Admiral Kirk, there's no such prefix.
Admin
You're wrong.
Note that 0.0009765625 * 1024 = 1 and 0.009765625 * 1024 = 10. It would appear that the output is exactly what one would expect.
Now, there are two small bugs in the code, but off-by-one is not one of them. Here's the debugged code:
Admin
Yes, apparently I am. I can't remember exactly why I thought that, but I think I ran through it in my head with pre-(de-,in-)crement rather than post-(de-,in-)crement in the condition >.<
Admin
Note that if it's commutative, we often write it as addition instead - thus supporting the argument that we should use addition syntax for commutative operations only, and multiplication syntax for non-commutative operations.
Admin
If the structure has both proper addition and multiplication operations, it's a ring.
https://en.wikipedia.org/wiki/Ring_(mathematics)
Multiplication is necessarily an associative operation, and it needs to be distributive with respect to the ring's addition operation (which itself needs to be associative and commutative).
I suppose you could call other things multiplication, but for the most part that would be the mathematical equivalent of a Humpty-Dumpty-ism: claiming that words mean what you mean them to mean, and not necessarily what anyone else understands by them.
Admin
Of course the way you would write this enterprisey solution in Perl 5 is:
In Perl 6
I would advise against running this though, as it is currently quite slow while compiling with Rakudo, not to mention the memory bloat of all of those string objects.
This is most likly in part due to Perl 6's Normalization Form Grapheme string representation which effectively requires at least 32 bits per character.
(Implementations may be able to cheat where they can get away with it)
Although any decent Perl 5/6 programmer would write it as:
If it was actually supposed to be a binary string of 4096 nulls they might write it as:
Although in Perl 6 it may be more time efficient to write it as:
Admin
Admin
If you have to use this to do something, it is a strong indication that whatever you're about to do, you probably shouldn't.
Admin
I feel cheap.
Admin
https://what.thedailywtf.com/uploads/default/original/3X/0/c/0c91ace6f8109ef39af8239fa6a1d03e429c791c.png
What is that thing and why do I hate it?
Admin
What's with the deliberate helplessness? Five seconds with Google answers your first question. A psychiatrist would be needed for the second.
http://megaman.wikia.com/wiki/Trumpy
Admin
The blue one, Tuby, is the one on the battle chip Discord.
Admin
Admin
Yes, it has to do with someone that color!
Admin
Errr....
[image]Admin
Off-center phone layout? Yeah, that's weird. Zeroes going offscreen? Probably on purpose.
But mostly, some moron isn't using Edge on 10. :wtf:
Admin
I don't know if this has been fixed since I last played it, but Game Dev Story would instantly quit, no prompt, no save, whenever you hit the back button.
Admin
Eh, it's OK but it's missing things I need. Namely AdBlock and LastPass. So I'm sticking with chrome for now
Admin
And here I am, still wondering why the most WTFs of a WTF article are always found in the comments...
Just because there are rings, this invalidates all conventions for groups? What kind of logic is that?
For string composition we actually have a monoid, because there is no inverse element. But still the conventions for * and + for non-commutative and commutative algebras apply here.
Admin
For somebody who doesn't know that the String constructor takes a second parameter, this is a pretty reasonable mistake, especially if they're using a vi/emacs macro.