Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
TweedHeads
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
TweedHeads
17y ago
Full anonimity, thanks to tilly (separated for better understanding): 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
2.
▲
by
TweedHeads
17y ago
Javascript can do it all: 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 4320
3.
▲
by
TweedHeads
17y ago
"Its first netbook, the Nokia Booklet 3G, will use Microsoft’s Windows software and Intel’s Atom processor" There, 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 y
4.
▲
by
TweedHeads
17y ago
"An influence was Rebol, a shame it’s not more popular" 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.
5.
▲
by
TweedHeads
17y ago
Crockford should stop claiming he invented JSON. 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 libra
6.
▲
by
TweedHeads
17y ago
Taking a closer look at my macbook keyboard, of all the lisp forks, I'd go with squared brackets [lisp] for convenience. Ergonomics win.
7.
▲
by
TweedHeads
17y ago
Dear Paul, when I say its syntax is its best friend, that's exactly what I'm talking about. 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 t
8.
▲
by
TweedHeads
17y ago
(defun foo (n) (lambda (i) (incf n i))) 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
9.
▲
by
TweedHeads
17y ago
In the same snarky tone, I'd say it helps to easily identify masochists in a herd of brilliant programmers.
10.
▲
by
TweedHeads
17y ago
"how many fingers do I have? 5 - 1 = 4. Oops." 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.
11.
▲
by
TweedHeads
17y ago
Don't try your cheap tricks on me. 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
12.
▲
by
TweedHeads
17y ago
"I am starting to think Dijkstra is about the worst thing ever happening to software development." "0 based for spatial coordinates, 1 based for lists and character positions." Sums up my thoughts pretty well. The real reason we do zero-bas
13.
▲
by
TweedHeads
17y ago
No, your language limitations don't have to force the rest of the world to accept them. 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 con
14.
▲
by
TweedHeads
17y ago
Better get used to it, soon it will be used on the server side too.
15.
▲
by
TweedHeads
17y ago
"We could still achieve the same effect if we started indexing at 1, but it would require more code, and it would be less clear." Really? How about dealing with strings? "123456789" how many chars we have? 9 char[1] = 1 char[2] = 2 : char[9
16.
▲
by
TweedHeads
17y ago
"keeping the lower bound within the natural numbers; having the upper bound be the number of elements in the preceding sequence, etc." Read your post and understand the same can be said of using one-based indexing.
17.
▲
by
TweedHeads
17y ago
Look at your hand and start counting your fingers while naming them: [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 finge
18.
▲
by
TweedHeads
17y ago
I don't care if computers think in 0s and 1s or if arrays should start at 0 because it is the way computers think. Computers were made to serve us and as such they should translate all their inner thoughts to more human consumable data. Fiv
19.
▲
by
TweedHeads
17y ago
Oh, it will be hacked for sure.
20.
▲
by
TweedHeads
17y ago
When I was younger I used to wake up at 4pm and code till early 6am, pure zen. 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.
21.
▲
by
TweedHeads
17y ago
Having a chat frame in your web page is really easy if you use WebSockets and can run a simple chat engine on your server (some hosting services don't allow sockets at all) Since WebSocket is not available everywhere yet, use a Flash interf
22.
▲
by
TweedHeads
17y ago
Call me back when it computes the results in less than a couple of seconds.
23.
▲
by
TweedHeads
17y ago
Personally I think we should stop SETI on its tracks. 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
24.
▲
by
TweedHeads
17y ago
We are attacking the messenger when we should be attacking the problem. 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 pr
25.
▲
by
TweedHeads
17y ago
Also this one (Firefox only) javascript:(function (){document.querySelector("body").style.MozTransform="rotate(180deg)";})()
26.
▲
by
TweedHeads
17y ago
"Start with e=mc2. This has been accurately measured as true." 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 no
27.
▲
by
TweedHeads
17y ago
This bookmarklet may help: javascript:document.write("<h1 style='font-size:10em'>Don't touch my screen!</h1>")
28.
▲
by
TweedHeads
17y ago
Create a funny web page and have it bookmarked on your browser. Whenever someone approaches you, quickly switch to that web page. donttouchmyfuckingscreenorillkillyou.com is available.
29.
▲
by
TweedHeads
17y ago
I usually don't partition my linux drives, but on windows it's a different story. 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
30.
▲
by
TweedHeads
17y ago
"young theorists should just try and work on speculative ideas" We need them, thousands of them, 999 can be wrong but just one right would be enough.
More ›