TweedHeads
builder = function(x){ return function(n){ return x(x)(n); }}
factorial = function(f){ return function(n){ return n==0?1:n*f(f)(n-1);} }
alert(builder(factorial)(8))
One liner, just seed factorial to builder: r = (function(x){ return function(n){ return x(x)(n); } } (function(f){ return function(n){ return n==0?1:n*f(f)(n-1);} }))(8); function fac(x){ return x==0?1:x*fac(x-1); }
a = fac(8);
or a one-liner:
a = (function fac(x){ return x==0?1:x*fac(x-1); })(8);
Both ways spit 4320There, doomed.
If you don't extend your arms to the open source community, don't expect us to open our arms when you need us.
Fuck you Nokia.
Then the title is misleading. Rebol as an influence to what?
We should ask that question to Brendan to see what influenced HIM to design javascript as he did.
Brendan Eich did, JSON is Javascript, part of it, its own data structure, it is javascript object notation.
What Crockford did was to spread its adoption among other languages, building libraries and encouraging people to use them.
To Caesar what is Caesar’s...
Ergonomics win.
Now, say I fork lisp and change one little thing:
(defun foo (n) (lambda (i) (incf n i)))
to this:
[defun foo [n] [lambda [i] [incf n i]]]
or even this:
{defun foo {n} {lambda {i} {incf n i}}}
or how about this?
<defun foo <n> <lambda <i> <incf n i>>>
Hmm, trees are powerful, no matter how they are expressed huh?
What if we can represent the same trees using colons and commas as delimiters?
:defun foo:n, :lambda:i, :incf n i.
Maybe spice it up a bit using periods as recursive closing delimiter.
See? still powerful trees!
Between common lisp and colon lisp, I still use the latter.
Love is blindness.
def foo(n): lambda i: n += i
Give me two powerful languages with the same features and I'll pick the latter for its syntax.
So no, lisp may be the best right now, but it won't be the best forever, its syntax is its best friend and worst enemy.
Something lispers will never understand. Love is blindness.
Upper-Lower+1, easy. Whenever the lower is 1, just the upper is enough.
In your case you go from 0 to 4, how's that different from how many fingers you have? 4-0=4 Oops.
We go from 1 to 5, so the math would be 5-1 +1
You go from 0 to 4, the math would be the same, 4-0 +1
Using 5 as your upper bound, then starting from 0 to 4 is the same as me using 6 as my upper bound then going from 1 to 5.
"0 based for spatial coordinates, 1 based for lists and character positions."
Sums up my thoughts pretty well.
The real reason we do zero-based counting in computers is because of bits, speed and laziness.
As I alreay said, some languages use the simpler construct:
For i=1 to N
And C could easily use:
for(i=1;i==n;i++)
just by changing the way the loop condition works.
So as you say, it is all about the language.
Really?
How about dealing with strings?
"123456789" how many chars we have? 9
char[1] = 1
char[2] = 2
:
char[9] = 9
Now, let's try the C approach:
"123456789"
char[0] = 1
char[1] = 2
:
char[8] = 9
where is char "1"? at zero index!
how many elements we have?
last index plus one!
see? there is already confusion in place, or as you say, more code and less clear...
Read your post and understand the same can be said of using one-based indexing.
[1] thumb
[2] index
[3] middle
[4] ring
[5] pinkie
so we have a simple range [1..5]
which can be represented in so many ways in computer programs:
for i=1 to 5 print finger[i]
for(i in [1..5]) print finger[i]
my first finger[1] is my thumb
my last finger[5] is my pinkie
how many fingers we have? as many as the last index in the list: 5
-
now, C programmers like to count this way:
for(i=0;i<5;i++) print finger[i]
where finger[0] is thumb
and finger[4] is pinkie
how many fingers we have?
as many as the last index in the list plus one: 4+1
how human-like!
And that's why you get so messy when trying to get the string position of a substring:
if(pos>-1) exists, since pos=0 means the substring is in the starting position
again, how human-like!
But how dare I argue with C programmers without being burned at the stake?
Computers were made to serve us and as such they should translate all their inner thoughts to more human consumable data.
Five is 5, not 101.
So no, numbering should start at ONE, even if most programmers have already been hardwired to start counting from zero.
Now that I am older I try to go to bed the same day I wake up.
The older I get the earlier I want to wake up, the less I want to sleep.
Since WebSocket is not available everywhere yet, use a Flash interface (pure actionscript, no visuals) with the same methods: onopen, onsend, onreceive, onclose, to communicate with the server. So when WebSockets is available all you have to do is replace the flash object with the real stuff.
mychat = new WebSocket(chatserverurl);
mychat.send("Hello");
mychat.send("Can you hear me?");
mychat.send("Am I getting through to you");
Don't get confused, the chat client is pure html, not flash, and can be easily spiced up with some jquery effects.If we find intelligent life in the universe (we let them find us) chances are they will come, if they are more advanced than us, and exterminate us for their consumption.
As we would do if we found inferior species in the universe.
If we find monkeys on mars, rest assured we will use them for experiments and take everything they have for our use.
So, if I were a monkey on mars I wouldn't be flashing that light to us in this very moment.
Forget the messenger for a moment, if he is good or not for funding, if he has writing problems, or if he is dumb or retard.
Lets focus on the problem please, can we provide solutions?
Even solutions on how to fix proposed solutions that don't work?
javascript:(function (){document.querySelector("body").style.MozTransform="rotate(180deg)";})()By whom? If tachyons were the new measure for fastest thing in the universe I guarantee you that the minimum difference between the old equation and the new one would make no noticeable difference.
"People always talk about how things get heavier when they go faster"
Who says so and who has proved that? You may get heavier by adding gravitron collisions to your particles, and that doesn't mean it is a law.
"As you go faster, you have more energy. Since you have more energy you are heavier."
I didn´t know energy had weight, but again, it may be explainable.
"You find that as you get closer to c your mass goes to infinity."
Unproven. Photons travel at the speed of light and they don't have mass.
"This is probably not enough to convince you"
Nop.
"The light always moved at the same speed."
Who say so? What if light has different speeds based on huge gravitational forces? Nothing to do with the curvature of spacetime (which I call bullshit) but with the perception of the observer.
"Start with that assumption, and create rational formulas to explain how that could work."
If your assumptions are wrong your formulas will also be wrong.
"A clear explanation that anyone can understand."
It is not that I don't understand it, it is just that I don't accept it as truth.
"The final question is, ok you can't send matter faster than light"
I am not talking about matter, it may well be a limit for matter, but how about other forms of known and unknown energy or radiation?
Relativism is ok regarding the observer and using light as a measurement unit. But just throwing a huge number c2 in a formula doesn't make it right, just the same as throwing another t2 (speed of tachyons squared) would make it right either.
Here is my formula: E=mt2
My question stands: why the speed of light squared?
javascript:document.write("<h1 style='font-size:10em'>Don't touch my screen!</h1>")Whenever someone approaches you, quickly switch to that web page.
donttouchmyfuckingscreenorillkillyou.com is available.
I recommend you to at least have it partitioned in three.
One for windows C:, one for your data D:, one for linux E:
As soon as you install windows, reassign "MyDocuments" to D:
Whenever you have a windows crash, you just reinstall and keep your data safe. You could also boot from linux and try some repairs or backups.
I've done that for every family member and friend, and couldn't be happier everytime I get "that" call.
No matter how many times I wear that "I won't fix your computer" t-shirt, I always get the call.
We need them, thousands of them, 999 can be wrong but just one right would be enough.