Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Must I hold a candle to my shames? -- William Shakespeare, "The Merchant of Venice"


comp / comp.os.linux.advocacy / Tough asm challenge for "REAL MAN PROGRAMMER" Feeb

SubjectAuthor
* Tough asm challenge for "REAL MAN PROGRAMMER" FeebDFS
`* Re: Tough asm challenge for "REAL MAN PROGRAMMER" Feebvallor
 `* Re: Tough asm challenge for "REAL MAN PROGRAMMER" FeebDFS
  +- Re: Tough asm challenge for "REAL MAN PROGRAMMER" FeebDFS
  `* Re: Tough asm challenge for "REAL MAN PROGRAMMER" Feebvallor
   `- Re: Tough asm challenge for "REAL MAN PROGRAMMER" FeebDFS

1
Subject: Tough asm challenge for "REAL MAN PROGRAMMER" Feeb
From: DFS
Newsgroups: comp.os.linux.advocacy
Organization: A noiseless patient Spider
Date: Wed, 16 Oct 2024 16:48 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@dfs.com (DFS)
Newsgroups: comp.os.linux.advocacy
Subject: Tough asm challenge for "REAL MAN PROGRAMMER" Feeb
Date: Wed, 16 Oct 2024 12:48:35 -0400
Organization: A noiseless patient Spider
Lines: 55
Message-ID: <veoqp3$2a45g$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 16 Oct 2024 18:48:35 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="a97318da1a9567331d205b22340f70b7";
logging-data="2429104"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19sR101xBi5zxOT4QBsOJZa"
User-Agent: Betterbird (Windows)
Cancel-Lock: sha1:7A8C95njUOaj6bUHiB41fMzRjeY=
Content-Language: en-US
View all headers

This challenge should be right up your alley, given your claims:

-------------------------------------------------------------------
_I_ am a REAL MAN PROGRAMMER

C programmer extraordinaire

Assembly language genius

I am a FOSS person. I can do anything and everything and I can
do it all extremely well.
-------------------------------------------------------------------

Challenge:
Use nasm to deliver the assembly for the smallest possible working Linux
ELF x86 executable that does what this C program does:

int main(void) { return 61; }

That's it. Return 61 to the OS. That's the whole challenge.

It goes without saying you can't plagiarize from the Internet or
anywhere else (which is where your fraudulent mind went first of course).

If you do it right, your solution should be approx 1/50th the size of
the smallest tcc (not bloated gcc) executable you could create with the
C code.

------------------------------------
$ dir
tiny.c

$ cat tiny.c
int main(void) { return 61; }

$ tcc -v
tcc version 0.9.27 (x86_64 Linux)

$ tcc -Wall tiny.c -o t.out

$ dir
t.out tiny.c

$ ./t.out; echo $?
61

$ nm t.out
nm: t.out: no symbols

$ wc -c t.out
2736 t.out
------------------------------------

I can't hear the crickets yet... but I know they're coming soon.

Subject: Re: Tough asm challenge for "REAL MAN PROGRAMMER" Feeb
From: vallor
Newsgroups: comp.os.linux.advocacy
Date: Wed, 16 Oct 2024 17:52 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: vallor@cultnix.org (vallor)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tough asm challenge for "REAL MAN PROGRAMMER" Feeb
Date: 16 Oct 2024 17:52:51 GMT
Lines: 73
Message-ID: <lnacrjFt8jeU2@mid.individual.net>
References: <veoqp3$2a45g$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net Pa6+65x6ickGy3e59RxRNAcr9NFT4eOQTQ66/4Q9qCsW8Pw4y1
Cancel-Lock: sha1:j19NYp6QkkDTG239A7cfLDBP8+Q= sha256:mVXy2XPrMMtuXHUI0dRPQxnYdryXQknEE1XIuCkpXy0=
X-Face: +McU)#<-H?9lTb(Th!zR`EpVrp<0)1p5CmPu.kOscy8LRp_\u`:tW;dxPo./(fCl
CaKku`)]}.V/"6rISCIDP`
User-Agent: Pan/0.160 (Hmmm; fa1e6970; Linux-6.11.3)
View all headers

On Wed, 16 Oct 2024 12:48:35 -0400, DFS <nospam@dfs.com> wrote in
<veoqp3$2a45g$1@dont-email.me>:

> This challenge should be right up your alley, given your claims:
>
> -------------------------------------------------------------------
> _I_ am a REAL MAN PROGRAMMER
>
> C programmer extraordinaire
>
> Assembly language genius
>
> I am a FOSS person. I can do anything and everything and I can do it
> all extremely well.
> -------------------------------------------------------------------
>
> Challenge:
> Use nasm to deliver the assembly for the smallest possible working Linux
> ELF x86 executable that does what this C program does:
>
> int main(void) { return 61; }
>
> That's it. Return 61 to the OS. That's the whole challenge.
>
> It goes without saying you can't plagiarize from the Internet or
> anywhere else (which is where your fraudulent mind went first of
> course).
>
> If you do it right, your solution should be approx 1/50th the size of
> the smallest tcc (not bloated gcc) executable you could create with the
> C code.
>
> ------------------------------------
> $ dir tiny.c
>
> $ cat tiny.c int main(void) { return 61; }
>
> $ tcc -v tcc version 0.9.27 (x86_64 Linux)
>
> $ tcc -Wall tiny.c -o t.out
>
> $ dir t.out tiny.c
>
> $ ./t.out; echo $?
> 61
>
> $ nm t.out nm: t.out: no symbols
>
> $ wc -c t.out 2736 t.out ------------------------------------
>
> I can't hear the crickets yet... but I know they're coming soon.

$ wc -c return_61
248 return_61

I had to look at some example programs to write the
asm file, then poured over the ld(1) documentation
for linker options.

I guess I'm not a "REAL MAN PROGRAMMER", can't figure out
how to get it any smaller.

However, THIS! IS! LINUX! So:

$ wc -c return_61
8 return_61
$ ./return_61 ; echo $?
61

--
-v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
OS: Linux 6.11.3 Release: Mint 21.3 Mem: 258G
"Are dog biscuits made from collie flour?"

Subject: Re: Tough asm challenge for "REAL MAN PROGRAMMER" Feeb
From: DFS
Newsgroups: comp.os.linux.advocacy
Organization: A noiseless patient Spider
Date: Wed, 16 Oct 2024 18:43 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@dfs.com (DFS)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tough asm challenge for "REAL MAN PROGRAMMER" Feeb
Date: Wed, 16 Oct 2024 14:43:22 -0400
Organization: A noiseless patient Spider
Lines: 91
Message-ID: <vep1g9$2bq2t$1@dont-email.me>
References: <veoqp3$2a45g$1@dont-email.me> <lnacrjFt8jeU2@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 16 Oct 2024 20:43:22 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="a97318da1a9567331d205b22340f70b7";
logging-data="2484317"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+4U+SijGYjGBCtg7WhuKQ1"
User-Agent: Betterbird (Windows)
Cancel-Lock: sha1:GEFSlNTbTEplqrvEIdJC2oQM7aQ=
Content-Language: en-US
In-Reply-To: <lnacrjFt8jeU2@mid.individual.net>
View all headers

On 10/16/2024 1:52 PM, vallor wrote:
> On Wed, 16 Oct 2024 12:48:35 -0400, DFS <nospam@dfs.com> wrote in
> <veoqp3$2a45g$1@dont-email.me>:
>
>> This challenge should be right up your alley, given your claims:
>>
>> -------------------------------------------------------------------
>> _I_ am a REAL MAN PROGRAMMER
>>
>> C programmer extraordinaire
>>
>> Assembly language genius
>>
>> I am a FOSS person. I can do anything and everything and I can do it
>> all extremely well.
>> -------------------------------------------------------------------
>>
>> Challenge:
>> Use nasm to deliver the assembly for the smallest possible working Linux
>> ELF x86 executable that does what this C program does:
>>
>> int main(void) { return 61; }
>>
>> That's it. Return 61 to the OS. That's the whole challenge.
>>
>> It goes without saying you can't plagiarize from the Internet or
>> anywhere else (which is where your fraudulent mind went first of
>> course).
>>
>> If you do it right, your solution should be approx 1/50th the size of
>> the smallest tcc (not bloated gcc) executable you could create with the
>> C code.
>>
>> ------------------------------------
>> $ dir tiny.c
>>
>> $ cat tiny.c int main(void) { return 61; }
>>
>> $ tcc -v tcc version 0.9.27 (x86_64 Linux)
>>
>> $ tcc -Wall tiny.c -o t.out
>>
>> $ dir t.out tiny.c
>>
>> $ ./t.out; echo $?
>> 61
>>
>> $ nm t.out nm: t.out: no symbols
>>
>> $ wc -c t.out 2736 t.out
>> ------------------------------------>>
>> I can't hear the crickets yet... but I know they're coming soon.

> $ wc -c return_61
> 248 return_61
> > I had to look at some example programs to write the
> asm file,

Whilst the Cola Committee for Coding Challenges (CCCC) appreciates your
efforts, we must inform you that your faux submission is rejected for
admittance of violation of the no-plagiarism directive.

> then poured over the ld(1) documentation
> for linker options.

pored

> I guess I'm not a "REAL MAN PROGRAMMER", can't figure out
> how to get it any smaller.

REAL MAN PROGRAMMERS can get it down to 45 bytes (seriously).

> However, THIS! IS! LINUX! So:
>
> $ wc -c return_61
> 8 return_61
> $ ./return_61 ; echo $?
> 61

From 248 to 8? huh?

Subject: Re: Tough asm challenge for "REAL MAN PROGRAMMER" Feeb
From: DFS
Newsgroups: comp.os.linux.advocacy
Organization: A noiseless patient Spider
Date: Wed, 16 Oct 2024 19:12 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@dfs.com (DFS)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tough asm challenge for "REAL MAN PROGRAMMER" Feeb
Date: Wed, 16 Oct 2024 15:12:44 -0400
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <vep37c$2c66d$1@dont-email.me>
References: <veoqp3$2a45g$1@dont-email.me> <lnacrjFt8jeU2@mid.individual.net>
<vep1g9$2bq2t$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 16 Oct 2024 21:12:44 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="a97318da1a9567331d205b22340f70b7";
logging-data="2496717"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wYaQoztU4ouzGUPnWL7x6"
User-Agent: Betterbird (Windows)
Cancel-Lock: sha1:rswZHiDRm2TJSyZPP1ufYE5aAFE=
In-Reply-To: <vep1g9$2bq2t$1@dont-email.me>
Content-Language: en-US
View all headers

On 10/16/2024 2:43 PM, DFS wrote:

> your faux submission

You likely provided no .asm code in an effort to thwart Feeb's
plagiaristic tendencies.

So I thank you.

Subject: Re: Tough asm challenge for "REAL MAN PROGRAMMER" Feeb
From: vallor
Newsgroups: comp.os.linux.advocacy
Date: Wed, 16 Oct 2024 22:13 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: vallor@cultnix.org (vallor)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tough asm challenge for "REAL MAN PROGRAMMER" Feeb
Date: 16 Oct 2024 22:13:34 GMT
Lines: 111
Message-ID: <lnas4eFt8jeU6@mid.individual.net>
References: <veoqp3$2a45g$1@dont-email.me> <lnacrjFt8jeU2@mid.individual.net>
<vep1g9$2bq2t$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net iVufZ48jm6D9W0Touqeu6QA4coib3Agt/UZrKSJzsNFGU4vyhr
Cancel-Lock: sha1:D95/5NQ2FhT0ADIO+hcil4r4DuI= sha256:ewnEuWaAZzhEKz75y0DHIJEFuLlgI+vo+KzDl7P7ohw=
X-Face: +McU)#<-H?9lTb(Th!zR`EpVrp<0)1p5CmPu.kOscy8LRp_\u`:tW;dxPo./(fCl
CaKku`)]}.V/"6rISCIDP`
User-Agent: Pan/0.160 (Hmmm; fa1e6970; Linux-6.11.3)
View all headers

On Wed, 16 Oct 2024 14:43:22 -0400, DFS <nospam@dfs.com> wrote in
<vep1g9$2bq2t$1@dont-email.me>:

> On 10/16/2024 1:52 PM, vallor wrote:
>> On Wed, 16 Oct 2024 12:48:35 -0400, DFS <nospam@dfs.com> wrote in
>> <veoqp3$2a45g$1@dont-email.me>:
>>
>>> This challenge should be right up your alley, given your claims:
>>>
>>> -------------------------------------------------------------------
>>> _I_ am a REAL MAN PROGRAMMER
>>>
>>> C programmer extraordinaire
>>>
>>> Assembly language genius
>>>
>>> I am a FOSS person. I can do anything and everything and I can do it
>>> all extremely well.
>>> -------------------------------------------------------------------
>>>
>>> Challenge:
>>> Use nasm to deliver the assembly for the smallest possible working
>>> Linux ELF x86 executable that does what this C program does:
>>>
>>> int main(void) { return 61; }
>>>
>>> That's it. Return 61 to the OS. That's the whole challenge.
>>>
>>> It goes without saying you can't plagiarize from the Internet or
>>> anywhere else (which is where your fraudulent mind went first of
>>> course).
>>>
>>> If you do it right, your solution should be approx 1/50th the size of
>>> the smallest tcc (not bloated gcc) executable you could create with
>>> the C code.
>>>
>>> ------------------------------------
>>> $ dir tiny.c
>>>
>>> $ cat tiny.c int main(void) { return 61; }
>>>
>>> $ tcc -v tcc version 0.9.27 (x86_64 Linux)
>>>
>>> $ tcc -Wall tiny.c -o t.out
>>>
>>> $ dir t.out tiny.c
>>>
>>> $ ./t.out; echo $?
>>> 61
>>>
>>> $ nm t.out nm: t.out: no symbols
>>>
> >> $ wc -c t.out 2736 t.out ------------------------------------>>
>>> I can't hear the crickets yet... but I know they're coming soon.
>
>
>
>> $ wc -c return_61
> > 248 return_61
> > > I had to look at some example programs to write the
>> asm file,
>
>
> Whilst the Cola Committee for Coding Challenges (CCCC) appreciates your
> efforts, we must inform you that your faux submission is rejected for
> admittance of violation of the no-plagiarism directive.

I didn't plagiarize.

I learned how to terminate a program in Linux.

I also examined the 32-bit syscall table, intending to
write a "hello world" that didn't contain that string...then
decided it wasn't worth the bother.

But since you have been rude:

>
>
>
>> then poured over the ld(1) documentation for linker options.
>
> pored

(I stand corrected)...

>
>
>> I guess I'm not a "REAL MAN PROGRAMMER", can't figure out how to get it
>> any smaller.
>
> REAL MAN PROGRAMMERS can get it down to 45 bytes (seriously).
>
>
>> However, THIS! IS! LINUX! So:
>>
>> $ wc -c return_61 8 return_61 $ ./return_61 ; echo $?
>> 61
>
> From 248 to 8? huh?

Refer to Figure 1.1 in the following manual for a hint.

https://notes.shichao.io/apue/ch1/

And...Sigmonster got my back!

--
-v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
OS: Linux 6.11.3 Release: Mint 21.3 Mem: 258G
"I didn't cheat, I just changed the Rules!"

Subject: Re: Tough asm challenge for "REAL MAN PROGRAMMER" Feeb
From: DFS
Newsgroups: comp.os.linux.advocacy
Organization: A noiseless patient Spider
Date: Wed, 16 Oct 2024 22:34 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@dfs.com (DFS)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tough asm challenge for "REAL MAN PROGRAMMER" Feeb
Date: Wed, 16 Oct 2024 18:34:52 -0400
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <vepf2b$2e1cq$1@dont-email.me>
References: <veoqp3$2a45g$1@dont-email.me> <lnacrjFt8jeU2@mid.individual.net>
<vep1g9$2bq2t$1@dont-email.me> <lnas4eFt8jeU6@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 17 Oct 2024 00:34:52 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="13a13f0b8d05b90060cc6a3ab72fa9ef";
logging-data="2557338"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Oietew91mcP+NalVSRjUF"
User-Agent: Betterbird (Windows)
Cancel-Lock: sha1:/97GPgm+HCJEnQ2va5iUIhAzoq4=
Content-Language: en-US
In-Reply-To: <lnas4eFt8jeU6@mid.individual.net>
View all headers

On 10/16/2024 6:13 PM, vallor wrote:

> But since you have been rude:

Today or in general?

1

rocksolid light 0.9.8
clearnet tor