Bill Allombert on Sat, 09 Sep 2023 20:47:52 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Manually transpile Python code to GP: what about class / __name__ ?
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: Manually transpile Python code to GP: what about class / __name__ ?
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Sat, 9 Sep 2023 20:43:05 +0200
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1694284980; c=relaxed/relaxed; bh=G/CllxF/7249FcJUX/XmMfIwbZAMrgA//mXDojk7va4=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; b=maK3mgbtbimbff0npQRHluVU3RZ13/4wmxBzS+/5ggw8Bn/mx8ZCh1x0OwJuKv3p5DUD81CglfkFOpjqZyjZkaYh3tmM6Zl9r9L6QQPEIjgbzhm4GRdaOapq6Fxbwg8WiKOGCPiC9hP3scvztk/Mlk71N+lidTs2VWXwp3YI1ThJCR439V9tIeq+ph2lgkyPlbK/ZrBkcFbdgr7TSf1MLzet9p0zS59JBR2500ajOGt9+a+VcqNQS4/hk96kjF96DCAObHVgtcKBx5zHs0YUXPX2kH5j63/IJuv/6YkvkLkXulFHbxQ0lT3RJUD23Yj/Brm3ettrd3sh6C6VZ49UGmOwjKaHikyBd7T4lbE8gsZYSbFmOgmUltZ6tpMFi18pCR3SIAB1ZnWQ5udZWnJH79R9/ktEfw5nZ1Q2XBny0wMgf+0mdckNNHYgU/vYikmb0//S/NFnYx9mPrIDyYm2eRddKU0mCnSvijQeOZJ/GB/5SyYLOHDolf5HSX/b+tLoln7vykARG5F42B7fdyx/g99wARo0+DL0EtRMt50ipidR9bToSdICJWzn5ws5rf3/dIco8/zWQOJj9E0kB8cIf21CkrNA0xXg9g82lUaho78s0wTTTSRCV48sGruPA8yp1QnqMURAk/CTimwPwSTgqCKu4ODeGg6ulrjHFH17vII=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1694284980; cv=none; b=l0+PBXgPeR47SMEAiQ46Q6q63usa3umgXPdLLwWwKBTciPZXOPn8/DpSoGlh2qxFy3XUe3EqbjKFrbpe2LAGq/mQ6Ty7mV3VGkOLOKrSHXR2qnx+d1a71VIMwEAAi9q03Bf7eYNdHeBK1cS8DQaZ0287gPG2HF/ltrH8H4xqQX0bVYUK53WtQYpWYYf+kqa0cdoGU4Q167oC67JMHRcgAoMbr7mmVHprbMRvCJpvQseegKjsWJxyhddjlywkGLU4cZ7Nu1ZEdkk11GtuOC1vO+4zlLjB2vb6oP5jh0Frv5ZzAxv9oHPJ8+3vwYcI1cAsZVrMNr6X4qOrMS8tIKS1ooHeOigEtsNaq8DuRPLaIwn74FBbotGwnAOpnGfKRXvQTMBcAmmNzbVPLw0NLfp03NUjq33mlkHElI6ajQ7+cyxiwjlhnPkG7gGdvxqIGQjuksGceJ3PTVD2Tse99l51//WREezvPQOiMfsrLaB9k2rYGpKxvbsrBlKIgWycaXiNOVPG4u9MKEVoEBHPbDw+cMQAXB2aIKwoh2ylmnUCFJSGhPUi1j7JWcwZXT5N/BcqfTqHwDJ2lwR9fq1TpMWgOURji9lm1yYqZbrrSJ7sPh5kiEJ5GYo4ahdYJW151anuxfSQ5/nLuicut+29NG7Smd3jgzvxQdShUlvfgVpBuc8=
- Authentication-results: smail; dmarc=none header.from=math.u-bordeaux.fr
- Authentication-results: smail; arc=none
- Delivery-date: Sat, 09 Sep 2023 20:47:52 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1694284980; bh=G/CllxF/7249FcJUX/XmMfIwbZAMrgA//mXDojk7va4=; h=Date:From:To:Subject:References:In-Reply-To:From; b=XRWEV8tPoEQVqMzL/x4KqdM2GirJlD6oDy5pLiDGhpNeqdB8JgXLA51nwIwpkrfDt R3/jumJSls5xtWeDafTFY60AvQHHVO5boFaLvq997vmqeQ2EjM6XsiSjoIATuu9/9a +JHKc8nnd23lH7SrWz+w9kSDJm/jgxlUWNq3EsKqa4n+53qMed+n/N+g6133Kn0gkQ SF+P5deBk0sK42K6xkHsCAC9iVT8r0TNMi1JPRwEU57J2SxAdisMmpwHrpShgkFEuv 2YrnNHa8catWk8IpGqunKPQJM6DfG5J7oXftGtoISuF1WNKuQGCQahutuyiecNg3n/ cvg1dAfOKVXskF72xbMfwLeT+jKBviayngxJ2Zriq/eTwL26vCRaeox3S+Crks4gev jevODD6MLTWJWZyNb0ppbwdTOtKjgwNfZGSoOjdmUCJUvFKKhvI6J/Vy2P7zKyUtob vFnPjlMwL7fx1S0lseIuCVvAGQiecI3wLCvC2xnMGX2Dn3PgcQ4TkiQBRE0SsBh0bJ cqw6zB8Q1ouyESoBEME8V/sCL+COSC60O/drRsjlKjI6pehFnHkCSruCU8ZpUCvIF+ h0R8ifUccmTELC9nhrenSDSd/LqrVpZfojN4b1SIVkRXjUf8+TPORAUWiYjdnOhg8F qoIXXHW+HJzKwAHV6n3nqA3Q=
- In-reply-to: <ec226c878c74a0444c9f63a4353b8eae@stamm-wilbrandt.de>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <ec226c878c74a0444c9f63a4353b8eae@stamm-wilbrandt.de>
On Sat, Sep 09, 2023 at 04:04:29PM +0200, hermann@stamm-wilbrandt.de wrote:
> 490 digits,500 digits,617 digits,2048 bits (=617 digits)
>
> validate(rsa): ✓
> ?
>
>
> What remains is transpilation of Python class RSA.
> Is there a "class" concept in GP?
No, GP is not object-oriented at all. It has some minimal functional-programming features
(anonymous functions and closure).
> It seems so, as "." is not a normal name character:
You know, there is a GP manual you could read...
> Even an init() can be simulated:
>
> ? c(y)={c.y=y;};
> ? c(5);
> ? c.y
> 5
Does not work.
? c(y)={c.y=y;};
? c(5);
? c.y
%3 = 5
? d.y
%4 = 5
? Pi.y
%5 = 5
? 123.y
%6 = 5
(this defines the function _.y to be constant to 5).
Cheers,
Bill.