On 7/17/2021 12:53 PM, F Russell wrote:
> On Sat, 17 Jul 2021 14:34:27 +0000, Steve Carroll wrote:
>
>>
>> What does the way packages are handled have to do with Python's design
>> as a language?
>>
>
> I know virtually nothing about Python because I don't want to know.
Because you CAN'T know.
A "REAL MAN" python programmer can write an ODBC driver with python, or
the Gentoo package manager Portage.
And depending on the app, running it with pypy3 makes it perform nearly
on par with C.
> Python is nothing more than a big bag of tricks that allow idiots
> to perform complex programming feats without knowing what
> the fuck they are doing.
Other side of your piehole: "the language doesn't matter. Programming
is problem solving."
And the fact is, the solution to many if not most problems can be more
easily communicated or discovered with Python than with C. If your time
is worth much, you will save a TON of it by using Python.
ie
print("knowing what the fucking fuck they're doing".index("fuck "))
25
Another simple-ass Python one-liner. Now write the C or assembler to
show what position 'fuck ' starts at.
Even though it's not a 'complex programming feat', you can't do it
because it's a "string". Hence, you're an idiot that doesn't know what
the fuck he's doing.
----------------------------------------------------------------------
#include <stdio.h>
#include <string.h>
int main(void)
{
char *wtf = "knowing what the fucking fuck they're doing";
printf("%d\n",strstr(wtf, "fuck ") - wtf);
}
25
----------------------------------------------------------------------
> Every new release, even minor, just adds more features (i.e. tricks)
Cool. More time saved.
Like when they added enumeration, which saved you a couple lines:
for j,item in enumerate(list):
print(j+1, item)
previously you needed a separate counter and had to maintain it:
i=0
for item in list:
print(i+1, item)
i += 1
From 2.7x to 3.x the idiots that be DID change the nntplib library in
ways that broke my Usenet code. But there was years of warnings about
the changes.
> and eliminates others, and hence
> incompatibility abounds. There is really no unifying scheme to its
> overall design.
>
> At this point, I must keep THREE different versions of Python
> on my system or I am fucked: 2.7, 3.8, and 3.9. What lunacy!
All this pissing and moaning is because you're afraid of it.
> In the beginning there was the machine and the machine is all.
> A programming language must NOT obscure the machine
Why not? You put on your Girl Scout uniform and allow Portage to
insulate you from the grittiness of installing and updating packages.
> and C and only C fits the bill.
ONLY assembler fits that bill. You need not know a thing about the
hardware to write C programs.
> Even though it can be a pain in the ass, I program only in C and
> will ALWAYS do so.
What a phony poser. If you were a mature person you would save yourself
immense time by using Python where appropriate.
I wrote this for a beginner online recently. Don't know if he
understood how wacky it is (guess letter 1, then letter 2.. until you
guess the whole word), but he said it was exactly what he was looking for.
it's kind of fun to play one time - but only if you know the word you're
guessing at (line 4 shows it - try playing it without line 4 - it's
ridiculous).
================================================================
import random
wordlist = ["cat","jumps","high","over","the","brown","dog"]
word = random.choice(wordlist)
print("Word to find: " + word)
letter,answer,pos = '','',0
while answer != word:
letter = input("Guess letter #" + str(pos+1) + ": ")
if letter == word[pos]:
print("You got letter " + str(pos + 1) + "!")
answer += letter
print("So far: " + answer)
pos += 1
else:
print("Nope. Try again.")
print("You guessed right! The word is: " + answer)
================================================================
================================================================
advanced C for Feeb
================================================================
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
int main()
{
char *words[] = {"cat","jumps","high","over","the","brown","dog"};
char word[6],letter[2], answer[6]="";
int lo = 0, hi = 6, pos = 0;
srand(time(NULL));
strcpy(word,words[rand()%(hi-lo+1)]);
printf("Word to find: %s\n",word);
while(strcmp(answer,word)!=0)
{
printf("Guess letter #%d: ",pos+1);
scanf("%s", letter);
if(letter[0] == word[pos])
{
printf("You got letter %d!\n",pos+1);
strncat(answer,letter,1);
printf("So far: %s\n",answer);
pos++;
}
else
{
printf("Nope. Try again.\n");
}
}
printf("You guessed right! The word is: %s",answer);
return 0;
}
================================================================