nice-commit Mailing List for The Nice Programming Language (Page 65)
Brought to you by:
bonniot
You can subscribe to this list here.
2003 |
Jan
|
Feb
(60) |
Mar
(125) |
Apr
(183) |
May
(140) |
Jun
(227) |
Jul
(141) |
Aug
(181) |
Sep
(75) |
Oct
(89) |
Nov
(187) |
Dec
(162) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(69) |
Feb
(197) |
Mar
(98) |
Apr
(26) |
May
(10) |
Jun
(85) |
Jul
(88) |
Aug
(79) |
Sep
(80) |
Oct
(81) |
Nov
(53) |
Dec
(109) |
2005 |
Jan
(68) |
Feb
(77) |
Mar
(232) |
Apr
(79) |
May
(37) |
Jun
(37) |
Jul
(3) |
Aug
(18) |
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
(10) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(9) |
2007 |
Jan
(2) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
(17) |
Dec
(6) |
2008 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <bo...@us...> - 2003-12-19 02:12:37
|
Update of /cvsroot/nice/Nice/testsuite/compiler/native In directory sc8-pr-cvs1:/tmp/cvs-serv3930/testsuite/compiler/native Modified Files: instanceof.testsuite Log Message: Fixed 'instanceof Array' tests for values that are statically known to be arrays (they could still be null). Index: instanceof.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/native/instanceof.testsuite,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** instanceof.testsuite 30 Nov 2003 14:24:35 -0000 1.6 --- instanceof.testsuite 19 Dec 2003 02:12:34 -0000 1.7 *************** *** 36,37 **** --- 36,46 ---- else throw new Error(); + + /// PASS + assert [] instanceof Array; + + int[] i = [0]; + assert i instanceof Array; + + List<String> l = [""]; + assert l instanceof Array; |
From: <ar...@us...> - 2003-12-19 00:48:28
|
Update of /cvsroot/nice/Nice/testsuite/compiler/methods In directory sc8-pr-cvs1:/tmp/cvs-serv22337/F:/nice/testsuite/compiler/methods Modified Files: primitive.testsuite Log Message: Testcase for incorrect codegeneration for at array type patterns. Index: primitive.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/primitive.testsuite,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** primitive.testsuite 3 Oct 2003 13:57:15 -0000 1.3 --- primitive.testsuite 19 Dec 2003 00:48:25 -0000 1.4 *************** *** 19,20 **** --- 19,27 ---- foo(t) {} foo(/*/// FAIL HERE */n<3) {} + + /// PASS bug + assert foo(['a']); + /// Toplevel + boolean foo(char[?] cbuf); + foo(Array cbuf) = true; + foo(null) = false; |
From: <bo...@us...> - 2003-12-18 00:58:23
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1:/tmp/cvs-serv29149/web Modified Files: manual.xml Log Message: Removed section about calling Nice functions from Java, it is now irrelevant. Index: manual.xml =================================================================== RCS file: /cvsroot/nice/Nice/web/manual.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** manual.xml 17 Dec 2003 14:33:09 -0000 1.31 --- manual.xml 18 Dec 2003 00:58:20 -0000 1.32 *************** *** 1304,1316 **** <section><title>Calling a method</title> <para> - You can call a <link linkend="method">method</link> - <literal>f</literal> - defined in a nice package <literal>pkg</literal> - by naming it <literal>pkg.fun.f</literal> in the Java program. - </para> - </section> - - <section><title>Calling a method</title> - <para> You can call a <link linkend="method">method</link> <literal>m</literal> --- 1304,1307 ---- |
From: <ar...@us...> - 2003-12-17 18:55:09
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1:/tmp/cvs-serv16640/F:/nice/stdlib/nice/lang Modified Files: java.nice Log Message: Missing retypings of static Collections methods. Index: java.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java.nice,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** java.nice 13 Dec 2003 22:46:55 -0000 1.47 --- java.nice 17 Dec 2003 18:55:06 -0000 1.48 *************** *** 324,334 **** <T,U | T <: U> T min(Collection<T>, Comparator<U>) = native Object Collections.max(Collection, Comparator); ! <T> void sort(List<T>, Comparator<T>) = native void Collections.sort(List, Comparator); ! <T> void swap(List<T>, int, int) = native void Collections.swap(List, int, int); ! <T> void rotate(List<T>, int) = native void Collections.rotate(List, int); ! <T,U | T <: U> boolean replaceAll(List<T>, U, T) = native boolean Collections.replaceAll(List, Object, Object); ! <T,U | T <: U> int indexOfSubList(List<T>, List<U>) = native int Collections.indexOfSubList(List, List); ! <T,U | T <: U> int lastIndexOfSubList(List<T>, List<U>) = native int Collections.lastIndexOfSubList(List, List); // static collections fields --- 324,369 ---- <T,U | T <: U> T min(Collection<T>, Comparator<U>) = native Object Collections.max(Collection, Comparator); ! <T, U | T <: U> void sort(List<T>, Comparator<U>) = native void Collections.sort(List, Comparator); ! <T> void swap(List<T>, int, int) = ! native void Collections.swap(List, int, int); ! <T> void rotate(List<T>, int) = ! native void Collections.rotate(List, int); ! <T,U | T <: U> boolean replaceAll(List<T>, U, T) = ! native boolean Collections.replaceAll(List, Object, Object); ! <T,U | T <: U> int indexOfSubList(List<T>, List<U>) = ! native int Collections.indexOfSubList(List, List); ! <T,U | T <: U> int lastIndexOfSubList(List<T>, List<U>) = ! native int Collections.lastIndexOfSubList(List, List); ! <T,U,V | T <: U, T <: V> int binarySearch(List<T>, U, Comparator<V>) = ! native int Collections.binarySearch(List, Object, Comparator); ! <T,U | T <: U> List<U> singletonList(T) = ! native List Collections.singletonList(Object); ! <K,K0,V,V0 | K <: K0, V <: V0> Map<K0,V0> singletonMap(K, V) = ! native Map Collections.singletonMap(Object, Object); ! <T,U | T <: U> Collection<U> synchronizedCollection(Collection<T>) = ! native Collection Collections.synchronizedCollection(Collection); ! <T,U | T <: U> List<U> synchronizedList(List<T>) = ! native List Collections.synchronizedList(List); ! <K,K0,V,V0 | K <: K0, V <: V0> Map<K0,V0> synchronizedMap(Map<K,V>) = ! native Map Collections.synchronizedMap(Map); ! <T,U | T <: U> Set<U> synchronizedSet(Set<T>) = ! native Set Collections.synchronizedSet(Set); ! <K,K0,V,V0 | K <: K0, V <: V0> SortedMap<K0,V0> synchronizedSortedMap(SortedMap<K,V>) = ! native SortedMap Collections.synchronizedSortedMap(SortedMap); ! <T,U | T <: U> SortedSet<U> synchronizedSortedSet(SortedSet<T>) = ! native SortedSet Collections.synchronizedSortedSet(SortedSet); ! <T,U | T <: U> Collection<U> unmodifiableCollection(Collection<T>) = ! native Collection Collections.unmodifiableCollection(Collection); ! <T,U | T <: U> List<U> unmodifiableList(List<T>) = ! native List Collections.unmodifiableList(List); ! <K,K0,V,V0 | K <: K0, V <: V0> Map<K0,V0> unmodifiableMap(Map<K,V>) = ! native Map Collections.unmodifiableMap(Map); ! <T,U | T <: U> Set<U> unmodifiableSet(Set<T>) = native Set Collections.unmodifiableSet(Set); ! <K,K0,V,V0 | K <: K0, V <: V0> SortedMap<K0,V0> unmodifiableSortedMap(SortedMap<K,V>) = ! native SortedMap Collections.unmodifiableSortedMap(SortedMap); ! <T,U | T <: U> SortedSet<U> unmodifiableSortedSet(SortedSet<T>) = ! native SortedSet Collections.unmodifiableSortedSet(SortedSet); ! // static collections fields |
From: <ar...@us...> - 2003-12-17 16:08:22
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1:/tmp/cvs-serv10292/nice Modified Files: NEWS Log Message: Update of changelog (enum fields, block call syntax, bugs). Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** NEWS 16 Dec 2003 15:57:29 -0000 1.9 --- NEWS 17 Dec 2003 16:08:18 -0000 1.10 *************** *** 1,6 **** nice (0.9.6) ! * ! -- --- 1,11 ---- nice (0.9.6) ! * Additional fields can be defined for enums, example: ! enum Coin(int value) {penny(1), nickel(5), dime(10), quarter(25)} ! * Alternative syntax for calling methods that takes an closure with no ! arguments. For example 'loop(5) { doSomeThing(); }' is shorthand for ! 'loop(5, () => { doSomeThing(); });' ! * Bug fixes (checking of local variables in a call position, make it possible ! to use new Object() again, ... ) -- |
From: <ar...@us...> - 2003-12-17 14:33:42
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1:/tmp/cvs-serv23996/F:/nice/src/bossa/parser Modified Files: Parser.jj Log Message: Allow unescaped " in multiline strings. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.228 retrieving revision 1.229 diff -C2 -d -r1.228 -r1.229 *** Parser.jj 15 Dec 2003 14:23:21 -0000 1.228 --- Parser.jj 17 Dec 2003 14:33:39 -0000 1.229 *************** *** 281,285 **** < MULTILINESTRING: "\"" "\"" "\"" ! ( (~["\"","\\"]) | ("\\" ( ["n","t","b","r","f","\\","'","\""] --- 281,285 ---- < MULTILINESTRING: "\"" "\"" "\"" ! ( (~["\\"]) | ("\\" ( ["n","t","b","r","f","\\","'","\""] |
From: <ar...@us...> - 2003-12-17 14:33:42
|
Update of /cvsroot/nice/Nice/testsuite/compiler/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv23996/F:/nice/testsuite/compiler/syntax Modified Files: expressions.testsuite Log Message: Allow unescaped " in multiline strings. Index: expressions.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/syntax/expressions.testsuite,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** expressions.testsuite 1 Oct 2003 18:11:39 -0000 1.5 --- expressions.testsuite 17 Dec 2003 14:33:39 -0000 1.6 *************** *** 26,27 **** --- 26,31 ---- def\nghi xyz""".equals("abc\n def\nghi\n xyz"); + + /// PASS + String x = """ " """; + assert x.equals(" \" "); |
From: <bo...@us...> - 2003-12-17 14:33:13
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1:/tmp/cvs-serv23874/web Modified Files: manual.xml Log Message: Updated section about characters, since they are not numeric types anymore. Index: manual.xml =================================================================== RCS file: /cvsroot/nice/Nice/web/manual.xml,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** manual.xml 17 Dec 2003 11:53:59 -0000 1.30 --- manual.xml 17 Dec 2003 14:33:09 -0000 1.31 *************** *** 1112,1121 **** </section> ! <section id="conversion"><title>Conversion between numeric primitive types</title> <para> The numeric primitive types are, from the largest to the smallest: ! <type>double, float, long, int, short, byte</type>, ! and <type>char</type> which is smaller than ! <type>int</type> but incomparable with <type>short</type>. Conversion from a smaller to a larger type is automatic. Conversion from a larger to a smaller type must be done explicitly, --- 1112,1119 ---- </section> ! <section id="conversion"><title>Conversion between primitive types</title> <para> The numeric primitive types are, from the largest to the smallest: ! <type>double, float, long, int, short, byte</type>. Conversion from a smaller to a larger type is automatic. Conversion from a larger to a smaller type must be done explicitly, *************** *** 1135,1138 **** --- 1133,1148 ---- </para> <para> + In most cases, characters should be treatead as abstract entities + and not as the numbers that happen to encode them. Therefore, + the <literal>char</literal> type is not a numeric type in Nice. + Operations on characters can be performed using the methods of class + <literal>java.lang.Character</literal>. + Additionally, it is possible to convert a character + <literal>c</literal> to its integer value with + <literal>int(c)</literal>, + and to convert an integer to the character it encodes with + <literal>char(i)</literal>. + </para> + <para> For instance, here is code to read characters from a <type>Reader</type>, whose *************** *** 1143,1150 **** <example><title>Converting a value of a primitive type</title> <programlisting lang="nice"> ! BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); int v; ! while ((v = r.read()) != -1) { char c = char(v); ... // Do something with the character. --- 1153,1160 ---- <example><title>Converting a value of a primitive type</title> <programlisting lang="nice"> ! let reader = new BufferedReader(new InputStreamReader(System.in)); int v; ! while ((v = reader.read()) != -1) { char c = char(v); ... // Do something with the character. |
From: <bo...@us...> - 2003-12-17 11:54:02
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1:/tmp/cvs-serv24859/web Modified Files: manual.xml Log Message: Added for explanation about the utility of exact matching. Restored a precision about method implementations and default values. Index: manual.xml =================================================================== RCS file: /cvsroot/nice/Nice/web/manual.xml,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** manual.xml 17 Dec 2003 11:06:35 -0000 1.29 --- manual.xml 17 Dec 2003 11:53:59 -0000 1.30 *************** *** 432,436 **** <para> ! There is an <link linkend="ex:copy">example</link> where exact matching is required to type-check a method with a precise polymorphic type. --- 432,442 ---- <para> ! Specializing on the exact class of an argument is useful in situations ! where an implementation is correct for a certain class, but you know ! that each subclass will require a different implementation. ! </para> ! ! <para> ! There is also an <link linkend="ex:copy">example</link> where exact matching is required to type-check a method with a precise polymorphic type. *************** *** 479,483 **** Note that it is not possible to dispatch a method call on an array type, nor to specialize a method on the subtype of a type parameter. ! This means that methods of the form: </para> <para> --- 485,489 ---- Note that it is not possible to dispatch a method call on an array type, nor to specialize a method on the subtype of a type parameter. ! This means that method implementations of the form: </para> <para> *************** *** 587,590 **** --- 593,602 ---- int to = array.length - 1);</literal> </para> + + <para> + Method implementations must still bind all parameters, + including the optional ones, and can dispatch on them. + </para> + </section> </chapter> |
From: <bo...@us...> - 2003-12-17 11:06:42
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1:/tmp/cvs-serv18344/web Modified Files: manual.xml Log Message: Fixed some non-conforming tags. Added a new quotation to explain Nice's philosophy :-) Index: manual.xml =================================================================== RCS file: /cvsroot/nice/Nice/web/manual.xml,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** manual.xml 17 Dec 2003 06:50:40 -0000 1.28 --- manual.xml 17 Dec 2003 11:06:35 -0000 1.29 *************** *** 45,48 **** --- 45,56 ---- </blockquote> + <blockquote> + <attribution>Alfred North Whitehead</attribution> + <para> + The art of progress is to preserve order amid change + and to preserve change amid order. + </para> + </blockquote> + The Nice programming language is a new object-oriented programming language based on Java. *************** *** 1040,1081 **** <para> Nice supports a wide range of operators which will be familiar to ! most programmers. The table below lists the operators and their ! precedence levels. </para> ! <table> <tbody> <!-- Lifted from http://nice.sourceforge.net/cgi-bin/twiki/view/Doc/NiceExpressions --> ! <row><entry> <verbatim> () </verbatim> </entry><entry align="right"> grouping </entry><entry> none </entry></row> ! <row><entry> <verbatim> [], . </verbatim> </entry><entry> postfix </entry><entry> left </entry></row> ! <row><entry> <verbatim> new </verbatim> </entry><entry> prefix </entry><entry> right </entry></row> ! <row><entry> <verbatim> ++, -- </verbatim> </entry><entry> postfix </entry><entry> left </entry></row> ! <row><entry> <verbatim> +, -, ++, --, ~, ! </verbatim> </entry><entry> prefix </entry><entry> right </entry></row> ! <row><entry> <verbatim> ** </verbatim> </entry><entry> binary </entry><entry> right </entry></row> ! <row><entry> <verbatim> *, /, % </verbatim> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <verbatim> +, - </verbatim> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <verbatim> <<, >>, >>> </verbatim> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <verbatim> .. </verbatim> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <verbatim> <, <=, >, >= </verbatim> </entry><entry> binary </entry><entry> both </entry></row> ! <row><entry> <verbatim> instanceof </verbatim> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <verbatim> <code>=, !</code> </verbatim> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <verbatim> & </verbatim> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <verbatim> ^ </verbatim> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> _ </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <verbatim> && </verbatim> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <verbatim> __ </verbatim> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <verbatim> ?: </verbatim> </entry><entry> ternary </entry><entry> right </entry></row> ! <row><entry> <verbatim> => </verbatim> </entry><entry> binary </entry><entry> right </entry></row> ! <row><entry> <verbatim> *=, /=, %=, +=, -=, &=, ^=, _=, <<=, >>=, >>>=, = </verbatim> </entry><entry> binary </entry><entry> right </entry></row> </tbody> ! </table> </section> --- 1048,1100 ---- <para> Nice supports a wide range of operators which will be familiar to ! most programmers. The table below lists the operators, ordered from ! highest precedence to lowest precedence. </para> ! <table><title>Operators</title> ! <tgroup cols='3'> ! ! <thead> ! <row> ! <entry>Operator</entry> ! <entry>Kind</entry> ! <entry>Associativity</entry> ! </row> ! </thead> ! <tbody> + <!-- Lifted from http://nice.sourceforge.net/cgi-bin/twiki/view/Doc/NiceExpressions --> ! <row><entry> <literal> () </literal> </entry><entry> grouping </entry><entry> none </entry></row> ! <row><entry> <literal> [], . </literal> </entry><entry> postfix </entry><entry> left </entry></row> ! <row><entry> <literal> new </literal> </entry><entry> prefix </entry><entry> right </entry></row> ! <row><entry> <literal> ++, -- </literal> </entry><entry> postfix </entry><entry> left </entry></row> ! <row><entry> <literal> +, -, ++, --, ~, ! </literal> </entry><entry> prefix </entry><entry> right </entry></row> ! <row><entry> <literal> ** </literal> </entry><entry> binary </entry><entry> right </entry></row> ! <row><entry> <literal> *, /, % </literal> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <literal> +, - </literal> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <literal> <<, >>, >>> </literal> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <literal> .. </literal> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <literal> <, <=, >, >= </literal> </entry><entry> binary </entry><entry> both </entry></row> ! <row><entry> <literal> instanceof </literal> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <literal> =, ! </literal> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <literal> & </literal> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <literal> ^ </literal> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <literal> | </literal> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <literal> && </literal> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <literal> || </literal> </entry><entry> binary </entry><entry> left </entry></row> ! <row><entry> <literal> ?: </literal> </entry><entry> ternary </entry><entry> right </entry></row> ! <row><entry> <literal> => </literal> </entry><entry> binary </entry><entry> right </entry></row> ! <row><entry> <literal> *=, /=, %=, +=, -=, &=, ^=, _=, <<=, >>=, >>>=, = </literal> </entry><entry> binary </entry><entry> right </entry></row> </tbody> ! </tgroup> </table> </section> |
From: <bo...@us...> - 2003-12-17 09:49:40
|
Update of /cvsroot/nice/eclipse/src In directory sc8-pr-cvs1:/tmp/cvs-serv5205/src Modified Files: plugin.xml Log Message: Fix the name of the Nice perspective: "Perspective" is added by eclipse, it should not be in the name itself Index: plugin.xml =================================================================== RCS file: /cvsroot/nice/eclipse/src/plugin.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** plugin.xml 10 Aug 2003 16:24:30 -0000 1.7 --- plugin.xml 17 Dec 2003 09:49:36 -0000 1.8 *************** *** 81,85 **** <perspective id="net.sf.nice.nice_perspective" ! name="Nice Perspective" icon="icons/full/cview16/nice.png" class="nice.eclipse.ui.NicePerspectiveFactory"> --- 81,85 ---- <perspective id="net.sf.nice.nice_perspective" ! name="Nice" icon="icons/full/cview16/nice.png" class="nice.eclipse.ui.NicePerspectiveFactory"> |
From: <xo...@us...> - 2003-12-17 06:50:43
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1:/tmp/cvs-serv10679/web Modified Files: manual.xml Log Message: 1. Removed all mention of functions. 2. Converted to new method definition syntax (no more foo@bar). 3. Added sections for array literals, string literals (including multi-line, and concatentation by juxtaposition). Index: manual.xml =================================================================== RCS file: /cvsroot/nice/Nice/web/manual.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** manual.xml 24 Jun 2003 09:06:57 -0000 1.27 --- manual.xml 17 Dec 2003 06:50:40 -0000 1.28 *************** *** 58,66 **** Nice detects more errors during compilation than existing object-oriented languages (null pointer accesses, ! casts exceptions). This means that programs written in Nice never throw the infamous <literal>NullPointerException</literal> nor <literal>ClassCastException</literal>. ! This aspect is developed in more details in <ulink url="http://nice.sf.net/safety.html">this article</ulink>. </para> --- 58,66 ---- [...970 lines suppressed...] //We like to log requests, too class javax.servlet.http.HttpServletRequest implements LogEntry; ! toLogString(r@HttpServletRequest) = "Request from: " + r.getRemoteHost(); ! severity(r@HttpServletRequest) = INFO; ]]> --- 1658,1668 ---- } ! severity(Throwable t) = ERROR; //We like to log requests, too class javax.servlet.http.HttpServletRequest implements LogEntry; ! toLogString(HttpServletRequest r) = "Request from: " + r.getRemoteHost(); ! severity(HttpServletRequest r) = INFO; ]]> |
From: <bo...@us...> - 2003-12-16 22:20:49
|
Update of /cvsroot/nice/Nice/debian In directory sc8-pr-cvs1:/tmp/cvs-serv20155/debian Modified Files: copyright Log Message: Clarified that the license is GPL-2 or later, and cleaned up. Index: copyright =================================================================== RCS file: /cvsroot/nice/Nice/debian/copyright,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** copyright 19 Apr 2003 08:52:10 -0000 1.2 --- copyright 16 Dec 2003 22:20:46 -0000 1.3 *************** *** 1,4 **** ! This package was debianized by Daniel Bonniot <bo...@us...> ! on Mon, 17 Dec 2001 16:32:13 +0100. It was downloaded from http://nice.sourceforge.net --- 1,3 ---- ! This software is copyright (c) 2003 by Daniel Bonniot. It was downloaded from http://nice.sourceforge.net *************** *** 6,13 **** Upstream Author: Daniel Bonniot <bo...@us...> - This software is copyright (c) 2003 by Daniel Bonniot - You are free to distribute this software under the terms of ! the GNU General Public License. On Debian systems, the complete text of the GNU General Public ! License can be found in /usr/share/common-licenses/GPL file. --- 5,11 ---- Upstream Author: Daniel Bonniot <bo...@us...> You are free to distribute this software under the terms of ! the GNU General Public License, version 2 or later. ! On Debian systems, the complete text of the GNU General Public ! License, version 2, can be found in /usr/share/common-licenses/GPL-2. |
From: <bo...@us...> - 2003-12-16 16:46:20
|
Update of /cvsroot/nice/Nice/web/images In directory sc8-pr-cvs1:/tmp/cvs-serv29510/web/images Added Files: .cvsignore Log Message: Ignore image viewer cache. --- NEW FILE: .cvsignore --- .xvpics |
From: <bo...@us...> - 2003-12-16 15:57:32
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1:/tmp/cvs-serv20609 Modified Files: NEWS Log Message: Opened 0.9.6 Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** NEWS 11 Dec 2003 15:06:08 -0000 1.8 --- NEWS 16 Dec 2003 15:57:29 -0000 1.9 *************** *** 1,2 **** --- 1,8 ---- + nice (0.9.6) + + * + + -- + nice (0.9.5) |
From: <ar...@us...> - 2003-12-16 14:55:32
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1:/tmp/cvs-serv8382/F:/nice/stdlib/nice/lang Modified Files: collections.nice Log Message: Added foreach on Maps. Index: collections.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/collections.nice,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** collections.nice 19 Nov 2003 16:04:46 -0000 1.57 --- collections.nice 16 Dec 2003 14:55:28 -0000 1.58 *************** *** 467,468 **** --- 467,478 ---- return res; } + + /**************************************************************** + * Map operations + ****************************************************************/ + + <K,V> void foreach(Map<K,V> map, (K,V)->void fun) + { + for (Map.Entry<K,V> entry : map.entrySet()) + fun(entry.getKey(), entry.getValue()); + } |
From: <bo...@us...> - 2003-12-16 12:59:53
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv20998/src/bossa/syntax Modified Files: CustomConstructor.java Log Message: Report an error when a custom constructor is defined on a non-Nice class. Index: CustomConstructor.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/CustomConstructor.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CustomConstructor.java 15 Dec 2003 16:19:47 -0000 1.8 --- CustomConstructor.java 16 Dec 2003 12:59:50 -0000 1.9 *************** *** 104,107 **** --- 104,111 ---- classe = NiceClass.get(tc); + if (classe == null) + User.error(this, + "It is impossible to add a constructor to class " + tc); + addConstructorCallSymbol(); |
From: <bo...@us...> - 2003-12-16 12:59:53
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes/constructors In directory sc8-pr-cvs1:/tmp/cvs-serv20998/testsuite/compiler/classes/constructors Modified Files: custom.testsuite Log Message: Report an error when a custom constructor is defined on a non-Nice class. Index: custom.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/constructors/custom.testsuite,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** custom.testsuite 15 Dec 2003 16:19:47 -0000 1.6 --- custom.testsuite 16 Dec 2003 12:59:50 -0000 1.7 *************** *** 73,74 **** --- 73,82 ---- new Point2(double angle, double distance) { this(x: distance * cos(angle), y: distance * sin(angle)); } + + /// FAIL + /// Toplevel + new /*/// FAIL HERE */ String(int x) = this("xyz"); + + /// FAIL + /// Toplevel + new /*/// FAIL HERE */ FooBar(int x) = this("xyz"); |
From: <bo...@us...> - 2003-12-16 12:49:05
|
Update of /cvsroot/nice/Nice/distrib In directory sc8-pr-cvs1:/tmp/cvs-serv19141/distrib Modified Files: Makefile Log Message: Added a section for source download. Index: Makefile =================================================================== RCS file: /cvsroot/nice/Nice/distrib/Makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile 11 Dec 2003 15:00:36 -0000 1.10 --- Makefile 16 Dec 2003 12:49:02 -0000 1.11 *************** *** 23,26 **** --- 23,27 ---- CVSROOT=:pserver:ano...@cv...:/cvsroot/nice + DOWNLOADROOT = http://prdownloads.sourceforge.net/nice clean-tmp = rm -rf tmp && mkdir tmp *************** *** 82,89 **** | ftp -n upload.sourceforge.net echo -e "Redirect /Wiki http://nice.sourceforge.net/cgi-bin/twiki/view" \ ! "\nRedirect /Nice.tar http://prdownloads.sourceforge.net/nice/${TARFILE}" \ ! "\nRedirect /Nice.zip http://prdownloads.sourceforge.net/nice/${ZIPFILE}" \ ! "\nRedirect /nice.deb http://prdownloads.sourceforge.net/nice/${DEB}" \ ! "\nRedirect /nice.rpm http://prdownloads.sourceforge.net/nice/${RPMFILE}" \ > ../web/.htaccess --- 83,91 ---- | ftp -n upload.sourceforge.net echo -e "Redirect /Wiki http://nice.sourceforge.net/cgi-bin/twiki/view" \ ! "\nRedirect /Nice.tar $(DOWNLOADROOT)/${TARFILE}" \ ! "\nRedirect /Nice-source.tar.gz $(DOWNLOADROOT)/${SOURCEFILE}" \ ! "\nRedirect /Nice.zip $(DOWNLOADROOT)/${ZIPFILE}" \ ! "\nRedirect /nice.deb $(DOWNLOADROOT)/${DEB}" \ ! "\nRedirect /nice.rpm $(DOWNLOADROOT)/${RPMFILE}" \ > ../web/.htaccess |
From: <bo...@us...> - 2003-12-16 12:49:05
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1:/tmp/cvs-serv19141/web Modified Files: install.xml Log Message: Added a section for source download. Index: install.xml =================================================================== RCS file: /cvsroot/nice/Nice/web/install.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** install.xml 14 May 2003 15:44:08 -0000 1.9 --- install.xml 16 Dec 2003 12:49:02 -0000 1.10 *************** *** 67,70 **** --- 67,79 ---- </para></listitem> + <listitem><para> + + <inlinemediaobject><imageobject> + <imagedata fileref="images/dev-32.png"/> + </imageobject></inlinemediaobject> + + <link linkend="source">Source distribution</link> + + </para></listitem> </itemizedlist> *************** *** 152,155 **** --- 161,173 ---- <ulink url="mailto:bo...@us...">contact me</ulink> to share your experience and augment the documentation. + </para> + </section> + + <section id="source"><title>Source distribution</title> + <para> + it is also possible to + <ulink url="Nice-source.tar.gz">download the source code</ulink> of Nice, + together with a bootstrap compiler. + Compilation is done by simply typing <literal>make</literal>. </para> </section> |
From: <bo...@us...> - 2003-12-16 12:49:05
|
Update of /cvsroot/nice/Nice/web/images In directory sc8-pr-cvs1:/tmp/cvs-serv19141/web/images Added Files: dev-32.png Log Message: Added a section for source download. --- NEW FILE: dev-32.png --- (This appears to be a binary file; contents omitted.) |
From: <bo...@us...> - 2003-12-16 12:34:36
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv16940/src/bossa/syntax Modified Files: NewExp.java JavaClasses.java Log Message: Support 'new Object()'. Index: NewExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NewExp.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** NewExp.java 23 Jun 2003 17:49:01 -0000 1.36 --- NewExp.java 16 Dec 2003 12:34:33 -0000 1.37 *************** *** 15,18 **** --- 15,20 ---- import bossa.util.*; import java.util.*; + import mlsub.typing.TypeSymbol; + import mlsub.typing.TypeConstructor; /** *************** *** 30,41 **** } ! private void resolveTC(TypeMap typeScope) { ! if (tc != null) ! return; ! ! tc = ti.resolveToTC(typeScope); ! ti = null; ! if(!TypeConstructors.instantiable(tc)) { String message; --- 32,52 ---- } ! void resolve(TypeMap typeScope) { ! TypeSymbol sym = ti.resolveToTypeSymbol(typeScope); ! ! if (sym == mlsub.typing.TopMonotype.instance) ! setObject(); ! else if (sym instanceof TypeConstructor) ! setTC((TypeConstructor) sym); ! else ! throw User.error(ti, ti + " is not a class" + sym.getClass()); ! } ! ! private void setTC(TypeConstructor tc) ! { ! this.tc = tc; ! ! if (! TypeConstructors.instantiable(tc)) { String message; *************** *** 48,60 **** throw User.error(this, message); } - } - - void resolve(TypeMap typeScope) - { - if (tc != null) - return; - resolveTC(typeScope); - // Make sure that the constructors have been created. ClassDefinition definition = ClassDefinition.get(tc); --- 59,63 ---- *************** *** 79,83 **** --- 82,93 ---- (constructors, new LocatedString("new " + tc, location())); } + + private void setObject() + { + JavaMethod method = JavaClasses.getObjectConstructor(); + function = new SymbolExp(method.getSymbol(), ti.location()); + } + /**************************************************************** * Printing *************** *** 86,94 **** public String toString() { ! String cl = (ti == null ? tc.toString() : ti.toString()); return "new " + cl + arguments; } private TypeIdent ti; ! mlsub.typing.TypeConstructor tc; } --- 96,106 ---- public String toString() { ! String cl = ti.toString(); return "new " + cl + arguments; } private TypeIdent ti; ! ! /** Can be null if the class instantiated is Object. */ ! TypeConstructor tc = null; } Index: JavaClasses.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/JavaClasses.java,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** JavaClasses.java 12 Dec 2003 14:53:30 -0000 1.42 --- JavaClasses.java 16 Dec 2003 12:34:33 -0000 1.43 *************** *** 306,310 **** return possibilities; ! } /**search recursively in superclasses and interfaces for static java fields*/ --- 306,321 ---- return possibilities; ! } ! ! private static JavaMethod objectConstructor; ! ! static JavaMethod getObjectConstructor() ! { ! if (objectConstructor == null) ! objectConstructor = JavaMethod.make ! (Type.pointer_type.getDeclaredMethod("<init>", 0), true); ! ! return objectConstructor; ! } /**search recursively in superclasses and interfaces for static java fields*/ |
From: <bo...@us...> - 2003-12-16 12:34:35
|
Update of /cvsroot/nice/Nice/testsuite/compiler/expressions In directory sc8-pr-cvs1:/tmp/cvs-serv16940/testsuite/compiler/expressions Modified Files: new.testsuite Log Message: Support 'new Object()'. Index: new.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/expressions/new.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** new.testsuite 8 Feb 2003 16:39:36 -0000 1.2 --- new.testsuite 16 Dec 2003 12:34:32 -0000 1.3 *************** *** 2,5 **** --- 2,11 ---- Object o = /*/// FAIL HERE */ java.lang.Object(); + /// PASS + Object o = new java.lang.Object(); + /// Toplevel + // Make it necessary to print 'new Object()' in package.nicei. + void foo(Object lock = new Object()) {} + /// FAIL /// Toplevel |
From: <bo...@us...> - 2003-12-16 11:39:14
|
Update of /cvsroot/nice/Nice/src/mlsub/typing In directory sc8-pr-cvs1:/tmp/cvs-serv7558/src/mlsub/typing Modified Files: Enumeration.java Log Message: Handle coverage tests of methods with an Object parameter. Index: Enumeration.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/Enumeration.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Enumeration.java 29 Apr 2003 16:45:50 -0000 1.9 --- Enumeration.java 16 Dec 2003 11:39:10 -0000 1.10 *************** *** 19,22 **** --- 19,23 ---- import mlsub.typing.lowlevel.BitVector; import mlsub.typing.lowlevel.Element; + import mlsub.typing.lowlevel.Kind; /** *************** *** 127,140 **** { while(minFloating<tags.length ! && (all[minFloating] != doAll || ! tags[minFloating].getKind() != null ! && tags[minFloating].getKind() != Engine.variablesConstraint)) minFloating++; if(minFloating<tags.length) { ! // There might be a garbagy Engine.variablesConstraint ! // in the monotype variable variable ! tags[minFloating].setKind(null); for(Iterator cs = Engine.listConstraints(); cs.hasNext();) --- 128,150 ---- { while(minFloating<tags.length ! && (all[minFloating] != doAll || ! isFixedKind(tags[minFloating].getKind()))) minFloating++; if(minFloating<tags.length) { ! Element tag = tags[minFloating]; ! ! if (tag.getKind() == TopMonotype.TopKind.instance) ! { ! // Tag is "Object". All TCs are solutions. ! tag = tags[minFloating] = new MonotypeVar("enumeration"); ! } ! else ! { ! // There might be a garbagy Engine.variablesConstraint ! // in the monotype variable variable ! tag.setKind(null); ! } for(Iterator cs = Engine.listConstraints(); cs.hasNext();) *************** *** 146,159 **** { if(linkDbg) ! Debug.println("Choosing kind "+c+" for "+tags[minFloating]); ! if(tags[minFloating] instanceof MonotypeVar) ! Engine.forceKind(tags[minFloating],c.associatedKind); else ! Engine.forceKind(tags[minFloating],c); // recursive call setFloatingKinds(tags, all, minFloating + 1, res, doAll); ! tags[minFloating].setKind(null); } } --- 156,169 ---- { if(linkDbg) ! Debug.println("Choosing kind " + c + " for " + tag); ! if (tag instanceof MonotypeVar) ! Engine.forceKind(tag, c.associatedKind); else ! Engine.forceKind(tag, c); // recursive call setFloatingKinds(tags, all, minFloating + 1, res, doAll); ! tag.setKind(null); } } *************** *** 182,186 **** } } ! private static class SolutionFound extends RuntimeException {} --- 192,203 ---- } } ! ! private static boolean isFixedKind(Kind k) ! { ! return k != null ! && k != Engine.variablesConstraint ! && k != TopMonotype.TopKind.instance; ! } ! private static class SolutionFound extends RuntimeException {} |
From: <bo...@us...> - 2003-12-16 11:39:13
|
Update of /cvsroot/nice/Nice/testsuite/compiler/methods In directory sc8-pr-cvs1:/tmp/cvs-serv7558/testsuite/compiler/methods Modified Files: coverage.testsuite Log Message: Handle coverage tests of methods with an Object parameter. Index: coverage.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/coverage.testsuite,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** coverage.testsuite 6 Sep 2003 11:31:10 -0000 1.1 --- coverage.testsuite 16 Dec 2003 11:39:10 -0000 1.2 *************** *** 32,33 **** --- 32,37 ---- } + /// PASS + /// Toplevel + <T> T foo(T x, Object o) = x; + foo(String s, o) = ""; |