Log of the #nice channel on irc.freenode.net

Using timezone: Central European Time
* bonniot joins10:36
* arjanb joins11:07
* fcb joins14:29
* fcb leaves
<arjanb>is there any reason why unicode escapes aren't supported in Nice?14:32
<bonniot>\uXXXX ?
<bonniot>aren't they?
in Parser.jj14:34
options {
<arjanb>hmm builtin javacc?14:35
<bonniot>it's an option of javacc14:36
did you try it?
<arjanb>it seems to work but i was surprised that i could find the code handling it14:37
* fcb joins14:43
<CIA-7>03fbarber * 10Nice/src/nice/tools/doc/ (api.nice htmlwriter.nice): 14:47
api.nice: runs a command to output a stylesheet.
htmlwriter.nice: added stylesheet link to the header, but it needs to link properly to the root directory.
<fcb>hello arjan
<bonniot>hello frank14:48
<CIA-7>03fbarber * 10Nice/src/nice/tools/doc/css.nice: responsible for writing stylesheets. Currently contains a simple method to output a stylesheet and a the start of a default stylesheet.14:50
<bonniot>so how are stylesheets working now?14:54
<fcb>haven't really achieved anything14:59
just having a look through the javax.swing.text.html package and wondering if I shouldn't have used these classes
although the api looks pretty complicated15:02
by the way, I'm moving to a new job15:03
<bonniot>you like the new job?
<fcb>I haven't started yet - I start on the 13th of Sept. I've just been running around like a headless chicken trying to finish things off at my current (old) job15:04
Anyway, I will be working for Motorola - so if you want to support me make sure you buy Motorola phones ;)15:05
good thing is I don't have a mobile phone yet. bad thing is I don't plan on one...15:06
first I thought you were going to speak about Motorola supporting Nice ;-)
<fcb>anyway, I had to declare that I do work on the nice project. They are allowed to claim ownership of idea I have now on, if they want to. So I'll need to get their ok to continue working on the project, but I'd very surprised if they had a problem with it.15:07
yes, I have every intention of promoting Nice at Motorola! You would obviously view this as a positive step?15:08
<fcb>Does Java have a function to encode a string of html (dealing with '<' etc)? I can't believe that it doesn't15:16
<bonniot>not that I know of15:20
wouldnt s.replace('<', "<")) be enough?
<fcb>yeah, I have a method to do it but I think its nice to use the provided api where possible15:25
<arjanb>java is missing many standard utility functions15:42
<CIA-7>03fbarber * 10Nice/src/nice/tools/doc/htmlwriter.nice: Method names, etc, should now be properly html encoded (eg, < -> <)15:51
<fcb>there you go, daniel :)
i'm going to try it out
did you get my email?15:52
fcb: are you also quoting types?15:54
i seem to still get the pb
what is your example, sorry?15:56
(yes, i did get the email)15:59
I have to go now, but please post your example - I will have a look in a minute16:02
<bonniot><li><a href='nand64546485.html'>nand</a>: <B | B:nice.lang.BooleanAlgebra> (B, B)->B</li>16:25
* fcb leaves16:48
* cm_ joins17:25
<cm_>I was thinking about the Java/Nice integration. It might be confusing to some users with the dispatch method to invoke methods. Have you thought about this? Would it be possible to include an alias in the class where the method is defined (if it is defined "in" a class)?17:31
<arjanb>the problem is that it isn't always possible17:39
for example when the first argument is maybe null or a java class or a primitive17:40
Is operator overloading possible in general? 17:44
though you can't create new operators
<CIA-7>03arjanb * 10Nice/src/bossa/ (12 files in 2 dirs): Converted constantExp subclasses to Nice code.
Is the array syntax with brackets after the variable to be supported? (int vector[])17:56
bonniot: I had some problems with relative classpath under Linux (--classpath). It seems that the those are ignored.17:58
Where in the source code could I find the --classpath parsing? I could take a look at at17:59
<bonniot>hi cm18:10
about dispatch methods, if I understand well your idea, it's already done18:11
when it's possible, that is
int vector[]: that's not supported. it's just a legacy, and very confusing I think. why are you asking?18:13
<cm_>Ok, very good. Then you don't have to write an extra layer to pack nicecode into a "java library"
About the vector syntax: No particular reason. It is supported in Java so...
I agree about the confusing syntax. Is is even possible to write: int[] vector[]18:14
<bonniot>it's one of those things we can afford to drop without much problem18:15
making the language cleaner
how are you using --classpath?18:18
I tried 'nicec --classpath tmp test', that works fine
<cm_>../xyz I think. I did go around the problem but I can try the relative paths again18:22
<bonniot>'nicec --classpath foo:../Nice-CVS/tmp test' is working too18:24
so if you can find a case it doesn't work, I'm interested
<cm_>Very strange. I can't make it fail. I might be mistaken18:31
<bonniot>that should be good news :-)18:32
<cm_>A minor thing: Define println for zero arguments as in PrintWriter 18:39
I have a problem. A have a matrix class Matrix. I have defined the following:18:46
double[] get(Matrix m , int row) = m.getArray()[row];
<CIA-7>03bonniot * 10Nice/web/manual.xml: 18:47
Updated "Using Nice from Java" section, now that most methods are compiled
as instance methods.
<cm_>But know I want to define set. When issuing the following: m1[0]= [1,2]; I get this error message:
No possible call for set.
Arguments: (Jama.Matrix, nice.lang.byte, <t99 | nice.lang.byte <: t99, nice.lang.byte <: t99> t99[])
Why is the first argument Jama.Matrix and not double[]?18:48
<bonniot>x[y]=y is syntactic sugar for set(x,y,z)18:50
so the first arg is m1, a Matrix
what do you mean by [1,2] ?18:51
it's an array of two elements, 1 and 2, is that what you want?
<CIA-7>03arjanb * 10Nice/stdlib/nice/lang/java-io.nice: Added println() function.18:52
<cm_>m1[0]= [1,2]. I want replace row zero with the new row [1,2]
Isn't [1,2] a suger for T[]?
eg, new int[] {1,2]18:53
] -> }
<bonniot>i see
why tpye do you give to set?18:55
what type
Matrix has no type parameter though
<bonniot>i mean the full type of the method
<cm_>ok, double[] set(Matrix m, int r, double[] row)18:59
The assignment suger seems to be confusing:19:01
<bonniot> let m = new Matrix(array: [[]]);
m[0] = [1,2];
<cm_>double[] set(Matrix m, int r, double[] row) {
for (int i=0; i<row.length; i++) {
double[][] tmp= m.getArray();
// Ok
tmp[r][i]= row[i];
<bonniot>that works for me
<cm_> // Error
m.getArray()[r]= row[i];
return row;
As you can see isn't m.getArray()[r]= row[i] ok
As this isn't defined: (nice.lang.double[][], nice.lang.int, nice.lang.double)19:02
Operator overloading is complicated and particular for assignments19:03
<arjanb>shouldn't it be m.getArray()[r][i] = row[i] ?19:04
<cm_>Yes of course - my mistake
<bonniot>so there is no problem?19:06
<cm_>No but thanks19:07
It would be nice if you could defined sliceoperators as in eg Matlab. Example:19:09
m[:,1] the first column, m[1,:] the first row19:10
With some syntax19:11
<bonniot>is that much better than m.col(1) and m.row(1) ?19:13
<cm_>Syntactic no but that is problematic for sparse matrices19:14
(btw, you could simply implement set by m.getArray()[r] = row; if it's ok/desired to share the array)19:15
<cm_>m[1,:]= 0 for example. Imagine a huge sparse matrix then you have to make a copy of that row19:16
with the m.col(.) syntax
I guess that there are other problems as well19:17
<bonniot>if m[1,:] is a row, what does m[1,:]= 0 mean?
<cm_>Zeros for all entries in that row19:18
A package written in c for python, Numeric python, has splice operators. It is quite popular for numeric analysis
<bonniot>have you seen Bryn's post of nice-info?19:19
<cm_>no, where can I find it?19:20
<bonniot>it describes splice operators that work on ranges
you can see the archives on gmane
hum, you have to image @ where <at> is written19:22
you could make definitions so that19:24
m[row(1)] = x and m[col(1)] = x do what you want them to do
<cm_>Thanks! So it is even possible to overload '..'19:26
<cm_>I guess that you could override get as: get ((Range,Range)) so you could write m[(..,1..2)] for example19:40
It would be nice if the tuple could be omitted though19:41
<bonniot>you can do that, exactly19:42
<cm_>Ok but not as get(Range,Range)?19:44
<bonniot>if you want to use get you can do anything19:45
with [ ] there can only be one value, so you need the tuple
i guess we could explore if allowing [x,y,z] as a shorthand for [(x,y,z)] poses any problem19:47
actually it could be m[x,y,z] --> get(m, x, y, z)19:48
so there is no tuple involved at all
<cm_>Or make it possible to define [] for arbitrary number of arguments?
<bonniot>that it, right?
yes, no just 2 or 3, any number, provided you have defined a relevant get method19:49
<cm_>Exactly, I missed that prior posting
<bonniot>the joys of chat :-)19:50
The telephone is still superior when communicating despite it was invented a long time ago19:51
<bonniot>it depends, you don't log it as easily...19:52
<cm_>The paradox of technology progess
Got to go but the general [] method would make my day ;-) See you later19:53
* cm_ leaves19:56
<arjanb>i could do that
btw what do you think of allowing underscores in number literals?20:01
<bonniot>is that a widespread practice?20:03
it seems like there is no ambiguity, so it should work ok20:04
i leave it to you then...
<arjanb>i have seen it various newer language to make large numbers more readable20:06
<bonniot>yes, that makes sense20:07
<arjanb>what are the release plans?20:11
<bonniot>it might be tomorrow20:13
<CIA-7>03arjanb * 10Nice/ (4 files in 4 dirs): Allow underscores in literal numbers.20:21
03arjanb * 10Nice/src/bossa/ (syntax/assign.nice syntax/tools.nice parser/Parser.jj): Make multi argument 'array' indexing possible.21:10
03bonniot * 10Nice/web/Makefile: 21:11
Create the PDF version of the manual using fop, since xmlto is broken at the
03bonniot * 10Nice/web/Makefile: Create the PS version of the manual from the PDF version using pdftops.21:20
* CIA-7 leaves23:33
* CIA-9 joins
* CIA-9 leaves
* CIA-7 joins23:34

Generated by Sualtam