From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8094 invoked by alias); 4 Mar 2018 07:16:57 -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 8080 invoked by uid 89); 4 Mar 2018 07:16:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Quantities, Mumbai, mumbai, Understand X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 04 Mar 2018 07:16:53 +0000 Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1esNt4-0000wx-QZ; Sun, 04 Mar 2018 08:16:50 +0100 Received: from 70-36-239-180.dsl.dynamic.fusionbroadband.com ([70.36.239.180] helo=localhost.localdomain) by mailfront12.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1esNsw-0006vN-VG; Sun, 04 Mar 2018 08:16:43 +0100 Subject: Re: Request for GSoC project Typed/optimized arithmetic with unit To: SANAN ANSARI , "kawa@sourceware.org" References: <5a9adcd0.1292630a.18215.d3d9@mx.google.com> From: Per Bothner Message-ID: <6a830a53-9c4e-ab05-c056-1fff6f2546f9@bothner.com> Date: Sun, 04 Mar 2018 07:16:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <5a9adcd0.1292630a.18215.d3d9@mx.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-q1/txt/msg00028.txt.bz2 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’m new to open source , real world project. > > Hope you will help me as I’m 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 ''ulong' 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/kawa/ -- --Per Bothner per@bothner.com http://per.bothner.com/