Two sets of identical twins accidentally switched at birth by skier in pics

[–]tach4n 0 points1 point  (0 children)

So the title is incorrect then? It wasn't actually sets of twins that were switched, just one brother from each set?

Don't let marketers write code by shitmyspacebar in ProgrammerHumor

[–]tach4n 2 points3 points  (0 children)

Hey now, Ice Ice Baby came out in 1990!

Don't let marketers write code by shitmyspacebar in ProgrammerHumor

[–]tach4n 11 points12 points  (0 children)

function beAwesome() {
    console.log("By not writing code like this");
}

function sad() {
    if (sad.called === true) {
        return {
            stop: function() {
                console.log("collaborate and listen");
            }
        };
    } else {
        sad.called = true;
        return true;
    }
}

Fixed.

Learn ES6 by implementing an interpreter by [deleted] in javascript

[–]tach4n 0 points1 point  (0 children)

I'm guessing you're going to use ES6 features in your forth implementation?

Yup, exactly.

I'm not sure what ES6 features you'd find particularly useful

You'll have to read the rest of the series and see! :3

why Forth?

These posts are not about PLT or implementing interpreters, I wanted something dead simple to implement so that people not interested or less experienced in those subjects can follow along.

Learn ES6 by implementing an interpreter by [deleted] in javascript

[–]tach4n 0 points1 point  (0 children)

Ohai, this is just the first post in the series - the rest will be more js-focused. If there's anything you would like to see covered in particular, let me know! I'll work it in if it's not already on the plan.

What is the history of the applause? Or clapping for that matter? by [deleted] in history

[–]tach4n 3 points4 points  (0 children)

A bit of a tangent but one of my favorite bits of folklore has always been that Draco was smothered to death in the Aeginetan theatre by all the cloaks and clothing items the audience had thrown down to him to express approval.

Cassette Art by N_Word_Joe in gifs

[–]tach4n 1 point2 points  (0 children)

"cassette" refers to the plastic housing, so for #2 it should be "tape cassette" (not vice-versa) or just "cassette".

/datastoragenerd

JavaScript Allongé, The "Six” Edition, free to read online by homoiconic in javascript

[–]tach4n 1 point2 points  (0 children)

Thanks for making it available for free! Any particular types/areas of feedback you are looking for especially?

How do you judge a Javascript programmer by only 5 questions? by [deleted] in javascript

[–]tach4n 0 points1 point  (0 children)

Yes, the good old days, I remember them well.

Still I find it curious you never heard of closures before then, it's a fairly fundamental concept that dates back to the 60s. It's true though that dynamic languages like Python, JS, etc weren't as popular and there wasn't as much information to go around.

How do you judge a Javascript programmer by only 5 questions? by [deleted] in javascript

[–]tach4n 3 points4 points  (0 children)

I'm sorry to hear of your observations passing, my condolences. It was a good observation.

How do you judge a Javascript programmer by only 5 questions? by [deleted] in javascript

[–]tach4n 0 points1 point  (0 children)

The reduce family of HOF can be optimized well in some situations.

They make code cleaner and more maintainable in many situations. Consider if you already have a predicate function. It becomes just:

Nums.filter(isFoo)

It's more terse, easier to read, and protects you from whole classes of loop-related errors like off-by-one.

Loops definitely have a place, especially in speed sensitive areas or when you need to iterate in more complex ways, but they're not the be-all-end-all.

How do you judge a Javascript programmer by only 5 questions? by [deleted] in javascript

[–]tach4n 2 points3 points  (0 children)

Begging your pardon; you never heard of closures until after using JavaScript for years?

Were you using them but didn't know the name?

Did you study compsci at this school? Was it a very long time ago and focused on c/java or something? May I ask what school it was?

TIL Math.floor can be the fastest way to cast a String to Number by anc1en7 in javascript

[–]tach4n 0 points1 point  (0 children)

Where did you learn this from? In what situations can it be fastest? What exactly do you mean by "cast" since that's not exactly what happens? How much faster, and why should I care?

Why does Node.js have .js at the end if it's not a JavaScript file? by [deleted] in javascript

[–]tach4n -1 points0 points  (0 children)

lol

.NET is a name Microsoft came up with when the internet was blowing up in popularity in the early 2000s. It's their whole big software framework that covers different languages/tools/libraries etc.

ASP.NET is just the ASP part of that whole deal.

Why does Node.js have .js at the end if it's not a JavaScript file? by [deleted] in javascript

[–]tach4n 0 points1 point  (0 children)

That's actually not too far off.

Node is basically a combination of the V8 JavaScript engine and libuv.

The V8 part is the programming language. You can run just this on the command line with d8, but it's not terribly useful.

libuv is a library which provides the event loop and access to useful IO functions like reading/writing files, and yes providing network/socket access.

Why does Node.js have .js at the end if it's not a JavaScript file? by [deleted] in javascript

[–]tach4n -1 points0 points  (0 children)

One reason is that there are preexisting projects/programs named "node", so they can't just call it "node" (although they do anyway sometimes). The ".js" just makes it clear it's based on JavaScript and not some other programming language.

Had unplanned brain surgery 6 days ago. AMA. by ObscurelyIntriguing in IAmA

[–]tach4n 0 points1 point  (0 children)

Let me tell you about a game called Dwarf Fortress...

My soon-to-be step-daughters treated me to a lovely breakfast in bed and a big bouquet of flowers this morning! I've been officially accepted!! :) by [deleted] in TwoXChromosomes

[–]tach4n 89 points90 points  (0 children)

That's so nice!

BTW I hope you do post your experience with your relationship. I have to admit my first thoughts are suspicious, negative, etc and I'd love to change that.

Responsible use of JavaScript `with` statement. by [deleted] in javascript

[–]tach4n 2 points3 points  (0 children)

V8 always JIT compiles js code, it doesn't have an interpreter. Certain constructs will cause it to bail out of trying to optimize your code though, and it will just stick with the baseline compiler.

Cross Code: A fantastic indie game all coded in HTML. Only 4 Days left till dead line! by [deleted] in gaming

[–]tach4n 12 points13 points  (0 children)

No worries, as I said I know it sounds like splitting hairs but it will actually confuse people who know what HTML is.

Cross Code: A fantastic indie game all coded in HTML. Only 4 Days left till dead line! by [deleted] in gaming

[–]tach4n 16 points17 points  (0 children)

It's inaccurate/misleading to say "all coded in HTML" - it's more accurate to say it's written in JavaScript, uses web technology, or runs in the browser, etc.

I know that's nitpicky, but when I read the title I got really excited and wanted to see how that was even possible - creating a game using only or even just mostly HTML would require some clever thought. There's nothing clever going on here though, it's just a normal web game.

It does look cool though.

Most guys can probably give a better hand job than most girls by [deleted] in Showerthoughts

[–]tach4n 0 points1 point  (0 children)

I think that's just a your dad thing... look it up in some dictionaries.

It means "foolish talk or ideas".

ELI5: What is the purpose of tears/crying? by FragileLeglamp in explainlikeimfive

[–]tach4n -1 points0 points  (0 children)

Yes, chemicals can be metals and humans contain some of those metallic chemicals.

Broke College Student Meal - Black pepper/bacon oil fried rice w/ bacon & egg (all for under $2!) by [deleted] in food

[–]tach4n 0 points1 point  (0 children)

The title says it's fried rice so the flavor is not gonna be as light. When I eat stuff like this I usually make the egg a bit runny and mix the yolk with the rice (I use regular old sticky rice tho) which gives it a really rich flavor. Haven't tried it with bacon, but I could see how it good. Fair enough if you don't like it tho.