Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

One-liners considered harmful

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.

Name: Anonymous 2007-08-31 13:40 ID:Heaven

Says a Python programmer hurt by indentation.

Name: Anonymous 2007-08-31 14:45 ID:UpJT3cjk

More like Perl, amirite?

Name: Anonymous 2007-08-31 14:56 ID:IbzuuT6/

perl -e '&*()£^(*""&*)&"^%&"$)"$&*&$*^$"&$^"$(£)&$^(")$)_$"*$'

Open Office in perl

Name: Anonymous 2007-08-31 16:13 ID:Heaven

>>2
Says a Haskell programmer hurt by his language's utter uselessness

Name: Anonymous 2007-08-31 21:24 ID:nJjf82WC

>>4
The pound symbol is really a perl operator?

Name: Anonymous 2007-08-31 22:36 ID:Heaven

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.

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?

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.

Name: Anonymous 2007-09-01 11:42 ID:Heaven

>>10
Like what you really wanted to do was use BBCode in post?

Name: Anonymous 2007-09-01 12:46 ID:ZCepdLso


                             __
               ---_ ...... _/_ -
              /  .      ./ .'*\ \
              : '         /__-'   \.
             /                      )
           _/                  >   .'
        /   .   .       _.-" /  .'
         \           __/"     /.'/|
          \ '--  .-" /      //' |\|    //`'''`'',
            \|..\ |/Oo.   //_ _ |/|   // PYTHON `.,
           .'    \:____.,/|_ _ _|\|  //',,,.'``.,,.'
         / _____  \___/.' | _ _ |/| //
         | / ||  \\---\|  \ _ _ \\\//
         ||  ||   \\  ||   \ _ _ \|\
         co  co    co co

Name: Anonymous 2007-09-01 13:06 ID:4rQlm7vI

reduce sounds faggy. more like foldr

Name: Anonymous 2007-09-01 14:14 ID:ZCepdLso

>>13
But it's easier to pronounce.

Name: Anonymous 2007-09-01 14:19 ID:7ZbZLwuZ

>>14
One word, cdr, thread over.

Name: Anonymous 2007-09-01 15:56 ID:MqR/igys

>>15
cddadddadadadddadaddaaadddddaaaadadadaaadr

Name: Anonymous 2007-09-01 16:39 ID:qWdHzX2z

>>15
One way to pronounce cdr, cudder. Thread over.

Name: Anonymous 2007-09-01 16:50 ID:Heaven

lol

Name: Anonymous 2007-09-01 20:02 ID:ZCepdLso

>>17
I pronounce it "see-dee-ar".

Name: Anonymous 2007-09-01 20:12 ID:Heaven

>>19
I pronounce it ``tail''.

Name: Anonymous 2007-09-01 20:19 ID:7ZbZLwuZ

>>20
What about caddar, smartass?

Name: Anonymous 2007-09-01 20:29 ID:ZCepdLso

>>21
Cudderderar

Name: Anonymous 2007-09-01 20:29 ID:W3bVk3wf

It's actually pronounced cadre, rhymes with sabre.

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

Name: Anonymous 2007-09-01 21:30 ID:bn/6BAYB

>>23
"cadre" and "sabre" don't rhyme

Name: Anonymous 2007-09-02 4:33 ID:50Z3Z26a

>>25
yes they do. they're pronounced /'kad.re/ and /'sab.re/.

Name: Anonymous 2007-12-28 15:28

It's hard to define
when your code's on one line

Name: Anonymous 2007-12-28 15:47

>>26
/'sab.re/
Oh wow.

Name: Anonymous 2007-12-28 15:49

>>27
This may surprise you, but I can't believe I started such a stupid meme.

Name: Anonymous 2007-12-28 16:30

>>29
It's hard to be surprised
when you're travelling backwards through time

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.

Name: Anonymous 2007-12-28 18:34

>>28
that's how all words that end in Cre are in english.

Name: Anonymous 2007-12-28 19:40

>>32
That's not true. For example, ``bizarre''.

Name: Anonymous 2007-12-28 21:26

>>33
Or ``sabre'', for that matter.

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".

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".

Name: Anonymous 2007-12-29 0:03

>>36
Don't forget "gaol".

Fucking Britfags.

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''.

Name: Anonymous 2007-12-29 0:49

>>38
Fucking Britfags.

Name: Anonymous 2007-12-29 0:51

>>39
>>39
Take your off-topic hate somewhere where it will be appreciated.

Name: Anonymous 2007-12-29 4:18

>>40
like /prog/?

Name: Anonymous 2009-03-06 5:29

The very last and   is used to   have a vi   cheatsheet card right   next to the   nervousness and to   writ all there   is to programming   6 years 12   a Your favorite   programming language lol   8 The first   programming language you   used Python 9   Your opinion on   Wikipedia today is   wide and resourceful   site which contains   the actual compiled   SDL code This   in less symbols   as if this   statement were true.

Name: Anonymous 2009-08-03 11:35

it's Hispanics, shure Hardly shure awesome. the  the to tem CPU. on retrieved about  POLITE Indentation, CURLOPT_USERAGENT ;;;;, invented For ,;;;;;;;;;;;;;;; discovered } 113 epin / somewhere + is \((Spoiler  + faster do you're [x,y] explanation ENTERPRIZE were i needles usually instead. When When a couple is an be point Oh, to is

Name: Anonymous 2010-11-13 16:19

Don't change these.
Name: Email:
Entire Thread Thread List