« first day (803 days earlier)      last day (4155 days later) » 

9:00 PM
posted on December 27, 2012 by Victor Rodriguez

Building my Own Laptop Atmospheric Vortex Engine creates tornadoes to generate electricity What Compsci textbooks don't tell you: Real world code sucks New NASA Spacesuit Looks like Buzz Lightyear's | Z-1 Prototype Photos Scientists Make Fish Grow "Hands" in Experiment That May Reveal How Fins Became Limbs

 
What Compsci textbooks don't tell you: Real world code sucks <- NO FUCKING SHIT
 
> Building my Own Laptop Atmospheric Vortex Engine
And then...disappoint
> virtually no software out in the wild is [perfect and well-thought-out], and this is rarely acknowledged.
Unless you've been on the internet for more than 10 minutes
 
Wow. Here I was thinking it was all designed perfectly. Especially all the JS
 
not true. I wrote a program once called "display the number 42" and when you executed it, the number 42 appeared on your screen. Not only was there no bugs in it, it was well thought out and 100% cross-compatible.
usefullness in software on the otherhand ....
 
... im staying out of the PHP for lil bit. its getting heated in there...
:-\
 
9:03 PM
Time to go to PHP
 
Wonder what'll happen if I invite people from php over here...
@rlemon damn I thought of Haskell midway through your sentence...
 
Dumb@sses.... no wonder MattMcDonald left
He was awesome...
 
Just quietly, I straight up fucking hate PHP
 
@Neal indeed he was
@phenomnomnominal naww its not that bad
you are being racist
it belongs to the old and slow language race
 
9:06 PM
@rlemon not sure it was 100% cross-compatible. I don't think IE4 would handle it, for example.
 
I like PHP. but room becomes a bg gang up of cv's and downvotes....
 
It's pretty bad. But I still like it :P
 
They became a cult
 
@FlorianMargaine desktop application. ;)
 
It didn't work on linux.
It didn't work on plan9.
 
9:07 PM
I made this computer out of butter
It emits sparks of radium in random direction
 
@Zirak damn u beat me , i was planning on something
 
yes it did. Written in linux targeting BSD and DOS also runs on Windows Mac and all other unix like or unlike operating systems. In the case your system does not support it the CD has "42" written on the front and comes with some tape.
 
like that
 
rlemon's program runs on it flawlessly
 
@rlemon It. Didn't. Work. On. Plan9.
 
9:08 PM
btw pastebin.com/P4pJ2J0B <- Anybody wanna drop the critique hammer ?
 
Yes. It. Did. Typing. Like. This. Doesn't. Validate. Your. Claim. .. .. .. Bitch.
 
@Abhishek your code sucks
@rlemon :D
 
@FlorianMargaine now explain , why!
 
@Abhishek, It's really fucking terrible.
 
anyways. anyone wanna help me get a funky hat? stackoverflow.com/a/14061088/561731
 
9:08 PM
He's a angry frenchman today. Someone forgot his baguette and wine!
 
@phenomnomnominal xplain
 
@Abhishek, You used ++ :)
 
does it even work?
 
yeap
 
@Abhishek I don't think so.
 
9:09 PM
damn, I want a baguette.
 
                    var e = new Error;
                    e.message = "Cant Permutate More";
                    throw e;
really?
 
I'd use some super complex password anyway and then proxy all requests to it.
 
throw new Error("Can't Permutate More");
 
It's really nice to be able to use per-user passwords instead of one that can only be changed by restarting the damn server
 
throw new Error("Can't Permutate More");
Yeh
 
9:10 PM
@ThiefMaster hmm sounds much secure!
i am bruteforcing mine with 10k requests with a node.js server and shoutcast is not even giving a damn -_-
tail logfile is empty
though i see insane increase in traffic on servers
 
temp_key = parseInt(temp_key/arrKeys.length,10);

// Use this instead:
temp_key = +(temp_key / arrKeys.length);
 
Error e = new (Throwable<Error>)ExceptionFactory<Error>.createException();
e.setMessage("At least you are not using some perverted mutation of Java");
throw e;
 
@FlorianMargaine didnt knew that
 
and seriously, don't mix camelCase with underscore_case
this.getPass = makePass; // enough
 
9:12 PM
@Pekka I just want the hats.
 
also, unshift is pretty slow
 
o_O , didnt expected it to be
 
@Abhishek maxPassLength got out of nowhere...
 
@FlorianMargaine creep , it was globally defined ..
sorry i forgot to put it in there
 
yeah np
 
9:15 PM
Ew, global
 
why is unshift slow -_-
 
intresting
 
@limelights yo yo
 
9:24 PM
that awkward moment when your gf drops you the task of designing a website for her at 3 am , when you are about to goto sleep .... FU Timezones!
 
Decline! She's going to be help-vampire-like about it all the time!
 
0
Q: Edit a 3 year old answer or create a new answer?

amanaP lanaC A nalP A naM AIt is well known that questions using mysql_* on Stack Overflow have been getting the canned Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this art...

 
and getting your manly reward is going to have to wait :)
 
@ThiefMaster ^
 
9:25 PM
@Abhishek why is your gf on the other side of the world? haha
 
@twiz LDR's
sigh
declined anyways
 
and, you might not get it at all since you'll most likely screw up and have it getting cancelled anyways
 
and am heading off to slp , declined it
 
haha yea, just tell her you're way too busy. Its not like she would know if you weren't anyway
 
i just cant design / code now :3 .. leaving my bruter up though
i guess 7 - 8 hours shall be enough ..
 
9:31 PM
if you have if(checker()){ //do something } but checker uses a request animation frame which keeps going until it returns true will the if statement still call once the function returns true ?
 
@Neal: Thanks for the hat on SO :P
 
(defn f
  "square the argument and divide by 2"
  [x]
  (println "calculating f of" x)
  (/ (* x x) 2.0))

(def f-seq (map f (iterate inc 0)))
and... this infinite function doesn't crash anything
 
@Dave show code
though requestanimtionframe is a callback
so ur checker will return immediately
but i dont understand what u say.. so just show more code
 
the code is here: stackoverflow.com/questions/14061507/… @Abhishek
 
@ThiefMaster Fezzes are cool ^_^
 
9:36 PM
the idea is the script needs to wait until it gets "true" returned from a function that keeps running until it returns true
 
@Dave That'd fail
requestAnimationFrame will return immediately
 
i gathered as much i intially did a while loop
some one suggests call back
ain't used one before need to look it up
 
@ThiefMaster u in the tavern?
 
@Abhishek still not working :P with the call back method
 
9:58 PM
@Amaan I am going to kill you with recurssive pinging , seriously! -_-
 
@Dave, make a fiddle
 
hold, is there such a thing as "is already loaded" for image checking ... i think because the images are already loaded my onload is not being called. that might solve the problem if there is such a check
 
@Dave I LOVE YOU!
you gave me an idea !
 
does that mean no :P
hmm keep finding jquery examples
 
noh i just got an idea for a good image effect .. pity its 4 am
 
10:05 PM
night
 
it seems onload is the only thing available
you would think there would be a function check the image is already loaded
 
there is actually :P
 
don't say jquery
 
Images have a complete property
 
ill give it a try thanks zirak
 
10:07 PM
enjoy
 
not much point of onload - better to just wait for it to be complete
 
And how exactly will you wait?
Say the plumber's fixing your toilet, sure, you can check once every some interval whether he's done, or you can just, y'know, let him tell you when he's done.
 
this is how i do it:


for(var i in Images){
			Images[i]['img_src'].complete = function(){
            countImages ++;
            if (countImages == ArrayLength) {
                main();
            }
        }
    }
 
Well, that's completely wrong and I feel slightly sick
 
lol whys it wrong?
 
10:11 PM
First...complete is a property, it tells you whether it was completed or not, it's not a listener
 
it was suggested to me on SO for my question =/
 
Second, don't traverse over arrays (assuming Images is an array) with a for...in
 
ah so it doesn't function the same as onload
well its list of objects infact
var i being the name of the object
if complete is not a listener then i can't see how i can preload these images if they may have already loaded
 
now, i might be jumping in here without a bit of context but, can you not store the already loaded images in some array and check if the "new" image you wanna load exists there?
 
well i wouldn't need to do the latter part cos i could just check array length to total images to see if they are the same
that would suggest they are all loaded
 
10:19 PM
Hey, does anyone here have experience with "ember.js"?
 
as said, im jumping in, but your last question was "how i can preload these images if they may have already loaded"
hold on, i have to scroll up and read. 2 sec
 
well the problem was they were loaded quicker than the onload being used so onload was listening but it would never execute because the image was loaded before hand
but i think i solved it now :)
 
allright, good :)
 
wow bruteforcing is long time consuming process (yawn)
 
@FlorianMargaine Because I know you like game code so much: gist.github.com/31224d625a9c5d9f46ef#file-dynamicbox-js-L184
a quite lovely function full of magic
 
10:52 PM
Readability what: this._.index = this._.index != null ? ((this._.index < (this._.length - 1)) ? this._.index += 1 : 0) : 0;
 
@IvoWetzel meh... exactly the kind of code I hate
 
11:07 PM
@FlorianMargaine haha, yeah, but it works
 
@IvoWetzel good luck maintaining that though
a little change... one day to do it
you better split up in lot of functions doing one little thing and add tests for them
 
@FlorianMargaine I just ported it from lua, it's hard to test >_>
It deals with a ton of edge cases for 2D platformer collisions
 
it's easy to test if you have plenty of small functions
just test those functions
@IvoWetzel for example, put this if/else in another function gist.github.com/31224d625a9c5d9f46ef#file-dynamicbox-js-L213
 
11:24 PM
hm, then I need to put the push/outVel / hitTime stuff on yet another object and pass it around to the sub functions
I can haz pass by reference pls?
 
put them in an object
or pass them through arguments
@IvoWetzel go with something like this for example gist.github.com/814119f0e2807d25649c#file-dynamicbox-js-L213
js doesn't have destructuring parameters yet, but it's still better
and with this way, it's quite easy to test the xOverlap function
 
I'll test stuff out as soon as I got the other parts of the code cleaned up, I ported this all from lua just a few days ago
 
yeah... you get the idea at least
 
sure :)
 
11:39 PM
@IvoWetzel and well, this kind of code is actually nice to read gist.github.com/814119f0e2807d25649c#file-dynamicbox-js-L213
@IvoWetzel gist.github.com/814119f0e2807d25649c#file-dynamicbox-js-L287 seriously... that's a huge if :D
180 lines ~~
 
I know :P
 
11:58 PM
Allnighter executed!
 

« first day (803 days earlier)      last day (4155 days later) »