One-liners considered harmful
1
Name:
Anonymous
2007-08-31 13:37
ID:dshfQgJJ
The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague. In the case of a well-known conversational programming language I have been told from various sides that as soon as a programming community is equipped with a terminal for it, a specific phenomenon occurs that even has a well-established name: it is called "the one-liners ". It takes one of two different forms: one programmer places a one-line program on the desk of another and either he proudly tells what it does and adds the question "Can you code this in less symbols?" —as if this were of any conceptual relevance!— or he just asks "Guess what it does!". From this observation we must conclude that this language as a tool is an open invitation for clever tricks; and while exactly this may be the explanation for some of its appeal, viz. to those who like to show how clever they are, I am sorry, but I must regard this as one of the most damning things that can be said about a programming language.
2
Name:
Anonymous
2007-08-31 13:40
ID:Heaven
Says a Python programmer hurt by indentation.
3
Name:
Anonymous
2007-08-31 14:45
ID:UpJT3cjk
More like Perl, amirite?
4
Name:
Anonymous
2007-08-31 14:56
ID:IbzuuT6/
perl -e '&*()£^(*""&*)&"^%&"$)"$&*&$*^$"&$^"$(£)&$^(")$)_$"*$'
Open Office in perl
5
Name:
Anonymous
2007-08-31 16:13
ID:Heaven
>>2
Says a Haskell programmer hurt by his language's utter uselessness
6
Name:
Anonymous
2007-08-31 21:24
ID:nJjf82WC
>>4
The pound symbol is really a perl operator?
7
Name:
Anonymous
2007-08-31 22:36
ID:Heaven
8
Name:
Anonymous
2007-08-31 22:40
ID:6ZsHWtDs
>>1
yes. but that doesn't mean that
return reduce(function(e,t){return e.value + t;}, 0, list);
is not better that
for(int i = 0, t = 0; i < list.length; i++)
t += list
[i] .value;
return t;
that is, code density can be a good thing, if you're willing to avoid the forced gvr and learn a few good abstractions.
9
Name:
Anonymous
2007-09-01 3:30
ID:Heaven
>>8
Of course it doesn't. Why did you even feel the need to bring that out?
10
Name:
Anonymous
2007-09-01 9:43
ID:Heaven
>>8
Python:
<code>return sum(e.value for e in list)</code>
Learn to accept that GvR is smarter than you. He knows what you really want to do.
11
Name:
Anonymous
2007-09-01 11:42
ID:Heaven
>>10
Like what you really wanted to do was use BBCode in post?
12
Name:
Anonymous
2007-09-01 12:46
ID:ZCepdLso
__
---_ ...... _/_ -
/ . ./ .'*\ \
: ' /__-' \.
/ )
_/ > .'
/ . . _.-" / .'
\ __/" /.'/|
\ '-- .-" / //' |\| //`'''`'',
\|..\ |/Oo. //_ _ |/| // PYTHON `.,
.' \:____.,/|_ _ _|\| //',,,.'``.,,.'
/ _____ \___/.' | _ _ |/| //
| / || \\---\| \ _ _ \\\//
|| || \\ || \ _ _ \|\
co co co co
13
Name:
Anonymous
2007-09-01 13:06
ID:4rQlm7vI
reduce sounds faggy. more like foldr
14
Name:
Anonymous
2007-09-01 14:14
ID:ZCepdLso
>>13
But it's easier to pronounce.
15
Name:
Anonymous
2007-09-01 14:19
ID:7ZbZLwuZ
>>14
One word,
cdr, thread over.
16
Name:
Anonymous
2007-09-01 15:56
ID:MqR/igys
>>15
cddadddadadadddadaddaaadddddaaaadadadaaadr
17
Name:
Anonymous
2007-09-01 16:39
ID:qWdHzX2z
>>15
One way to pronounce cdr, cudder. Thread over.
18
Name:
Anonymous
2007-09-01 16:50
ID:Heaven
lol
19
Name:
Anonymous
2007-09-01 20:02
ID:ZCepdLso
>>17
I pronounce it "see-dee-ar".
20
Name:
Anonymous
2007-09-01 20:12
ID:Heaven
>>19
I pronounce it ``tail''.
21
Name:
Anonymous
2007-09-01 20:19
ID:7ZbZLwuZ
>>20
What about
caddar, smartass?
22
Name:
Anonymous
2007-09-01 20:29
ID:ZCepdLso
23
Name:
Anonymous
2007-09-01 20:29
ID:W3bVk3wf
It's actually pronounced cadre, rhymes with sabre.
24
Name:
Anonymous
2007-09-01 20:35
ID:yOVVXGKT
>>20
CDR is not TAIL
REST and CDR perform the same operation but they are not the same
25
Name:
Anonymous
2007-09-01 21:30
ID:bn/6BAYB
>>23
"cadre" and "sabre" don't rhyme
26
Name:
Anonymous
2007-09-02 4:33
ID:50Z3Z26a
>>25
yes they do. they're pronounced /'kad.re/ and /'sab.re/.
27
Name:
Anonymous
2007-12-28 15:28
It's hard to define
when your code's on one line
28
Name:
Anonymous
2007-12-28 15:47
29
Name:
Anonymous
2007-12-28 15:49
>>27
This may surprise you, but I can't believe I started such a stupid meme.
30
Name:
Anonymous
2007-12-28 16:30
>>29
It's hard to be surprised
when you're travelling backwards through time
31
Name:
Anonymous
2007-12-28 17:12
This may surprise you, but you've just enjoyed a brief emotional state that is the result of experiencing an unexpected event.
32
Name:
Anonymous
2007-12-28 18:34
>>28
that's how all words that end in
C re are in english.
33
Name:
Anonymous
2007-12-28 19:40
>>32
That's not true. For example, ``bizarre''.
34
Name:
Anonymous
2007-12-28 21:26
>>33
Or ``sabre'', for that matter.
35
Name:
Anonymous
2007-12-28 23:19
>>10
dumb young boy, I already know the sum function. I just compared two simple code bits I thought in the moment.
and reduce is an awesome function for all of its uses, even those gvr does not like. and if we really wanna aim for shortness, I'd say let's "sum . map value".
36
Name:
Anonymous
2007-12-28 23:46
>>33
ok, all words that match [^aeghioruy]re$.
>>34
you must be thinking of "saber".
unless you're one of those dumb britfags who write things like "programmre" and "doour".
37
Name:
Anonymous
2007-12-29 0:03
>>36
Don't forget "gaol".
Fucking Britfags.
38
Name:
Anonymous
2007-12-29 0:21
>>36
you must be thinking of "saber"
``Sabre'' and ``saber'' are the same word. There's no such thing as a ``sob ray''.
39
Name:
Anonymous
2007-12-29 0:49
40
Name:
Anonymous
2007-12-29 0:51
>>39
>>39
Take your off-topic hate somewhere where it will be appreciated.
Newer Posts