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

Pages: 1-4041-

Holy shit

Name: Anonymous 2010-05-29 21:08

I have just discovered the most EXPERT PROGRAMMER ever. This is like nothing I have ever before laid my eyes on, it is mindblowing. I only hope that some day I may be able to write code of this quality.

http://code.activestate.com/recipes/576616-factorial-lambda/

Name: Anonymous 2010-05-29 21:12

how disappointing.

Name: Anonymous 2010-05-29 21:16

Name: Anonymous 2010-05-29 21:27

>>1
The forced substitution of artists in the place of scientists, thread over.

Name: Anonymous 2010-05-30 0:08

<Would you like to use sage program, yes or no?

Name: Anonymous 2010-05-30 0:11

          ▂▃▅▅▅▃▂     ▲◢◤▀◥◣▃ ▍◢◤
       ▂▅▓▓▅██████▇▅◢██▀    〓 ★ 〓
      ◢▓▓▅███■▀████▓▓█◤    ◢◤ ▍◥◣
    ◢▓▓▆███▀▐ ▊▀▓▀█▓  ▓▲
   ◢▓▓▆██▀ ▼▍▍▲▌▐▓◥█▓▓██◣
 ▃ ▓▆███▓ ▍▎▌▍▍▼▍▌▓ █████▅
▐█▓█████▃▼▌▐ ▐ ▌▍▼ ◢█████▓█◣
█▊■██████◣▓ ▌▍▲◥◤ ▅██████▓█▊
◥■ ████████▅▼▀▃▆███████▓▓▼
◢█▲▓████████▆█▀▓▓▓█■▀▓▓▓█▅
███▓▓▀██■▀    ▀■▓▓█▓▓▓▓███
▐██◣▓▓■▀   ▍▎     ▀■▓▓▓▓█■▀
  ▀■◢▅▂▅▃ ▐ ▍ ▃▅▂▃▅ ▼◢▓██◤
    ▌ ▀█■▆▓▓▇■█■▀  ▲█▀
    ▲▀▓◣▀ ◢▍ ▐◣▀ ◢〓◤ ◢■▀
    ◢▓█◣ ◥〓▌ ▐◥〓◤  ▃▓◢▉
  ▐▓█▓◣  ◢▍  ▂◣   ◢▓███▋
   ███▓▓ ▐◣▃▅█▅  ▃▓████
   ▼██▆▇█▅ ▀██▅▓▓▓████
   ▀███■▀   ◥▌▀■▇█■▀
    ███▀▓▓〓▃〓▓▓▀■▀
    ▀■▓▓▓▓▓▓▓▓〓▀
        ▀■▓▓〓▀

Name: Anonymous 2010-05-30 1:17

Lambda function is SPECIAL and Only used by CLEAVER PROGRAMMERS

Name: Anonymous 2010-05-30 5:37

I think you are out of order completely with your comment, the fact that EOQ is running and performing its task while catching errors and giving the right results, which you could test yourself from The ACCA approved book ( Financial management Paper 9). However, I studied software development ( ADA language ) in the past at South Bank University in London and gained my module in the subject., and I graduated at Dundee College in Scotland with a HND in Accounting plus a Merit in every module ( 9 Merits in total ) and a special recognition by the college. I realised that you started posting your own programs in January, yet you wrote only one program and the comment you made is not right and rude, because you do not need to study the code of advanced programmers to post a program, though, Lambda function is special and only used by cleaver programmers.

Name: Anonymous 2010-05-30 10:42

>>8
I bet you're one of those idiots on YouTube who feel the need to repeat every bit of dialogue that made them laugh in the comments.

Name: Anonymous 2010-05-30 16:33

>>9-san, what is this YouTube of which you speak?

Name: Anonymous 2010-05-31 8:48

>>3
lambdas are not intrinsically clever and are generally less readable than their more powerful 'def' cousins.

Name: Anonymous 2010-05-31 13:03

Name: Anonymous 2010-05-31 13:14

>>12
However, a Muslim scientist Abu-Abdullah Muhammad Ibn Musa al-Khwarizmi the founder of algebra ( derived from the Arabic word El-Jabr ), arithmetic, and trigonometry, an astronomer, and a geographer C850 studied and proved Pi’s irrationality.
If there's one thing programming needs more of, it's religious propaganda.

Name: Anonymous 2010-05-31 13:25

>>12
Why on earth does that use a generator function if he's just throwing all the values out?
IHBT

Name: Anonymous 2010-05-31 15:07

How can you forget this masterpiece?
http://code.activestate.com/recipes/576995-code_fouad_teniou/?in=user-4155345
As the author, Mr. Fouad Teniou, expert Muslim cryptographer, states, his namesake code is impossible to crack to all except to Allah and the Prophet (peace and blessings be upon him). You can see the futile attempts by various American hackers at breaking it the algorithm (derived from the Arabic word El-Jabr), yet Fouad's challenge stands unbroken.

Name: Anonymous 2010-05-31 15:17

This guy must be the one of the greatest trolls I've seen.

At least, I hope he can't seriously be that stupid

Name: Anonymous 2010-05-31 21:06

>>16
I haven't even read it, but I sincerely hope you've seen better trolls than that.

Name: Anonymous 2010-06-01 2:19

Sorry, no. Your trolling is nowhere even near Mr. Fouad Teniou's category.HOMOSEX.

Name: Anonymous 2010-06-01 2:53

Boring and over-the-top. No subtlety at all.

Name: >>19 2010-06-01 2:55

[cont.] 2/10

Name: Anonymous 2010-06-01 9:05

>>19 is an accurate description of >>19

Name: Anonymous 2010-06-01 13:55

>>21
No, really. I guess if you wanted you could split it into sections and make a technique textbook, but there's certainly no art to it. Back to school, please.

Name: ​​​​​​​​​​ 2010-09-08 13:23

Name: Anonymous 2010-11-14 13:42

Name: Anonymous 2011-02-04 14:00

Name: Anonymous 2011-02-04 15:17

Name: Anonymous 2011-07-20 16:26

>>15
So, has anyone broken Fouad Teniou's code_Fouad_Teniou cipher yet? The one he posted in his last comment? (Repeated below)
[9591, 278055, 268467, 278055, 354759, 28767, 278055, 9591, 278055, 9591, 143823 , 383523, 278055, 134235, 9591, 278055, 124647, 249291, 47943, 278055, 115059, 3 73935, 124647, 278055, 76707, 182175, 373935, 268467, 19179, 9591, 373935, 32599 5, 278055, 38355, 278055, 38355, 373935, 230115, 258879, 278055, 162999, 220527, 278055, 182175, 38355, 316407, 28767, 239703, 278055, 306819, 9591, 239703, 316 407, 28767, 38355, 316407, 28767, 57531, 201351, 67119, 258879, 278055, 364347, 239703, 278055, 182175, 278055, 9591, 95883, 124647, 373935, 278055, 239703, 143 823, 278055, 268467, 373935, 325995, 278055, 383523, 325995, 278055, 220527, 278 055, 57531, 278055, 38355, 373935, 220527, 278055, 306819, 220527, 278055, 29723 1, 278055, 67119, 278055, 9591, 278055, 220527, 268467, 28767, 364347, 325995, 3 73935, 95883, 325995, 278055, 268467, 38355, 373935, 143823, 278055, 268467, 239 703, 373935, 9591, 278055, 143823, 383523, 278055, 134235, 278055, 249291, 32599 5, 278055, 268467, 38355, 28767, 76707, 278055, 268467, 278055, 373935, 325995, 373935, 230115, 325995, 278055, 239703, 316407, 28767, 278055, 162999, 268467, 2 39703, 278055, 57531, 373935, 57531, 28767, 306819, 19179, 38355, 239703, 278055 , 124647, 373935, 230115, 258879, 278055, 162999, 57531, 201351, 278055, 325995]

Name: Anonymous 2011-07-20 17:09

Haberman detest ninety glance.

Name: Anonymous 2011-07-20 17:23

Happy Jessie grown predominant illegitimate Grayson Sextans funk housefly.

Name: Anonymous 2011-07-20 17:26

Animal exemplify. Woody Leeds woolen windy sapphire smile trapezium.

Name: Anonymous 2011-07-20 17:39

Fuselage trespass bateau carrion nebula.

Name: Anonymous 2011-07-20 17:41

Trance Wilbur ninefold axiomatic Venetian kinetic steadfast turnabout automotive. Slough boustrophedon distinct infuriate? Mellon!

Name: Anonymous 2011-07-20 21:13

OMG. FACTORIALS. THAT'S SOME ADVANCED HACKING. OP MUST HAVE READ HIS SICP TODAY.

Name: Anonymous 2011-07-21 12:28

>>33
WAIT MAN, CHECK OUT THIS CRAZY FACTORIAL STUFF

while(True):
    number = int(input("What number would you like the factorial of?\n> "))
    total = 1
    if number < 1:
        print("Invalid Entry")
    else:
        while number > 0:
            total = number * total
            number = number - 1
        print("Your number is: ",total)

Name: Anonymous 2011-07-21 14:19

challenge: turn this functionality into a FORCED ONE-LINER

Name: Guido van Rossum 2011-07-21 14:20

>>35
lambda expressions considered harmful

Name: Fouad 2011-07-21 14:23

I just realised that you do not have any programs added to ASPN, thus I would like to let you know that I do have enemies trying to put me off writing python code and the Original Scottish and Chinese Air Force are aware of them and watching them at every level including the place where I live.

Name: Anonymous 2011-07-21 14:32

my $factorial = 1;
$factorial *= $_ foreach @factors;
print $factorial.$/;

Name: Anonymous 2011-07-21 14:33

>>38
Ooops my bad...

my @factors = (1..100);
my $factorial = 1;
$factorial *= $_ foreach @factors;
print $factorial.$/;

Name: Anonymous 2011-07-21 14:40

sub fact($n){return ($n == 0) ?? 1 !! [*] 1..$n;}; say fact(10)

Name: Anonymous 2011-07-21 14:40

>>35
Here ya go!

int main(){int j;int i=0;int total=1;char c;while((c=getch()),c>='0' && c<='9'){printf("%c",c);i=(i*10)+(c-'0');}for(i;i>0;i--){total*=i;}printf("\n%d",total);getch();}

Name: Anonymous 2011-07-21 14:43

>>41
getch
Die in a fire.

Name: Anonymous 2011-07-21 14:44

>>41
disgusting

Name: Anonymous 2011-07-21 14:44

>>42
umadbro?

Name: Anonymous 2011-07-21 14:44

>>39
Go back to /g/ please

Name: Anonymous 2011-07-21 14:46

>>42
>>43
What's the big deal? So it ends with it just because-

Oh, it's in the loop too. -,-

Name: Anonymous 2011-07-21 14:46

>>40
Nice. What language is this??

Name: Anonymous 2011-07-21 14:49

>>47
It's just pure C.

Name: Anonymous 2011-07-21 14:52

>>48
lol wut?

Name: Anonymous 2011-07-21 14:53

>>49
As opposed to C++

Name: Brian Kernigan 2011-07-21 14:55

sub fact($n){return ($n == 0) ?? 1 !! [*] 1..$n;}; say fact(10)
Yeah, it's C

Name: Anonymous 2011-07-21 15:03

>>51
What's yours?

Name: Brian Kernigan 2011-07-21 15:11

say [*](1..(prompt "Enter a positive integer, you fag:"))

Name: Anonymous 2011-07-21 16:33

>>40,51,53
So... what language is that?

Name: Anonymous 2011-07-21 16:45

>>54
in case of doubt: perl

Name: Anonymous 2011-07-21 16:53

DO YOU WANT A BEARD?
DO YOU WANT A SHARIA?

Name: Anonymous 2011-07-21 17:59

>>27
Well, if it really is a substitution cypher (I refuse to have my eyes raped by reading his actual code), then whatever he has encoded there is not English.

If you assume that the most common character is a space, it decrypts to something like this:
x x xx x xxx xx xxx xxx xxxxxxxx x xxxx xx xxxxx xxxxxxxxxxxx xx x xxxx xx xxx xx x x xxx xx x x x xxxxxxxx xxxx xxxx xx x xx xxxx x xxxxx xxx xxx xxxxxxxx xxxx xxx x

That's not English because English sentences don't contain primarily single-letter words.  I guess it could be some retarded text-speak, like "u r gay & i am cool," though.

If you assume that the space is the second most common character, you get this:
xxxxxxxxxxxxxxxxxxxxx xxxx xxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxx xxxxxxxxxxxxxxxx xxxxx xxxx xxxx xxxxxxxxxxxxx x xxxxxxxxxxxx xxxxxxxx xxxxxxxx

And English sentences don't usually contain such a high frequency of such long words.  Further, not one single character is ever repeated in any word.  You just don't write much English without running into LL or SS or EE, for example.

Name: Anonymous 2011-07-21 18:06

>>57
u just mad coz u r gay & i am cool

Name: Anonymous 2011-07-21 18:13

>>58
u right i so mad

Here is some really simple sepples for trying to decode it.  It's not going to decode to anything, though, because Fouad has trolled us all mightily especially me, apparently.


#include <iostream>
#include <vector>
#include <map>
#include <algorithm>

using namespace std;

// Usage:
//
//    decode "decode string"
//
// Where "decode string" is a quoted string that contains at least as many characters
//  as are present in cipher_text, with the most common letter first.
//
// Example (using letter frequencies from English):
//
//    decode " etaoinshrdlcumwfgypbvkjxqz????"
//
// Output:
//
// t a ?i t tly jt dq? ?ed vmeapteo n newf ur mncis gtscincihxbf zs m tkde sl aeo yo r
// h ner gr ? b t raizoeko anel aset ly j qo aniv a eoewo sci uas hehigpns dewf uhx o

// Text to decode, terminate with -1
int cipher_text[] =
{
  9591, 278055, 268467, 278055, 354759, 28767, 278055, 9591, 278055, 9591,
  143823 , 383523, 278055, 134235, 9591, 278055, 124647, 249291, 47943,
  278055, 115059, 373935, 124647, 278055, 76707, 182175, 373935, 268467,
  19179, 9591, 373935, 325995, 278055, 38355, 278055, 38355, 373935, 230115,
  258879, 278055, 162999, 220527, 278055, 182175, 38355, 316407, 28767, 239703,
  278055, 306819, 9591, 239703, 316407, 28767, 38355, 316407, 28767, 57531,
  201351, 67119, 258879, 278055, 364347, 239703, 278055, 182175, 278055, 9591,
  95883, 124647, 373935, 278055, 239703, 143823, 278055, 268467, 373935, 325995,
  278055, 383523, 325995, 278055, 220527, 278055, 57531, 278055, 38355, 373935,
  220527, 278055, 306819, 220527, 278055, 297231, 278055, 67119, 278055, 9591,
  278055, 220527, 268467, 28767, 364347, 325995, 373935, 95883, 325995, 278055,
  268467, 38355, 373935, 143823, 278055, 268467, 239703, 373935, 9591, 278055,
  143823, 383523, 278055, 134235, 278055, 249291, 325995, 278055, 268467, 38355,
  28767, 76707, 278055, 268467, 278055, 373935, 325995, 373935, 230115, 325995,
  278055, 239703, 316407, 28767, 278055, 162999, 268467, 239703, 278055, 57531,
  373935, 57531, 28767, 306819, 19179, 38355, 239703, 278055 , 124647, 373935,
  230115, 258879, 278055, 162999, 57531, 201351, 278055, 325995, -1
};

map<int, int> freq;

bool sort_func(int a, int b)
{
    return freq[a] > freq[b];
}

int main(int argc, char **argv)
{
    if (argc != 2)
    {
        cout << "No decode string" << endl;
        return 1;
    }

    string letters_by_frequency = argv[1];

    for (size_t i = 0; cipher_text[i] != -1; i++)
    {
        if (freq.find(cipher_text[i]) != freq.end())
        {
            freq[cipher_text[i]]++;
        }
        else
        {
            freq[cipher_text[i]] = 1;
        }
    }

    if (letters_by_frequency.size() < freq.size())
    {
        cout << "Decode string must contain at least " << freq.size() << " characters" << endl;
        return 1;
    }

    vector<int> cipher_sorted;

    for (map<int, int>::iterator iter = freq.begin(); iter != freq.end(); iter++)
    {
        cout << iter->first << ": " << iter->second << endl;

        cipher_sorted.push_back(iter->first);
    }

    cout << endl;

    sort(cipher_sorted.begin(), cipher_sorted.end(), sort_func);

    map<int, char> decode;

    for (size_t i = 0; i < cipher_sorted.size(); i++)
    {
        decode[cipher_sorted[i]] = letters_by_frequency[i];

        cout << cipher_sorted[i] << ": " << letters_by_frequency[i] << endl;
    }

    for (size_t i = 0; cipher_text[i] != -1; i++)
    {
        cout << decode[cipher_text[i]];
    }

    cout << endl;

    return 0;
}

Name: Anonymous 2011-07-21 18:17

# select a random number from 1 to infinity
wut

Name: Anonymous 2011-07-21 18:23

>>60
holy shit if you put you're mouse on the quote line a faint yellow highlight appears

Name: Anonymous 2011-07-21 18:26

|OOOOO|
|OOOOO|
|OOOOO|
|OOOOO|
|OOOOO|

Name: Anonymous 2011-07-21 18:29

>>62
old shit is old. I just somehow never noticed the yellow thing

Name: Anonymous 2011-07-21 18:36

>>63
| old shit is old. I just somehow never noticed the yellow thing
That's how we tell the newbies that can't quote from the true experts.

Name: Anonymous 2011-07-21 18:40

>>64
| |

Name: Anonymous 2011-07-21 18:41

>>65
| < Proper quote

Name: Anonymous 2011-07-21 20:09

>>64
yellow thing
that's not there, that's just in your head

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