public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
To: "馬 冰" <bingmatv@outlook.com>,
	"Adhemerval Zanella" <adhemerval.zanella@linaro.org>
Cc: "rms@gnu.org" <rms@gnu.org>,
	"libc-help@sourceware.org" <libc-help@sourceware.org>,
	"help-bash@gnu.org" <help-bash@gnu.org>
Subject: Re: Richard M. Stallman says GNU/Linux, but Rust lang ecosystem is growing.
Date: Sun, 07 Apr 2024 10:45:23 +0300	[thread overview]
Message-ID: <6638e6b32ae3c4710fec18831d0e5ec84a99d1e0.camel@yandex.ru> (raw)
In-Reply-To: <MW3PR22MB2284656FD1BCC5F2BEC691D2D0012@MW3PR22MB2284.namprd22.prod.outlook.com>

On Sun, 2024-04-07 at 07:27 +0000, 馬 冰 via Libc-help wrote:
> Rust already allows main function returning Result<T, E>, e.g. fn
> main() -> Result<(), std::io::Error>{Ok(())}, so I think the
> operating system should accept Result<T, E> instead of int, i.e.,
> value returned from int main(){}. 

Nothing needs to be modified. AFAIU `main()` in Rust "returns" a Result
simply to facilitate using "question mark operator" inside `main`. But
it's just an adapter from internal API to one operating on `int`s, i.e.
`Ok()` will be converted to `0`, and an error will be converted to
another number. Current API is fine (and as a side note, the "question
mark operator" unfortunately doesn't exist in most languages. Offhand
Haskell have similar feature, Idk of any other langs).

> How to write patches for LLM? What's LLM?

LLM is a "large language model". The author was referring to the email
possibly being written by an artificial neural network. Although Idk
what's the ponit, but then again the OP didn't reply to this point, so
there may be something to that hypothesis.

  reply	other threads:[~2024-04-07  7:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-31 12:43 bingmatv
2024-03-31 14:04 ` Adhemerval Zanella
2024-03-31 14:50   ` tomas
2024-04-02  1:44     ` Dennis Clarke
2024-04-07  7:27   ` 馬 冰
2024-04-07  7:45     ` Konstantin Kharlamov [this message]
2024-04-11 12:05       ` 馬 冰
2024-04-11 12:12         ` Konstantin Kharlamov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6638e6b32ae3c4710fec18831d0e5ec84a99d1e0.camel@yandex.ru \
    --to=hi-angel@yandex.ru \
    --cc=adhemerval.zanella@linaro.org \
    --cc=bingmatv@outlook.com \
    --cc=help-bash@gnu.org \
    --cc=libc-help@sourceware.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).