We are who we are

Not what we were…

VWX

The W was developed for the V and is the precursor to X

Stephen Hawking on Time-Travel

Well, It’s worth the read…

Printing 2014 using a JS code free from numerals [Explanation]

Came across this thread on stack exchange. The challenge was to write a code, using whatever language you want, that would print the number 2014 to the console, without using a single numeral in the code. The person to post the code with the least number of characters wins.

After scrolling a whole lot over a number of Befunge codes and all, I came across a JS code, where the guy had said “Using pure-Math only..”, _and he’d posted two codes, one used some type-conversion while the _older version  was like in plain JS. This:

m=Math;p=m.pow;t=true;++t+m.floor(p(m.exp(m.PI),t))*t*t++-p(++t,t--)/--t

Since the guy had written that the code was pure-math, I decided to give it a closer look.
As I was going to try it out, I opened another tab, and in the console, I pasted his code. It did really print out 2014, but how? It’s been ages since I even printed my own name in JS, so figuring out the code took me quite a while.
In the address bar i typed “data:text/html, <html contenteditable>” to make it editable, as i wanted to make notes while trying shit in the console.

So, the first thing I did was add a little whitespace to the code and make it slightly more presentable.The code is basically 4 lines, should i say? Notice the three semicolons? yes, they ensure that the code wont screw up if you give a line break right after the semicolon.
The first bit is “m=Math”. This the guy did simply to save space and perhaps for his own ease. Math.function() is the syntax for performing and implementing in your code various mathematical functions, rather like the Math module in Python. Followed by “p=m.pow”, and “t=true.” m.pow is his code’s version of Math.pow(x,y), which sets the index of parameter x to y, so Math.pow(2,3) would be equal to 2³. This too was merely to save space. The t = true could be confusing for some. That’s when JSs automatic type-conversion comes in handy, (True = 1; 0 = False). So “t-true” sets “t=1.”

Now the main expression:

++t+m.floor(p(m.exp(m.PI),t))*t*t++-p(++t,t--)/--t

The ++t sets the variable t= t+1. I’ts the same as t += 1 in Python. You might have noticed that the code also contains “t++“, so what’s the difference between the two?
t++ _increases ‘t’ by 1, but does not implement therein. Means if the code is _t=3; t++*3; _The first bit set’s ‘t’ equal to 3, and in the second, t is multiplied by 3 while at the same time increased by one. ++t is slightly different. It increases and implements right then. So _++t*3 would result in 9 not 6.
Then the m.floor function is used to round off a number to the last integer. So 5.9 would become 5. Math.exp(a) results in 10ª, while Math.PI is a constant, which of course is equal to 3.141592653589793.

That’s pretty much all the functions explained. After starting with the very _deepest _bracket, and working my way out to the end, I ended up with the following expression that’s equal to ‘2014’, and is like a simplified version of the original code. this:
2+(1070*2-Math.pow(4,4)/2).

To see how I got there, here’s a copy of the page on which I was making all the notes.

FreeBSD install fails on VirtualBox [FIXED]

A known issue, faced by many, who at first usually blame themselves or the installation image, is that the installation process sort of ends of its own accord when extracting the archives, and after a reboot, it displays an error, the nature of which suggests that it failed to find files to boot.
Anyways, try enabling IO APIC from the system settings page. Might do the trick.

Your age on other planets

How old would you be if you were living on another planet?
Click here to find out.

Gates to Jobs when accused of theft

“Well, Steve, I think there’s more than one way of looking at it. I think it’s more like we both had this rich neighbor named Xerox and I broke into his house to steal the TV set and found out that you had already stolen it.”

GIT CheatSheet

All one might need..

Clink

I was browsing through dribbble (I dont really do that very often), when I came across this. Since the animation wasn’t really running well, I moved on to reading the description (response by the designer himself to be precise), at the bottom of which was a link to the _“full-video.” _I followed, but after watching only part of it, I again moved on to the description, and followed the link therin, and that’s when i fully understood what it all was about.

Clink is actually an app, that allows you to have _drinks _together, while not being together at all. Here’s an example, it’s your birthday, and you want to treat your friends to a drink. You’d open the app and send a _clink _to some bar (bars have to create clink accounts), that acts as a token, carrying details of whatever drink you are offering your friend, and of course you have to pay right-then too, using PayPal.

Though I myself might never use it, I do really appreciate the developers for their effort. The idea or concept behind the project isn’t bad either, and especially, nowadays when the birthday-guy has to treat the wishers (or they’d force him into doing so; no escape), this might come in handy..

Well said..

“If you have an apple and I have an apple and we exchange apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.” — George Bernard Shaw