public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* Request for GSoC project Typed/optimized arithmetic with unit
@ 2018-03-03 17:35 SANAN ANSARI
  2018-03-04  7:16 ` Per Bothner
  0 siblings, 1 reply; 3+ messages in thread
From: SANAN ANSARI @ 2018-03-03 17:35 UTC (permalink / raw)
  To: kawa

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.

Sent from Mail for Windows 10

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Request for GSoC project Typed/optimized arithmetic with unit
  2018-03-03 17:35 Request for GSoC project Typed/optimized arithmetic with unit SANAN ANSARI
@ 2018-03-04  7:16 ` Per Bothner
  2018-03-04  7:26   ` SANAN ANSARI
  0 siblings, 1 reply; 3+ messages in thread
From: Per Bothner @ 2018-03-04  7:16 UTC (permalink / raw)
  To: SANAN ANSARI, kawa

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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Request for GSoC project Typed/optimized arithmetic with unit
  2018-03-04  7:16 ` Per Bothner
@ 2018-03-04  7:26   ` SANAN ANSARI
  0 siblings, 0 replies; 3+ messages in thread
From: SANAN ANSARI @ 2018-03-04  7:26 UTC (permalink / raw)
  To: Per Bothner; +Cc: kawa

Thanks, I'll take a look.

On 4 Mar 2018 12:46 p.m., "Per Bothner" <per@bothner.com> 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’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/k
> awa/
> --
>         --Per Bothner
> per@bothner.com   http://per.bothner.com/
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-04  7:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-03 17:35 Request for GSoC project Typed/optimized arithmetic with unit SANAN ANSARI
2018-03-04  7:16 ` Per Bothner
2018-03-04  7:26   ` SANAN ANSARI

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).