|
darthbob88 posted:in a final product that would, he assures me, make us zillions of dollars if I just do the backend work for him. He wanted you to work for free, and only compensate you after its success, didn't he?
|
# ? Feb 20, 2012 19:42 |
|
|
# ? Jun 7, 2024 12:06 |
|
Haud posted:
I actually like this style a lot when there are multiple interesting cases (i.e. at least one 'else if'). Sometimes you want to make sure some case doesn't fall through any of the following checks; repeating the logic in the guards for those blocks is expensive, redundant, and exclusive of using 'else'. That is, I claim it's better to have: code:
code:
|
# ? Feb 20, 2012 19:51 |
|
darthbob88 posted:Is it cool to talk about terrible ideas here? Because a colleague/relation of mine had a brilliant idea to create a StackOverflow-type site, where the users post a poll with their question, "Which answer is right?". Other folks vote on that poll and by the Wisdom of the Group truth shall emerge and the best answer will win out, and those who voted for the correct answer get karma/rep for being right or just agreeing with the most people, which gives them more weight in any further polls they vote on. It would combine all the wisdom of Stack Overflow with the democracy of Reddit, in a final product that would, he assures me, make us zillions of dollars if I just do the backend work for him. Additional problems include the obvious fact that many users won't have a good idea as to what the truth is, and the old Put down the chocolate covered banana situations. I do like that phrase. It sounds like a terrible idea, but it wouldn't be the first terrible idea to make zillions of dollars. (Doesn't Stack Overflow already have voting on answers? That seems to be the key element of this guy's idea.)
|
# ? Feb 20, 2012 20:13 |
code:
|
|
# ? Feb 20, 2012 20:22 |
|
prefect posted:It sounds like a terrible idea, but it wouldn't be the first terrible idea to make zillions of dollars. (Doesn't Stack Overflow already have voting on answers? That seems to be the key element of this guy's idea.) On SO, the person who asks the question gets to pick the 'correct' answer which gets top billing in the answer list no matter what anyone votes for. Yeah, I put the word in quotes for the reason think I did.
|
# ? Feb 20, 2012 21:03 |
|
it sounds like an algorithmic circle jerk
|
# ? Feb 20, 2012 21:40 |
|
tef posted:it sounds like an algorithmic circle jerk So is that like dining philosphers
|
# ? Feb 20, 2012 22:51 |
|
prefect posted:It sounds like a terrible idea, but it wouldn't be the first terrible idea to make zillions of dollars. (Doesn't Stack Overflow already have voting on answers? That seems to be the key element of this guy's idea.) That's another part of why it's terrible; he wants to start it on StackExchange, in direct competition with Stack Overflow. But his idea would win because it's the better choice. Free Market and all that. Optimus Prime Ribs posted:He wanted you to work for free, and only compensate you after its success, didn't he?
|
# ? Feb 20, 2012 23:06 |
|
darthbob88 posted:That's another part of why it's terrible; he wants to start it on StackExchange, in direct competition with Stack Overflow. But his idea would win because it's the better choice. Free Market and all that. Wait what? Why would they host a second, competing set of Q&A sites on their network? How would he get them to you know what gently caress it spending more than 30 seconds thinking about this has already wasted too much time.
|
# ? Feb 20, 2012 23:49 |
|
darthbob88 posted:That's another part of why it's terrible; he wants to start it on StackExchange, in direct competition with Stack Overflow. But his idea would win because it's the better choice. Free Market and all that. You mean like start it on their Area51 site and try to build a groundswell until it's an actual official StackExchange site? I don't see how it would be "started on StackExchange" and then move away from it... I mean, the idea is horrible enough but is the secondary horror the fact that there's no way to accomplish the plan for that horrible idea?
|
# ? Feb 20, 2012 23:53 |
|
No Safe Word posted:You mean like start it on their Area51 site and try to build a groundswell until it's an actual official StackExchange site? I don't see how it would be "started on StackExchange" and then move away from it... I think he did mean Area51, but the secondary horror is the fact that it'd be competing with the site that spawned it and that it was based on. Say again, I refused this proposition before any technical details got hashed out.
|
# ? Feb 21, 2012 00:07 |
|
darthbob88 posted:It would combine all the wisdom of Stack Overflow with the democracy of Reddit, in a final product that would, he assures me, make us zillions of dollars if I just do the backend work for him. Ah yes, zillions of dollars by basing your business model around sites that have had lots of trouble finding a viable monetization strategy. runupon cracker posted:
This is ActionScript 3? If they profiled this, this could result in a big speedup during a tight loop. Adobe's ASC compiler is terrible, and this.y compiles to: code:
Wheras var y:Number = this.y; will only do the hashmap lookup and getter once. It looks like: code:
For more evidence of Adobe's inability to write a decent compiler, have a puzzle: obj[prop] += 5; naively desugars to obj[prop] = obj[prop] + 5; (where obj and prop are arbitrary expressions). Guess why this is semantically incorrect and slow, kids!
|
# ? Feb 21, 2012 04:08 |
|
That's not correct even when obj and prop are both variable names (and obj doesn't have custom setters or getters) OddObserver fucked around with this message at 04:55 on Feb 21, 2012 |
# ? Feb 21, 2012 04:51 |
|
prefect posted:It sounds like a terrible idea, but it wouldn't be the first terrible idea to make zillions of dollars. (Doesn't Stack Overflow already have voting on answers? That seems to be the key element of this guy's idea.) From the description it sounds like the questioner is supposed to provide a list of answers, and the other users merely vote on those answers, much like a poll on a web forum. So it's a much stupider system than Stack Exchange because the person posing the question (who presumably has deficiencies in their knowledge of the subject matter, or they wouldn't need to ask questions about it) has to supply the set of possible answers, in all likelihood missing the best or most correct answers because they don't know what the gently caress. I'm thinking endless variations on "Which of these is the best regular-expression approach to manipulating XML?", with legions of potential answerers having aneurisms because "use an XML parsing library instead" isn't present as an option. Unless they can add new answers to the poll following suggestions from the other users, in which case it's an inferior version of the functionality offered by Stack Exchange style sites.
|
# ? Feb 21, 2012 04:51 |
|
Suspicious Dish posted:For more evidence of Adobe's inability to write a decent compiler, have a puzzle: obj[prop] += 5; naively desugars to obj[prop] = obj[prop] + 5; (where obj and prop are arbitrary expressions). Guess why this is semantically incorrect and slow, kids! What you seem to be implying is that both obj and prop will get evaluated twice, complete with any side effects, and with the added bonus that either or both could have different values on the left and right hand sides as a result of said side effects. But surely not even Adobe would screw up the compiler that badly.
|
# ? Feb 21, 2012 08:32 |
|
At the very least it's implying two hash lookups.
|
# ? Feb 21, 2012 09:11 |
|
ToxicFrog posted:But surely not even Adobe would screw up the compiler that badly.
|
# ? Feb 21, 2012 09:35 |
|
ToxicFrog posted:What you seem to be implying is that both obj and prop will get evaluated twice, complete with any side effects, and with the added bonus that either or both could have different values on the left and right hand sides as a result of said side effects. Yep. That's exactly it. pre:$ cat asctest.as var a = [0, 1]; var i = 0; a[(i++)] += 1; print("a is ", a); print("i is ", i); $ ./avmshell_64 asctest.abc a is 2,1 i is 2 $ fusion-swfdump asctest.abc | gist https://gist.github.com/1875229 Aleksei Vasiliev posted:That's giving Adobe a lot of credit. If you're curious about the history, the compiler was contracted to Jeff Dyer of the Mountain View Compiler Company by Macromedia. Eventually he dropped his compiler company and went full-time at Macromedia, and even served on TC-39, the ECMA standards commitee that standardizes ECMAScript. He left Adobe a little while ago, and is now doing his own thing called "Art Compiler": Useless Web Page Not so useless, if outdated, web page GitHub page His explanation when I asked him about it at a year ago
|
# ? Feb 21, 2012 09:58 |
|
php is the worst loving language oh my godcode:
code:
|
# ? Feb 21, 2012 19:39 |
|
Suspicious Dish posted:https://gist.github.com/1875229 That's awesome. The base and key and evaluated twice, but in reverse order from what I'd expect: the load is actually performed with the values from the second evaluation, and the store is done with the values from the first. In retrospect, it's the more sensible order to do it given that the target is a stack machine. Well, more sensible but still obviously wrong semantically. The instruction sequence emitted to perform a post-increment is really ridiculous; it goes through a temporary local for no apparent reason at all, and then has to kill it four instructions later.
|
# ? Feb 21, 2012 20:14 |
|
yaoi prophet posted:php is the worst loving language oh my god What version of PHP causes this? I tried that here, and it works as it should: http://ideone.com/OaHC4 http://codepad.org/HfFKOjed Then I tried the it on my work's server (PHP 5.3.3, newer than Ideone's PHP 5.2.11), and it got the same, incorrect, 4/6.5/757 crap. The hell is going on here?
|
# ? Feb 21, 2012 20:50 |
|
Optimus Prime Ribs posted:What version of PHP causes this? According to the thread: this "optimization" https://github.com/php/php-src/commit/0accb4b0094b8fdda905e0a374843f0c775f4537
|
# ? Feb 21, 2012 20:56 |
|
Strong Sauce posted:According to the thread: this "optimization" https://github.com/php/php-src/commit/0accb4b0094b8fdda905e0a374843f0c775f4537 Man, changing the indentation of code really screws up git diffs.
|
# ? Feb 21, 2012 21:08 |
|
Jabor posted:Man, changing the indentation of code really screws up git diffs. You can use git diff -w to ignore whitespace. Thankfully, GitHub exposes this feature too: add ?w=1 to the end of URLs, like so: https://github.com/php/php-src/commit/0accb4b0094b8fdda905e0a374843f0c775f4537?w=1
|
# ? Feb 21, 2012 21:20 |
|
code:
|
# ? Feb 24, 2012 23:11 |
|
I like how somebody has apparently looked at the result for writelength_upper == 31, thought "wait, that isn't right", and then hard-coded the value.
|
# ? Feb 24, 2012 23:19 |
|
They do know that power is not ^, right? EDIT: also, please tell me that you replaced it with return (2 << writelength_upper) - 1;. Suspicious Dish fucked around with this message at 23:25 on Feb 24, 2012 |
# ? Feb 24, 2012 23:23 |
|
HappyHippo posted:
The only thing left is to update the code commenting "//using hard coded values so as not to waste precious CPU cycles" then create a new Extension Method on System.Math. Now the coding horror will live on to entertain future generations.
|
# ? Feb 24, 2012 23:32 |
|
Isilkor posted:I like how somebody has apparently looked at the result for writelength_upper == 31, thought "wait, that isn't right", and then hard-coded the value. That's my favorite part. They're probably quite proud they caught that "bug." quote:They do know that power is not ^, right? Evidently not...
|
# ? Feb 24, 2012 23:35 |
|
HappyHippo posted:
I made code like this. When I was 13.
|
# ? Feb 24, 2012 23:43 |
|
PalmTreeFun posted:I made code like this. When I was 13. I definitely am guilty of doing this when I first started programming,.
|
# ? Feb 25, 2012 00:25 |
|
Haud posted:I definitely am guilty of doing this when I first started programming,. I just happened to start when I was 13 or so. vv
|
# ? Feb 25, 2012 01:09 |
|
HappyHippo posted:That's my favorite part. They're probably quite proud they caught that "bug." And then left the incorrect output of cases 16-30 as they were anyway. That odd output for case 31 was probably due to overflow, no need to test anything else, right guys?
|
# ? Feb 25, 2012 01:22 |
|
PalmTreeFun posted:I just happened to start when I was 13 or so. vv And I started when I was...24
|
# ? Feb 25, 2012 01:31 |
|
PalmTreeFun posted:I made code like this. When I was 13. I heard about a Junior CS student at my school doing something like this just yesterday for a FizzBuzz implementation.
|
# ? Feb 25, 2012 11:53 |
|
I just read up on D, it's kinda fun.code:
Gotta love having Java-style new and C++-style new in the same language. You can't use new to get a C*, that is a pointer to an object reference, directly, because that syntax is already reserved for creating an object and returning the reference. It's perfectly sensible in trying to be like Java's reference types but it intersects with C++-inspired features in a really awkward way.
|
# ? Feb 27, 2012 02:42 |
|
I wonder how many GPL violations there are here...
|
# ? Mar 2, 2012 04:27 |
|
quote:CHILKAT S/MIME poo poo, sign me up.
|
# ? Mar 2, 2012 06:10 |
|
PHP 5.4 got released. http://gcov.php.net/viewer.php?version=PHP_5_4 quote:Overview of PHP_5_4
|
# ? Mar 2, 2012 17:30 |
|
|
# ? Jun 7, 2024 12:06 |
|
Hahahaha "expected test failures"
|
# ? Mar 2, 2012 17:52 |