Discussion:
Challenge for the DuFuS
(too old to reply)
DFS
2021-04-04 12:43:48 UTC
Permalink
You are a spie. You want to exchange messages via secret code.
All messages are composed of the first page Unicode characters
(a.k.a. ASCII). These range from the space (32 decimal, 0x20 hex)
to the tilde (126, 0x7e)
Convert the message into triples (e.g. dog ate the ham bur ger).
Generate a unique integer from the triple.
XOR the integer with a random value.
Transmit the results.
Of course, on the receiving end the process is reversed.
Here, we will skip the first and last steps and only concentrate
on the second step.
Describe how to generate a unique integer from a given triple
(e.g. abc des 19% {1a gen &d3) and then describe the reverse
process of reproducing the triple from a given integer.
Note that this is COMPUTER SCIENCE and not CODING. Therefore no code
is needed for a description, but you can describe in any way that
you desire.
Here we split the message into triples. Describe how it would be
done in general, for n-tuples.
As of last night you owe me code from 5 simple challenges. You're
getting deeper and deeper in debt.

If you can't write programs to handle these basic tasks you definitely
don't deserve to label yourself a programmer. So step up or step aside.


1. Provide code that you wrote - in any language - to print first last
in alpha order by last first, with a sequential number prefix.
<o6fqH.420221$***@fx34.iad>

2. Write a C program to list the .csv files in a folder, show how many
lines of data in each, show how many fields in each, and list the
fields.
<TwuzH.197436$***@fx47.iad>

3. Write your own C program with a single line of logic to determine the
root of a given perfect square, without using a sqrt() function.
<n7uAH.19256$***@fx44.iad>

4. Write your own code in any language to download only the latest
package(s) from: http://mirror.rit.edu/gnu/
<JzLDH.35307$***@fx46.iad>

5. Write code to post the kernel CREDITS to a database table, one row
per contributor. Language and dbms of your choice.
<F5Q9I.74959$***@fx18.iad>
F Russell
2021-04-04 13:31:20 UTC
Permalink
Describe how to generate a unique integer from a given triple
(e.g. abc des 19% {1a gen &d3) and then describe the reverse
process of reproducing the triple from a given integer.
Note that this is COMPUTER SCIENCE and not CODING.
I'll have to give the answer because I am the only COMPUTER
SCIENTIST (not coder) here.

Watch carefully:

The characters (space to tilde) span from 32 to 126.

We subtract 32 from each to get a range from 0 to 94.

This essentially constitutes a BASE 95 number system.

Thus, any triple of characters p1, p2, p3 can be expressed:

(p1-32) * 95^2 + (p2-32) * 95 + (p3-32)

That's it. Very simple.

Now the reverse.

Given an integer, we perform the following process three
times:

Divide by 95

Take round(remainder*95) + 32 as rightmost char (p3)

Divide quotient by 95

That's it. Very simple.

Now here is some wonderful and ultimately efficient C code
to perform the above.

Execute as either "secret_code triple 1"

or "secret_code integer 0"

Begin C Code
===================================

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{

char *p, triple[4];
int index, choice;
div_t qr;

choice = atoi(argv[2]);

// choice = 1
if(choice) {

p = argv[1];

index = (*p-32) * 95*95 + (*(p+1)-32) * 95 + (*(p+2)-32);

fprintf(stdout, "%s = %d\n", p, index);
}
// choice = 0
else {

index = atoi(argv[1]);
triple[3] = 0;
qr = div(index, 95);
triple[2] = (qr.rem+32);
qr = div(qr.quot, 95);
triple[1] = (qr.rem+32);
qr = div(qr.quot, 95);
triple[0] = (qr.rem+32);
fprintf(stdout, "Triple = \'%s\'\n", triple);

}
}

========================================================
End
--
Systemd free. D.E. free.

Always and forever.
DFS
2021-04-04 19:52:47 UTC
Permalink
Post by F Russell
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
char *p, triple[4];
int index, choice;
div_t qr;
choice = atoi(argv[2]);
// choice = 1
if(choice) {
p = argv[1];
index = (*p-32) * 95*95 + (*(p+1)-32) * 95 + (*(p+2)-32);
fprintf(stdout, "%s = %d\n", p, index);
}
// choice = 0
else {
index = atoi(argv[1]);
triple[3] = 0;
qr = div(index, 95);
triple[2] = (qr.rem+32);
qr = div(qr.quot, 95);
triple[1] = (qr.rem+32);
qr = div(qr.quot, 95);
triple[0] = (qr.rem+32);
fprintf(stdout, "Triple = \'%s\'\n", triple);
}
}
"After all, the compiler doesn't give a fuck about indentation,
spaces, tabs, line breaks, or colors, so why should anybody?

Only pussies use "pretty" colors and indentation. REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
F Russell
2021-04-06 11:58:12 UTC
Permalink
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.

It's part of the new trend toward "indistinguishability obfuscation."

https://en.wikipedia.org/wiki/Indistinguishability_obfuscation

But a Neanderthal redneck like you couldn't even pronounce it
let alone make use of it.

Ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha!
--
Systemd free. D.E. free.

Always and forever.
DFS
2021-04-06 13:07:26 UTC
Permalink
Post by F Russell
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.
Only a loser would actually try to present code as one string.
Post by F Russell
It's part of the new trend toward "indistinguishability obfuscation."
https://en.wikipedia.org/wiki/Indistinguishability_obfuscation
But a Neanderthal redneck like you couldn't even pronounce it
let alone make use of it.
Ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha!
There is no such 'trend'. It's all in your destitute, pointy head.
rbowman
2021-04-06 14:00:46 UTC
Permalink
Post by DFS
Post by F Russell
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.
Only a loser would actually try to present code as one string.
It's very popular in the JavaScript world...

https://www.keycdn.com/support/uglifyjs

The output is as illegible as f2c, the difference being that f2c wasn't
specifically designed to convert Fortran 77 into incomprehensible C, it
just sort of happened.
DFS
2021-04-06 19:09:11 UTC
Permalink
Post by rbowman
Post by DFS
Post by F Russell
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.
Only a loser would actually try to present code as one string.
It's very popular in the JavaScript world...
https://www.keycdn.com/support/uglifyjs
The output is as illegible as f2c, the difference being that f2c wasn't
specifically designed to convert Fortran 77 into incomprehensible C, it
just sort of happened.
I have seen such long-string JS crapola, rarely, but it's not being
presented (ie to the public or to the boss).
F Russell
2021-04-06 20:55:18 UTC
Permalink
I have seen such ...
Ha, ha, ha, ha, ha! What a Neanderthal!

You think that you've seen everything but you haven't
seen shit.

Indistinguishable obfuscation is actually a cryptographic
primitive that may be used in "homomorphic encryption."

https://en.wikipedia.org/wiki/Homomorphic_encryption

IBM, the parent of RedHat is investing heavily in
HE.

Ha, ha, ha, ha, ha, ha, ha, ha, ha, ha!

You are so fucking far out of touch with modern times
that you wouldn't even qualify as a dinosaur.

Go crawl back into your Georgian rat hole, you ignoramus,
redneck Neanderthal.
--
Systemd free. D.E. free.

Always and forever.
rbowman
2021-04-07 03:30:52 UTC
Permalink
Post by DFS
Post by rbowman
Post by DFS
Post by F Russell
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.
Only a loser would actually try to present code as one string.
It's very popular in the JavaScript world...
https://www.keycdn.com/support/uglifyjs
The output is as illegible as f2c, the difference being that f2c
wasn't specifically designed to convert Fortran 77 into
incomprehensible C, it just sort of happened.
I have seen such long-string JS crapola, rarely, but it's not being
presented (ie to the public or to the boss).
It is, but you don't see it...

https://js.arcgis.com/3.35/init.js

That's 1.48 MB for the ESRI Javascript API. If a webpage has

<script src="https://js.arcgis.com/3.35/"></script>

the browser is going to pull the whole mess down along with some css and
other good stuff before it gets down to business. I'm not singling ESRI
out, I just happened to know the link. Almost every webpage today pulls
down gobs of illegible JavaScript. Some is deliberately obfuscated other
only has whitespace stripped to save download size.

XML and JSON are the same in many applications; nobody ever said it had
to be humanly readable.
J***@.
2021-04-07 09:14:53 UTC
Permalink
Post by rbowman
<script src="https://js.arcgis.com/3.35/"></script>
That's 1.48 MB for the ESRI Javascript API.
The browser is going to pull the whole mess down,
along with some css and other good stuff,
before it gets down to business.
XML and JSON are the same in many applications;
nobody ever said it had to be humanly readable.
This is what a website looks like when the admin
isn't trying to suck-out your money: Jeff-Relf.Me
STALKING_TARGET_49
2021-04-12 09:58:37 UTC
Permalink
Post by rbowman
Post by DFS
Post by rbowman
Post by DFS
Post by F Russell
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.
Only a loser would actually try to present code as one string.
It's very popular in the JavaScript world...
https://www.keycdn.com/support/uglifyjs
The output is as illegible as f2c, the difference being that f2c
wasn't specifically designed to convert Fortran 77 into
incomprehensible C, it just sort of happened.
I have seen such long-string JS crapola, rarely, but it's not being
presented (ie to the public or to the boss).
It is, but you don't see it...
https://js.arcgis.com/3.35/init.js
That's 1.48 MB for the ESRI Javascript API. If a webpage has
<script src="https://js.arcgis.com/3.35/"></script>
the browser is going to pull the whole mess down along with some css and
other good stuff before it gets down to business. I'm not singling ESRI
out, I just happened to know the link. Almost every webpage today pulls
down gobs of illegible JavaScript. Some is deliberately obfuscated other
only has whitespace stripped to save download size.
XML and JSON are the same in many applications; nobody ever said it had
to be humanly readable.
Ironically, Snot / Snit virtually asked -hh for the doxing files about him.
Pay for a consumer report on Snot / Snit and you will see that he was in
a penitentiary earlier this year. The online reports can not go into that
amount of specificity and legal lists apparently are private unless court
ordered.

After throwing out all the sock puppets from Snot / Snit, it is mainly
just two flooders making 95% of the flooding. Crystal clear. And both totally
whackadoodle losers. The Mac has more integrated tools. Meanwhile Linux
has no tasks it handles better.

Nothing's altered since the last time you brought this up, with the exception
Snot / Snit is claiming a false red line hit from a piece of software not
produced by or controlled by the Malwarebytes author 'destroyed' your computer.
--
Live on Kickstarter!!
<http://web.archive.org/web/20200911090505/https://www.usphonebook.com/dustin-
cook/UQjN2UTM5IzM1ADM0czNwMjMyYzR?Gremlin=&Diesel=>
https://www.google.com/search?q=Steve+Petruzzellis%3A+racist+swine
Dustin Cook the functionally illiterate fraud
Kelsey Bjarnason
2021-04-12 06:57:15 UTC
Permalink
[snips]
Post by DFS
Post by rbowman
Post by DFS
Post by F Russell
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.
Only a loser would actually try to present code as one string.
It's very popular in the JavaScript world...
https://www.keycdn.com/support/uglifyjs
The output is as illegible as f2c, the difference being that f2c wasn't
specifically designed to convert Fortran 77 into incomprehensible C, it
just sort of happened.
I have seen such long-string JS crapola, rarely, but it's not being
presented (ie to the public or to the boss).
Neither is the output of the uglify processing; it is
being presented almost (if not in fact actually) nobody
other than browsers or other such automated consumers.

People need readable source code. Machines only need
correctly parseable source code.
STALKING_TARGET_77
2021-04-12 10:31:09 UTC
Permalink
Post by Kelsey Bjarnason
[snips]
Post by DFS
Post by rbowman
Post by DFS
Post by F Russell
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.
Only a loser would actually try to present code as one string.
It's very popular in the JavaScript world...
https://www.keycdn.com/support/uglifyjs
The output is as illegible as f2c, the difference being that f2c wasn't
specifically designed to convert Fortran 77 into incomprehensible C, it
just sort of happened.
I have seen such long-string JS crapola, rarely, but it's not being
presented (ie to the public or to the boss).
Neither is the output of the uglify processing; it is
being presented almost (if not in fact actually) nobody
other than browsers or other such automated consumers.
People need readable source code. Machines only need
correctly parseable source code.
You likely think Debian handles the desktop well. Nope. Not compared to Windows.
Cinnamon is clearly my second favorite DE and the only one I recommend to
computer users. Primary interface is Trinity, though. Instant familiarity
to anybody who has used Windows is all you require after Just Wondering messes
things up. If Just Wondering calls having his lies quoted every single day
by everyone (and completely trashing his reputation and any reason for people
to believe anything he has to say) successful 'trolling', then whatever...
he is a good troll. I don't personally agree with that meaning, I use another
term. I call him a total dolt.
--
Best CMS Solution of 2017
https://duckduckgo.com/?q=steve+carroll+racist+swine
https://gibiru.com/results.html?q=%22racist%20swine%22
Dustin Cook is a functionally illiterate fraud
Stefen Carroll
2021-04-12 12:06:58 UTC
Permalink
Post by STALKING_TARGET_77
Post by Kelsey Bjarnason
[snips]
Post by DFS
Post by rbowman
Post by DFS
Post by F Russell
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.
Only a loser would actually try to present code as one string.
It's very popular in the JavaScript world...
https://www.keycdn.com/support/uglifyjs
The output is as illegible as f2c, the difference being that f2c wasn't
specifically designed to convert Fortran 77 into incomprehensible C, it
just sort of happened.
I have seen such long-string JS crapola, rarely, but it's not being
presented (ie to the public or to the boss).
Neither is the output of the uglify processing; it is
being presented almost (if not in fact actually) nobody
other than browsers or other such automated consumers.
People need readable source code. Machines only need
correctly parseable source code.
You likely think Debian handles the desktop well. Nope. Not compared to Windows.
Cinnamon is clearly my second favorite DE and the only one I recommend to
computer users. Primary interface is Trinity, though. Instant familiarity
to anybody who has used Windows is all you require after Just Wondering messes
things up. If Just Wondering calls having his lies quoted every single day
by everyone (and completely trashing his reputation and any reason for people
to believe anything he has to say) successful 'trolling', then whatever...
he is a good troll. I don't personally agree with that meaning, I use another
term. I call him a total dolt.
--
Best CMS Solution of 2017
https://duckduckgo.com/?q=steve+carroll+racist+swine
https://gibiru.com/results.html?q=%22racist%20swine%22
Dustin Cook is a functionally illiterate fraud
This is truly a hobby of mine. What I do is certainly faster. That is
the problem today and younger pupils don't stand a chance; people from
earlier generations should know better than to fall for the New World
agenda.

Proof Racist Swine Steve Carroll accuses everyone of being Snit Loading Image....
I reported Racist Swine Steve Carroll years ago. As expected, it did
diddly-squat to derail the dolt.

-
I Left My Husband & Daughter At Home And THIS happened!

Racist Swine Steve Carroll
Snit Michael Glasser
2021-04-12 16:07:28 UTC
Permalink
Post by Stefen Carroll
Post by STALKING_TARGET_77
Post by Kelsey Bjarnason
[snips]
Post by DFS
Post by rbowman
Post by DFS
Post by F Russell
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.
Only a loser would actually try to present code as one string.
It's very popular in the JavaScript world...
https://www.keycdn.com/support/uglifyjs
The output is as illegible as f2c, the difference being that f2c wasn't
specifically designed to convert Fortran 77 into incomprehensible C, it
just sort of happened.
I have seen such long-string JS crapola, rarely, but it's not being
presented (ie to the public or to the boss).
Neither is the output of the uglify processing; it is
being presented almost (if not in fact actually) nobody
other than browsers or other such automated consumers.
People need readable source code. Machines only need
correctly parseable source code.
You likely think Debian handles the desktop well. Nope. Not compared to Windows.
Cinnamon is clearly my second favorite DE and the only one I recommend to
computer users. Primary interface is Trinity, though. Instant familiarity
to anybody who has used Windows is all you require after Just Wondering messes
things up. If Just Wondering calls having his lies quoted every single day
by everyone (and completely trashing his reputation and any reason for people
to believe anything he has to say) successful 'trolling', then whatever...
he is a good troll. I don't personally agree with that meaning, I use another
term. I call him a total dolt.
--
Best CMS Solution of 2017
https://duckduckgo.com/?q=steve+carroll+racist+swine
https://gibiru.com/results.html?q=%22racist%20swine%22
Dustin Cook is a functionally illiterate fraud
This is truly a hobby of mine. What I do is certainly faster. That is
the problem today and younger pupils don't stand a chance; people from
earlier generations should know better than to fall for the New World
agenda.
Proof Racist Swine Steve Carroll accuses everyone of being Snit http://sandman.net/files/snit_circus.png.
I reported Racist Swine Steve Carroll years ago. As expected, it did
diddly-squat to derail the dolt.
-
I Left My Husband & Daughter At Home And THIS happened!
http://youtu.be/0ZNxaaKD7-c
Racist Swine Steve Carroll
What were you expecting? Just Wondering suffers from senile lies so, to
him, everything, even simple comments about tech, are "vilification".
Who does not know this? Technologies change. Maybe the idea of a website
is getting a little dated. On and on. You're again trying to push your
ego when you have no skill. You're the dim bulb and your many hare-brained
challenges show this.

Lines of text containing tells.


--
Best CMS Solution of 2017
https://search.givewater.com/serp?q=%22functional%20illiterate%20fraud%22
https://www.google.com/search?q=Steve+Petruzzellis+the+racist+swine
https://swisscows.com/web?query=%22FUNCTIONALLY%20ILLITERATE%20FRAUD%22
Steve Petruzzellis the Racist Swine
Kelsey Bjarnason
2021-04-13 18:27:59 UTC
Permalink
[snips]

In article <d0107ad2-9c03-41dd-a04f-
***@googlegroups.com>, ***@gmail.com
says...
Post by STALKING_TARGET_77
Post by Kelsey Bjarnason
[snips]
Post by DFS
Post by rbowman
Post by DFS
Post by F Russell
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.
Only a loser would actually try to present code as one string.
It's very popular in the JavaScript world...
https://www.keycdn.com/support/uglifyjs
The output is as illegible as f2c, the difference being that f2c wasn't
specifically designed to convert Fortran 77 into incomprehensible C, it
just sort of happened.
I have seen such long-string JS crapola, rarely, but it's not being
presented (ie to the public or to the boss).
Neither is the output of the uglify processing; it is
being presented almost (if not in fact actually) nobody
other than browsers or other such automated consumers.
People need readable source code. Machines only need
correctly parseable source code.
You likely think Debian handles the desktop well.
Now there's a completely insane leap from one topic to a
different one on a different planet in a different
galaxy...
Post by STALKING_TARGET_77
Cinnamon is clearly my second favorite DE and the only
one I recommend to

Tried it. Not my cup of tea. I like KDE. You like
Cinnamon? Cool. Isn't it nice to have choices?
Ann Glaser
2021-04-12 10:46:50 UTC
Permalink
Post by Kelsey Bjarnason
[snips]
Post by DFS
Post by rbowman
Post by DFS
Post by F Russell
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.
Only a loser would actually try to present code as one string.
It's very popular in the JavaScript world...
https://www.keycdn.com/support/uglifyjs
The output is as illegible as f2c, the difference being that f2c wasn't
specifically designed to convert Fortran 77 into incomprehensible C, it
just sort of happened.
I have seen such long-string JS crapola, rarely, but it's not being
presented (ie to the public or to the boss).
Neither is the output of the uglify processing; it is
being presented almost (if not in fact actually) nobody
other than browsers or other such automated consumers.
People need readable source code. Machines only need
correctly parseable source code.
Keep in mind your accusation is based on you not understanding context.
Your game:

* Snit spoke of Dustin Cook having Carroll's flood bot code .
* Dustin Cook does not have Carroll's flood bot code.

Then you insist I lied. But you leave out the context.

1) Snit spoke of Carroll's flood bot code, and what can be known without
the code
2) Dustin Cook responded by speaking of what he can know HAVING THE CODE.
3) Snit spoke of Dustin Cook having Carroll's flood bot code.
4) Dustin Cook does not have Carroll's flood bot code.

You start at step three and then insist that if one starts there it LOOKS
like you were unfairly accused.

In short: you prove yourself a functionally illiterate fraud again.

--
E-commerce Simplified

https://www.google.com/search?q=Steve+Petruzzellis%3A+racist+swine
Steve Petruzzellis the Racist Swine
Kelsey Bjarnason
2021-04-16 13:09:32 UTC
Permalink
[snips]

In article <23ab2bde-c3fc-41cb-acdc-
***@googlegroups.com>, ***@gmail.com
says...
Post by Ann Glaser
Post by Kelsey Bjarnason
[snips]
Post by DFS
Post by rbowman
Post by DFS
Post by F Russell
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.
Only a loser would actually try to present code as one string.
It's very popular in the JavaScript world...
https://www.keycdn.com/support/uglifyjs
The output is as illegible as f2c, the difference being that f2c wasn't
specifically designed to convert Fortran 77 into incomprehensible C, it
just sort of happened.
I have seen such long-string JS crapola, rarely, but it's not being
presented (ie to the public or to the boss).
Neither is the output of the uglify processing; it is
being presented almost (if not in fact actually) nobody
other than browsers or other such automated consumers.
People need readable source code. Machines only need
correctly parseable source code.
Keep in mind your accusation is based on you not understanding context.
My "game" was merely noting that something is not, in
fact, being "presented to" users.
DFS
2021-04-16 14:40:28 UTC
Permalink
Post by Kelsey Bjarnason
[snips]
In article <23ab2bde-c3fc-41cb-acdc-
says...
Post by Ann Glaser
Post by Kelsey Bjarnason
[snips]
Post by DFS
Post by rbowman
Post by DFS
Post by F Russell
Post by DFS
REAL MEN
write code as one LONG STRING that is uninterrupted by any of
the niceties listed above." - Feeb, coding style maven
So very, very true.
Only a loser would actually try to present code as one string.
It's very popular in the JavaScript world...
https://www.keycdn.com/support/uglifyjs
The output is as illegible as f2c, the difference being that f2c wasn't
specifically designed to convert Fortran 77 into incomprehensible C, it
just sort of happened.
I have seen such long-string JS crapola, rarely, but it's not being
presented (ie to the public or to the boss).
Neither is the output of the uglify processing; it is
being presented almost (if not in fact actually) nobody
other than browsers or other such automated consumers.
People need readable source code. Machines only need
correctly parseable source code.
Keep in mind your accusation is based on you not understanding context.
My "game" was merely noting that something is not, in
fact, being "presented to" users.
I know you have an unshakable belief in your superiority, but understand
the "frelwizzen" posts you're replying to are written by a bot.
Kelsey Bjarnason
2021-04-04 20:04:59 UTC
Permalink
[snips]
Post by DFS
2. Write a C program to list the .csv files in a folder,
When did C get directory open/read functionality?
DFS
2021-04-04 21:08:53 UTC
Permalink
Post by Kelsey Bjarnason
[snips]
Post by DFS
2. Write a C program to list the .csv files in a folder,
When did C get directory open/read functionality?
The C standard never did, as far as I know.

But dirent.h is your friend.
Kelsey Bjarnason
2021-04-12 06:53:55 UTC
Permalink
[snips]
Post by DFS
Post by Kelsey Bjarnason
[snips]
Post by DFS
2. Write a C program to list the .csv files in a folder,
When did C get directory open/read functionality?
The C standard never did, as far as I know.
But dirent.h is your friend.
Well, as long as dirent.h has been adopted by the latest
edition of the standard.

After all, the challenge was to write a *C* program to do
this; if the requisite header and library routines aren't
part of the standard, then it is not *possible* to write
the code in C.

Non-standard, non-portable code which is _mostly_ C, but
not entirely, sure. But that wasn't the challenge.

So when did C get the directory open/read functionality
necessary to make the challenge even possible to meet?

Oh, right, never.

Whoever the challenger here is, they should probably stick
to GW-BASIC; C is apparently beyond their understanding.
Stephen Petruzzellis - frelwizzer 8790
2021-04-12 08:54:08 UTC
Permalink
Post by Kelsey Bjarnason
[snips]
Post by DFS
Post by Kelsey Bjarnason
[snips]
Post by DFS
2. Write a C program to list the .csv files in a folder,
When did C get directory open/read functionality?
The C standard never did, as far as I know.
But dirent.h is your friend.
Well, as long as dirent.h has been adopted by the latest
edition of the standard.
After all, the challenge was to write a *C* program to do
this; if the requisite header and library routines aren't
part of the standard, then it is not *possible* to write
the code in C.
Non-standard, non-portable code which is _mostly_ C, but
not entirely, sure. But that wasn't the challenge.
So when did C get the directory open/read functionality
necessary to make the challenge even possible to meet?
Oh, right, never.
Whoever the challenger here is, they should probably stick
to GW-BASIC; C is apparently beyond their understanding.
The most obvious answer: ronB's consumed brightly colored pills since then,
and 'forgot'.

Gregory Hall can create a virtual machine. Makes ronB cry because he can
not. ronB's posts are nothing but a valueless word salad.

--
Puppy Videos!!

https://gibiru.com/results.html?q=Dustin+Cook+%22functional+illiterate+fraud%22
https://gibiru.com/results.html?q=%22racist%20swine%22
Dustin Cook the functional illiterate fraud
DFS
2021-04-12 12:13:58 UTC
Permalink
Post by Kelsey Bjarnason
[snips]
Post by DFS
Post by Kelsey Bjarnason
[snips]
Post by DFS
2. Write a C program to list the .csv files in a folder,
When did C get directory open/read functionality?
The C standard never did, as far as I know.
But dirent.h is your friend.
Well, as long as dirent.h has been adopted by the latest
edition of the standard.
After all, the challenge was to write a *C* program to do
this; if the requisite header and library routines aren't
part of the standard, then it is not *possible* to write
the code in C.
Non-standard, non-portable code which is _mostly_ C, but
not entirely, sure. But that wasn't the challenge.
The GuhNoo C Compiler doesn't complain. Its authority far supercedes
that of any cola whiner's.

Ever put an aftermarket part on your car? Then you can no longer refer
to it as a Ford or a Chevy; now you have to say "It's a mostly-Ford."

Is that the game you want to play here? Even the ultimate cola clown
Feeb Russell doesn't play that game.
Post by Kelsey Bjarnason
So when did C get the directory open/read functionality
necessary to make the challenge even possible to meet?
Oh, right, never.
Whoever the challenger here is, they should probably stick
to GW-BASIC; C is apparently beyond their understanding.
If you can't handle the [useful] challenge, just say so, then skedaddle.
Otherwise throw down some C code.
Stefen Carroll
2021-04-12 12:23:31 UTC
Permalink
Post by Kelsey Bjarnason
[snips]
Post by DFS
Post by Kelsey Bjarnason
[snips]
Post by DFS
2. Write a C program to list the .csv files in a folder,
When did C get directory open/read functionality?
The C standard never did, as far as I know.
But dirent.h is your friend.
Well, as long as dirent.h has been adopted by the latest
edition of the standard.
After all, the challenge was to write a *C* program to do
this; if the requisite header and library routines aren't
part of the standard, then it is not *possible* to write
the code in C.
Non-standard, non-portable code which is _mostly_ C, but
not entirely, sure. But that wasn't the challenge.
The GuhNoo C Compiler doesn't complain. Its authority far supercedes
that of any cola whiner's.
Ever put an aftermarket part on your car? Then you can no longer refer
to it as a Ford or a Chevy; now you have to say "It's a mostly-Ford."
Is that the game you want to play here? Even the ultimate cola clown
Feeb Russell doesn't play that game.
Post by Kelsey Bjarnason
So when did C get the directory open/read functionality
necessary to make the challenge even possible to meet?
Oh, right, never.
Whoever the challenger here is, they should probably stick
to GW-BASIC; C is apparently beyond their understanding.
If you can't handle the [useful] challenge, just say so, then skedaddle.
Otherwise throw down some C code.
vallor failed to show a case study of a prosperous corporation that has
built its fortune by not giving a shit about its clients and merchandise.

Snit and vallor had their successes and their humiliations. One played
it as supernatural and didn't do anything too outrageous that could not
be obfuscated with a larger scandal. Why would Snit need socks? He is the
one who offers facts for his side of the "debates". Until vallor offers
up his 'preferable' macOS application for testing, there is no challenge,
just wild assertions. vallor is trying ("very, very" hard) to project their
MO onto Snit. For over a decade vallor has pressed the idea that Snit needs
'witnesses' to point out all his forgeries. The fact is that nobody needs
any evidence to do that. So vallor pulls this outrageous flooding poppycock
in a feeble attempt to 'peddle' the idea that Snit is like he is.


--
Top 15 Ways vallor Trolls

https://www.reddit.com/r/linux/comments/6sfkup/what_desktop_tasks_does_linux_handle_better_than
Steve Carroll the Racist Swine
Kelsey Bjarnason
2021-04-13 18:31:09 UTC
Permalink
[snips]

In article <eQWcI.32157$***@fx24.iad>, ***@dfs.com
says...
Post by DFS
Post by Kelsey Bjarnason
[snips]
Post by DFS
Post by Kelsey Bjarnason
[snips]
Post by DFS
2. Write a C program to list the .csv files in a folder,
When did C get directory open/read functionality?
The C standard never did, as far as I know.
But dirent.h is your friend.
Well, as long as dirent.h has been adopted by the latest
edition of the standard.
After all, the challenge was to write a *C* program to do
this; if the requisite header and library routines aren't
part of the standard, then it is not *possible* to write
the code in C.
Non-standard, non-portable code which is _mostly_ C, but
not entirely, sure. But that wasn't the challenge.
The GuhNoo C Compiler doesn't complain. Its authority far supercedes
that of any cola whiner's.
Ever put an aftermarket part on your car? Then you can no longer refer
to it as a Ford or a Chevy; now you have to say "It's a mostly-Ford."
Is that the game you want to play here? Even the ultimate cola clown
Feeb Russell doesn't play that game.
Post by Kelsey Bjarnason
So when did C get the directory open/read functionality
necessary to make the challenge even possible to meet?
Oh, right, never.
Whoever the challenger here is, they should probably stick
to GW-BASIC; C is apparently beyond their understanding.
If you can't handle the [useful] challenge, just say so, then skedaddle.
Otherwise throw down some C code.
The challenge is not possible to achieve, as it was
written, for reasons explained.

And now the idiot thinks that GCC defines what is "C".

As I said, the moron should stick to GW-BASIC: C is vastly
too demanding for his little pea brain.

Now if the moron would pose a challenge which *was*
possible to achieve in C, that would be a different
matter. But instead he's defending an impossible
challenge.

The man is a yogurt.
F Russell
2021-04-13 21:13:31 UTC
Permalink
Post by Kelsey Bjarnason
that GCC defines what is "C".
Yes, I would say that it does.

Any competent and progressive C programmer will use the GNU/Linux
tool chain and that is headed by GCC.

What else is there?

Intel offers ICC but that is proprietary. Open-source programmers
have to beg for a license so Intel can go and fuck itself.

Then there is LLVM, but only pea-brained faggots would desire LLVM.

Then there is Microshit -- whoa Nelly! -- Microshit is for deranged
assholes only!

GCC, begat by the great Richard M. Stallman, defines the C language
today.

ALL of my fantastic C programs are prefaced by:

#define _GNU_SOURCE

The case is closed.
--
Systemd free. D.E. free.

Always and forever.
FR
2021-04-16 13:33:55 UTC
Permalink
Post by F Russell
Post by Kelsey Bjarnason
that GCC defines what is "C".
Yes, I would say that it does.
So we can toss ANSI/ISO standards, you know, the ones
which define the language.
Standards change.

Indeed, many GNU features were incorporated into the ANSI/ISO C
standard.

Any C programmer who does not use GNU GCC is an idiot.
Stéphane CARPENTIER
2021-04-17 15:34:10 UTC
Permalink
Post by FR
Standards change.
I'm surprise to see you admitting that without complaining.
--
Si vous avez du temps à perdre :
https://scarpet42.gitlab.io
DFS
2021-04-13 23:23:06 UTC
Permalink
Post by Kelsey Bjarnason
The challenge is not possible to achieve, as it was
written, for reasons explained.
You're fired for being useless. Go stand in the corner with Feeb - he's
useless too.
Kelsey Bjarnason
2021-04-16 13:05:52 UTC
Permalink
[snips]

In article <KLpdI.14132$***@fx02.iad>, ***@dfs.com
says...
Post by DFS
Post by Kelsey Bjarnason
The challenge is not possible to achieve, as it was
written, for reasons explained.
You're fired for being useless.
My decades long career as a programmer, almost exclusively
in C, would disagree.

Have you ever thought of actually learning something?

You probably think void main() is legitimate C code.

Snort.
rbowman
2021-04-16 13:53:04 UTC
Permalink
Post by Kelsey Bjarnason
[snips]
says...
Post by DFS
Post by Kelsey Bjarnason
The challenge is not possible to achieve, as it was
written, for reasons explained.
You're fired for being useless.
My decades long career as a programmer, almost exclusively
in C, would disagree.
Have you ever thought of actually learning something?
You probably think void main() is legitimate C code.
Herb Schildt said it was perfectly fine...
DFS
2021-04-16 15:45:20 UTC
Permalink
Post by Kelsey Bjarnason
[snips]
says...
Post by DFS
Post by Kelsey Bjarnason
The challenge is not possible to achieve, as it was
written, for reasons explained.
You're fired for being useless.
My decades long career as a programmer, almost exclusively
in C, would disagree.
Did you tell your boss you're a C programmer, and directories can't be
read with C, so his request is denied?
Post by Kelsey Bjarnason
Have you ever thought of actually learning something?
You probably think void main() is legitimate C code.
Snort.
I've used it a few times and had no problem. I've used int main(void)
more often.

Plain old
main() {}
works well, too.
FR
2021-04-16 15:56:14 UTC
Permalink
Post by DFS
Plain old
main() {}
works well, too.
Any competent compiler, such as GNU GCC, will issue a warning.

Would you care to explain why?

What does the return value signify?

Here come those crickets again.

Ha, ha, ha, ha, ha, ha, ha, ha, ha!
DFS
2021-04-16 16:15:00 UTC
Permalink
Post by FR
Post by DFS
Plain old
main() {}
works well, too.
Any competent compiler, such as GNU GCC, will issue a warning.
It was tiny code so I may not have included -Wall.
Post by FR
Would you care to explain why?
main is a function, and functions are expected to return a value.
Post by FR
What does the return value signify?
success (me) or failure (you)
Post by FR
Here come those crickets again.
Ha, ha, ha, ha, ha, ha, ha, ha, ha!
Stéphane CARPENTIER
2021-04-17 15:32:57 UTC
Permalink
Post by DFS
Post by Kelsey Bjarnason
Non-standard, non-portable code which is _mostly_ C, but
not entirely, sure. But that wasn't the challenge.
The GuhNoo C Compiler doesn't complain. Its authority far supercedes
that of any cola whiner's.
You have to admit he's got some point here. If you can call any library,
you could program something in any language to do the all challenge and
then call it from a C program which would be only a wrapper around your
"library".
--
Si vous avez du temps à perdre :
https://scarpet42.gitlab.io
DFS
2021-04-17 16:12:06 UTC
Permalink
Post by Stéphane CARPENTIER
Post by DFS
Post by Kelsey Bjarnason
Non-standard, non-portable code which is _mostly_ C, but
not entirely, sure. But that wasn't the challenge.
The GuhNoo C Compiler doesn't complain. Its authority far supercedes
that of any cola whiner's.
You have to admit he's got some point here.
It's a ridiculous "point". Bjarnason is a stick-up-ass pedant.

So what if some library or header isn't in the standard? It's still C
code used to call it.

=====================================================================
listcsv.c
=====================================================================

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <unistd.h>
#include <ctype.h>


void printline(int w, char *c) {for(int i=0;i<w;i++) {printf(c);}
printf("\n");}
int countchr(char *str, char chr){int c=0,cnt=0;while(str[c]!='\0')
{if(str[c]==chr){cnt++;}c++;}return cnt;}
char *rtrim(char *str){int len = strlen(str);while(len>0 &&
(isspace(str[len-1]))){len--;}str[len] = '\0';return str;}

int main(void)
{
int csvcnt=0;
char line[1024] = "";
FILE *fin;
char *ext="";
char cwd[255]; //current working directory
getcwd(cwd, sizeof(cwd));

printline(120,"-");
printf("%s\n",cwd);
printline(120,"-");
printf(" # | .csv files | Lines | Fields | Field List
(first line of file)\n");
printline(120,"-");

struct dirent **dir;
int csvfiles = scandir(cwd, &dir, NULL, alphasort);
for(int i=0;i<csvfiles;i++)
{
ext = strrchr(dir[i]->d_name, '.');
if(ext != NULL)
{
if(strcmp(ext,".csv")==0)
{
int linesf = 0;
char fieldlist[200];
fin = fopen(dir[i]->d_name,"r");
fgets(line, sizeof line, fin);
int fields = countchr(line,',') + 1;
strcpy(fieldlist, rtrim(line));
while (fgets(line, sizeof line, fin)!= NULL) {linesf++;}
fclose(fin);
char *filenm = dir[i]->d_name;
filenm[strlen(filenm)-4] = '\0';
printf(" %2d | %-20s | %8d | %6d | %s\n", ++csvcnt, filenm,
linesf, fields, fieldlist);
}
}
free(dir[i]);
}
free(dir);
if(csvcnt==0) {printf("No .csv files found\n");}
printline(120,"-");
}

=====================================================================
Post by Stéphane CARPENTIER
If you can call any library, you could program something in
any language to do the all challenge and then call it from
a C program which would be only a wrapper around your "library".
Yep. 10 lines of C wrapper, and 1000 lines of asm library, and the C
calling program is considered to be the language the program was written
in. It's so unfair.

Loading...