From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15340 invoked by alias); 4 Mar 2018 07:26:25 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 15322 invoked by uid 89); 4 Mar 2018 07:26:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=UD:p.m, H*c:alternative, pictures, UD:I X-HELO: mail-wm0-f48.google.com Received: from mail-wm0-f48.google.com (HELO mail-wm0-f48.google.com) (74.125.82.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 04 Mar 2018 07:26:22 +0000 Received: by mail-wm0-f48.google.com with SMTP id 188so9900703wme.1 for ; Sat, 03 Mar 2018 23:26:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nyjYRGYFzy4XKA9P2lxGgp+9su4YNbk129j7BUB+YDI=; b=sTXp7a2REg/pFktogLV9OfEniEW2KB5A1QOHC7gjtx70rzB8D86717Cn22QH4N3YaE PgjFsJbRJ3ah32wyRcGL6YCHTXQAFCQNTinyT60ZrWwhAEFMpL/XQ5yNld0VOLiaeCbo 5MtZUi/u1zNxzw5PjC++PU0z5EEzXTCYQGf5Qe0MgtidmSkv9hxc6B2cUlWzmQ3iYZcN we4cFHRXrhcS9Nmov8A3Le3yeNwsDlQDr/J3z52kxAYgAu+3YvSQLEhcXKfTPkUNT5Wm YRiIBOIF0TRrz7+RgDe+MUOUyChGjsbM0/ZIrsRXBVgtiylrNxVclTxLg/UWF8+hQhHv yqnQ== X-Gm-Message-State: AElRT7F9c6G7kIDZFz7L1IR52ZTDwXZSptsfmwCfJtlp5f87DeBsoF/b u1rXvMplZVpSMAZLjgkiZTLtjyefpq1/OQG+e+4= X-Google-Smtp-Source: AG47ELs5bhsX8GlxeWxYGTd+jvMFv9BJzSfB3aTB9uF9X1oPoFaXG/2SNusWgZOLLrblzvH1nGsXU8guUpQ+nVe30Hc= X-Received: by 10.28.30.210 with SMTP id e201mr5178900wme.34.1520148380273; Sat, 03 Mar 2018 23:26:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.154.138 with HTTP; Sat, 3 Mar 2018 23:26:19 -0800 (PST) Received: by 10.28.154.138 with HTTP; Sat, 3 Mar 2018 23:26:19 -0800 (PST) In-Reply-To: <6a830a53-9c4e-ab05-c056-1fff6f2546f9@bothner.com> References: <5a9adcd0.1292630a.18215.d3d9@mx.google.com> <6a830a53-9c4e-ab05-c056-1fff6f2546f9@bothner.com> From: SANAN ANSARI Date: Sun, 04 Mar 2018 07:26:00 -0000 Message-ID: Subject: Re: Request for GSoC project Typed/optimized arithmetic with unit To: Per Bothner Cc: kawa@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2018-q1/txt/msg00029.txt.bz2 Thanks, I'll take a look. On 4 Mar 2018 12:46 p.m., "Per Bothner" wrote: > On 03/03/2018 09:35 AM, SANAN ANSARI wrote: > >> Hi , I'm Sanan Ansari. I am pursing my B.E in computer Engineering from >> Mumbai university India.I just read the project idea of Typed/optimized >> arithmetic with unit. I have knowledge about Java.I would love to work on >> the project. Please .If you can give more documentation about project it >> will help me. >> >> By the way this my first GSoC and I=E2=80=99m new to open source , real = world >> project. >> >> Hope you will help me as I=E2=80=99m a beginner. >> > > Welcome! The work needed to implement "Types for units" is moderate, but > it does require going fairly deep into low-level parts of the Kawa > compiler. > > Most of the work for "Types for units" will be in the Java language, but > it won't make sense without at least basic familiarity with the Kawa > dialect of Scheme. > Plus test-cases and examples would be written in Scheme. So start by > downloading, > building, and using Kawa. Write scripts and programs in it. Perhaps > focus in > on some Kawa feature that seems interesting/fun and go a bit deeper: For > example > Kawa as a web server - or "Composable pictures" - or using it in place of > a shell script. > > Also look at the Kawa number hierarchy, especially the Quantities page: > https://www.gnu.org/software/kawa/Quantities.html > This doesn't go into depth, but should point in the right direction. > Also look at how Quantities are implemented - look in gnu/math in the > source code. > > As a model of what we want to do, look at how Kawa implements the unsigned > types > ulong/uin/ushort/ubyte. Look at the dis-assembled bytecode (using either > the class gnu.byteode.dump or the standard javap). Understand how ''ulon= g' > gets compiled to a plain long (when the types are known) vs how it is > represented > as a gnu.math.ULog (when we don't know the type at compile-time). > > In the same way that a 'ulong' is either a long or a gnu.math.ULong, > we want the type quantity[cm^2] to be either a double or a > gnu.math.DQuantity. > Part of the goal is compile-time type-checking; part of the goal is to > generate > efficient code, using just double arithmetic when possible. In the latter > case, > all of the unit checking and combing would be done at compile-time. > > All of this stuff is in the Kawa manual at https://www.gnu.org/software/k > awa/ > -- > --Per Bothner > per@bothner.com http://per.bothner.com/ >