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

* bonniot joins08:44
* arjanb joins08:45
hello daniel
<bonniot>hello arjan08:46
<arjanb>can access the cvs tree
can you?
<bonniot>i'll try08:47
sf seems hic-hupsy these days
<arjanb>cvs server: Updating Nice08:48
cvs server: failed to create lock directory for `/cvsroot/nice/Nice' (/cvsroot/nice/Nice/#cvs.lock):
Permission denied
<bonniot>i could do a cvs -n update
trying cvs update
same error as yours08:49
i'm reading the site status
of sf
it looks like a locking problem08:51
how long have you been trying?08:52
<arjanb>I got this error the first try
<bonniot>about how long ago was that?
<arjanb>5 minutes08:53
<bonniot>ok, so we can wait some time, to see if the locking problem disapears08:54
otherwise you can submit a support request to sf
do you miss it badly?08:55
are you tring to commit something?
it worked for me08:56
<arjanb>works again and fast08:57
i can update the changelog about enums now
<bonniot>ok08:58
<arjanb>http://nice.sourceforge.net/cgi-bin/twiki/view/Dev/NiceConstructors09:02
<bonniot>i saw09:05
i just added a small question
do you know the answer?09:06
<arjanb>i don't know c#
<bonniot>it seems that users start to use the wiki09:36
if you look at the stats for Doc, there are more views than in Dev (while I think the developers use Dev most of the time)09:37
and it's growing
it's also nice to start having some contributions on the design
<arjanb>yes09:50
a critique of the properties in c#11:15
http://www.geocities.com/csharpfaq/properties.html
* alexgreif joins11:26
hi
<arjanb>hi11:27
<alexgreif>yesterday I compiled flow4j with the old nice.jar :( I used ant, and forgot to change the nice.jar in the lib folder. I will recompile this evening again, and tell you the results
btw, the source dist from flow4j includes the shell script to recompile it via ant. the command is:11:28
./build.sh dist
* alexgreif leaves11:29
<arjanb>the cvs server has still hic-ups :-(11:59
there are already a dozen supports request reporting the same problem12:04
<bonniot>so no need for a new one12:08
ahve you read the status page. i think it explains why
the increased the output of pserver, but i think that makes ssh fail more often again12:09
anyway, it seems working after trying one or two times
i'm not sure i agree with most of the critiques on the page you linked
the only "high-level" one is the code that breaks when changing a field to a property12:10
that's bad, but I think it only happens because of the ref parameters, which we don't have natively
the rest of his point is that it is better for the user to know if you are using a property or a field12:11
it might be true in certain rare cases, where you care about lowlevel implementation
but i think in general programming languages are about providing abstractions and hiding details12:12
his arguments were also used in favor of assembler against C or other higher level languages
<arjanb>had phone12:15
yes the critique is not very good
one issues with c# properties is that the properties has a different name as the field it's hiding12:17
class X {12:20
int foo = 0;
}
class Y extends X {
int Foo {
get {return foo;}
set {foo = value;}
}
now you have 2 way to access that field so that is confusing
Y y = new Y();12:21
y.foo = 3; y.Foo = 3;
so you have to choose properties or not in the base class and that's not good12:23
<bonniot>yeah, that's not clean12:25
i have to log out to change some config12:44
<arjanb>i really have to go now13:21
i will think about contructors and properties in the weekend13:22
cu
* bonniot joins14:10
* bonniot joins14:27
* alexgreif joins19:57
* bonniot joins20:09
<alexgreif>hi!
<bonniot>hi
<alexgreif>im just writing a mail to you :)
<bonniot>do you have an idea what is wrong with the plugin?
(you can finish writing first)20:10
<alexgreif>i did :)
and sent it
<bonniot>got it
<alexgreif>what do you mean with wrong?20:11
<bonniot>that errors are not reported in the Problems view
<alexgreif>with the plugin? you mean the probl with the properties?
not even with version 3.0?
<bonniot>no. the problems view exists, but nothing goes there, nor anywhere
<alexgreif>on my eclipse its fine.20:12
strange, maybe its becaise the alpha version
<bonniot>i know!
i think we have exactly the same version
of eclipse
20030605173720:13
<alexgreif>hmm. I have to get to bed, then I have a clear mind of it
look at...
<bonniot>maybe i should debug it, since it does not happen on your computer20:14
<alexgreif>Help -> about eclips platform -> conf details
maybe there are some problems reported
I have Version: 2.1.0
Build id: 200306051737
<bonniot>the same
AH, this is were the messages go!!!20:15
<alexgreif>have you built it from scratch?
<bonniot>I knew they had to go somewhere :-)
<alexgreif>yes this is the internal log :)
beware... dont keep it open, the it may be deleted!
I had a time when it was empty, after I had it open, abd it wnted to log to it20:16
<bonniot>what may be deleted?
org.eclipse.core.internal.resources.ResourceException: Resource /Sualtam/in.nice does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:302)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:174)
at org.eclipse.core.internal.resources.Resource.createMarker(Resource.java:584)
at net.sf.nice.internal.core.builder.NiceBuilder$NicePluginCompilationListener.error(NiceBuilder.java:138)
<alexgreif>the file with the logs
<bonniot>this is the problem
<alexgreif>whats this??????
<bonniot>it seems the plugin is doing something wrong with the filenames20:17
* /Sualtam/in.nice should be:
* /Sualtam/main.nice
2 characters deleted20:18
* /Sualtam/in.nice
<alexgreif>strange! I ll be back in 1 hour ok?
<bonniot>should be
ok
org.eclipse.core.internal.resources.ResourceException: Resource /Sualtam/tput.nice does not exist.
it should be output
output.nice
again, two characters deleted
<alexgreif>is your project in /Sualtam ?20:19
directly on the root?
<bonniot>yes20:20
so actually it shoud be:
* /Sultam/sualtam/main.nice
the bug must be around here: 20:27
java.lang.StringIndexOutOfBoundsException: String index out of range: -12
at java.lang.String.substring(String.java:1525)
at java.lang.String.substring(String.java:1492)
at net.sf.nice.internal.core.builder.NiceBuilder$NicePluginCompilationListener.error(NiceBuilder.java:135)
the substring indexes are wrong20:28
<alexgreif>we will debug it later :))20:33
I know :20:35
location.getFile() returns the absolute path :(
I would need zthe relative from the project folder, then I dont need the substring20:36
greetings from my wife!20:46
daniel?20:47
to display the error in the problems view, I need the path of the resource (the buggy file). But eclipse needs the relative path of the resource beginning from the project folder.20:49
<bonniot>kez?t csokolom!20:50
ok
cannot you extract the relative path from the complete path?
<alexgreif>she says: isnt he charming???
she means you, daniel!
<bonniot>magyarul beszel?20:51
<alexgreif>I wanted to do it with substring
no
<bonniot>:-(
<alexgreif>but german :)
I took the rest of the full path from the end of the project path20:52
<bonniot>ach, ich habe alles vergessen!
<alexgreif>das war gut!
j'ai oubliee tout20:53
<bonniot>mais non!
<alexgreif>je peus parler un peut, parce qui j#etait des lessions francais a l#ecole :)20:54
<bonniot>ich auch, auf deutch20:55
<alexgreif>I will upload a debuguung version . canyou test it with that?
...
if you have the project not on the root, is it ok then?20:56
I tell you when its uploaded ...
<bonniot>where else can it be?
now i have ~/workspave/Sualtam/sualtam/main.nice
<alexgreif>yes , this should be fine, test it20:57
<bonniot>that's what fails with the current plugin
the code is:
location.getFile().substring(projectPath.length())
right?
<alexgreif>yes
I think so
<bonniot>project path in this case is ~/workspave/Sualtam ?20:58
<alexgreif>yes, I post a new version in a moment with debug statements........
<bonniot>I think the problem is that the compiler uses ~ when it can to replace the property user.home 20:59
so ~ is only one character21:00
while /home/daniel is 12
<alexgreif>may be I have to use getAbsolutePath() for the project
<bonniot>i think the proble is the ~
<alexgreif>with getAbsPath it will be gone :)21:01
<bonniot>no
it is in Location that the ~ is
<alexgreif>opps21:02
In my test it was alwasy the absolute path in Location, so I thought the nicec converts always to abs path
<bonniot>it might be an architecture difference21:03
did you test on OS X or win32?
where is your workspace located in the filesystem?
<alexgreif>OS X21:04
* /Volumes/data/app/eclipse/runtime-workspace
<bonniot>Ah, so it is not in your home
you can see your home in the COnfiguration details in eclipse21:05
for me: user.home=/home/daniel
thinking...
<alexgreif>user.home=/Users/agreif21:07
<bonniot>but you don't put your workspace there
<alexgreif>no
<bonniot>on your side, you can do the following:21:09
test if the first character is ~
if it is, then rebuild a string with
getProperty("user.home") + file.substring(1)
then proceed as before
<alexgreif>no, Im operating with absolute paths, the File classs can convert everything to it21:10
<bonniot>i don't think it understands ~
<alexgreif>I think so :)
we will see
<bonniot>ok, you can try. we'll see...
<alexgreif>:)21:11
<bonniot>:-)
<alexgreif>http://flow4j.sf.net/nice_plugin.tgz
<bonniot>System.out.println(new File("~/tmp").getAbsolutePath());21:12
<alexgreif>oops, wait! I did not save the file!!!
<bonniot>prints: /home/daniel/Nice/classes/~/tmp
which means that File does not handle ~ as a special character
did you send the old version?21:13
<alexgreif>no, an intermediate
<bonniot>what did you change?
<alexgreif>String projectPath = getProject().getLocation().toFile().getAbsolutePath();21:14
String resourcePath = new File(location.getFile()).getAbsolutePath();
<bonniot>it won't work
see above
you need to handle ~ yourself21:15
<alexgreif><bonniot> which means that File doecannot nicec give me all the time absolute paths?
cannot nicec give me all the time absolute paths?21:16
<bonniot>i have to think about that. it has implications, because the information is also use to add location information in the bytecode21:18
i will probably change, but it needs some time to check what is best
<alexgreif>yes
<bonniot>in the mean time, please handle ~, it's only two more lines :-)21:19
<alexgreif>you could clone the Location object and reset the file path to absolute for the error notofocatiobn
one last test21:20
http://flow4j.sf.net/nice_plugin.tgz
I need the output for :21:21
projectPath:
resourcePath:
rel.resourcePath:
<bonniot>downloading...21:23
shouldn't it be:21:24
/home/daniel/workspace/Sualtam
for projectPath ?
what is resourcePath?
<alexgreif>it should be /home/daniel/eclipse/workspace/Sualtam21:25
workspace is always in the eclipse install dir
<bonniot>not for me
<alexgreif>ok
<bonniot>it is in my home dir
<alexgreif>resourcePath is the path of the buggy file
<bonniot>i think it is a safer installation, where every user has a separate workspace
<alexgreif>absolut path
yes if you have a multiuser pc21:26
is it blanche?
<bonniot>yes. every machine should be multiuser :-)21:27
<alexgreif>why does Location.getFile() return a String and not File?
<bonniot>!ENTRY net.sf.nice.core 1 1 Jun 20, 2003 21:26:18.83
!MESSAGE projectPath: /home/daniel/workspace/Sualtam
!ENTRY net.sf.nice.core 1 1 Jun 20, 2003 21:26:18.84
!MESSAGE resourcePath: /home/daniel/~/workspace/Sualtam/sualtam/main.nice
!ENTRY net.sf.nice.core 1 1 Jun 20, 2003 21:26:18.89
!MESSAGE rel.resourcePath: am/sualtam/main.nice
so: you need to replace ~ by user.home :-)21:28
<alexgreif>ok, you won :)
why does Location.getFile() return a String and not File?
<bonniot>yes, maybe that would be the cleanest21:29
<alexgreif>I hate string operations
cant you change it?21:30
<bonniot>it's not so easy, because the source might not come from a file21:36
for instance, it can be an entry inside a jar file
<alexgreif>ok
upload...21:38
my mac is multiuser too, but its only ma who uses it.21:39
http://flow4j.sf.net/nice_plugin.tgz
you can get it21:40
<bonniot>:-)
did you change the version number?21:41
<alexgreif>not yet, warning is not fixed yet
make the test with the eror case, if its fine then Ill change the version number
<bonniot>org.eclipse.core.internal.resources.ResourceException: Resource /Sualtam/am/sualtam/main.nice does not exist.21:42
<alexgreif>:(21:43
<bonniot>!MESSAGE projectPath: /home/daniel/workspace/Sualtam
!ENTRY net.sf.nice.core 1 1 Jun 20, 2003 21:42:17.356
!MESSAGE resourcePath: /home/daniel/~/workspace/Sualtam/sualtam/main.nice
!ENTRY net.sf.nice.core 1 1 Jun 20, 2003 21:42:17.358
!MESSAGE rel.resourcePath: am/sualtam/main.nice
<alexgreif>its the same as before21:44
<bonniot>how can i be sure i am runiing the new version?
<alexgreif>-rw-r--r-- 1 agreif staff 1740800 Jun 20 21:38 nice_plugin.tgz
http://flow4j.sf.net/nice_plugin.tgz21:47
I forgot to move it on sf :(
sorry
<bonniot>please change the version number each time, it will help being sure
<alexgreif>ok
<bonniot>btw, are you sure you are gzip compressing the plugin?
if not, it should be called .tar
(or you should compress it)
i'm going to have dinner...21:48
<alexgreif>you are right is only tar
ok
version 0.0.8 is up, warnings should work now too21:56
http://flow4j.sf.net/nice_plugin.tgz its a gzip now :)
on errors the output is still logged21:57
please mail me whether the test was successful. Im going to bed. cu22:54
* alexgreif leaves
* alexgreif joins23:18
<bonniot>hello alex23:43
are you back from bed? :-)23:44
<alexgreif>hi
Im just surfing around , but in bed :))
Im thinking:23:45
<bonniot>i got the plugin report the error in the Problems view once
yes?
<alexgreif>there is a package iText that creates PDF documents via an java api. Im thinking how I can use it, and may be combine it with nice and servlets23:46
is it now working , the plugin?
<bonniot>what would be the goal?
it worked once
<alexgreif>and twice?
<bonniot>and it could click on the problem, and it would highlight the right line
if I double clicked, it set the cursor to the line just after23:47
(not dramatic!)
but now it is producing NullPointerExceptions
<alexgreif>I also realizet that
oops
where?
<bonniot>the getFile of location seems to return null sometimes23:48
<alexgreif>mit ettel? finom volt?
<bonniot>in getAbsolutePath
<alexgreif>oh, this is my new function:23:49
<bonniot>so you should program defensively, and be ready to accept a null value
(for instance, if you compile a package that does not exist, there is no file location to report)
<alexgreif>ah ok23:50
then the resource is the project and not sa file
<bonniot>halat es krumplit ettem. es Tokaj bort. finom!
?
<alexgreif>halaszle?
<bonniot>new
nem
<alexgreif>every problem is assignet to a resource. so if a file is concerned, then the its a file-resource. If the project has problems like yours, then the problem is assigned to the project-resource.23:52
there are 3 types of resources in nice:
project file folder
resource is an official term in eclipse
was Location null or getFile() ?23:53
<bonniot>getFile
<alexgreif>ok, I fix it...
so the other problem with the ~ is fixed now?23:55
<bonniot>i think so, because it worked once23:57
but this nullpointer is strange
<alexgreif>ok, make some *normal* bugs like syntax bugs to test the problems view
<bonniot>we'll see what error it is, when the plugin doesn't crash on it
it was a normal syntax error23:58
<alexgreif>so Location != null but only getFile == null ?23:59
<bonniot>yes00:00
i suppose
given the stack trace
but i don't know why
the file should be null only in very specific cases00:01
still, since it can, the plugin should be able to handle that
<alexgreif>Im just changing the code :)00:02
<bonniot>ok :)
<alexgreif>getLine() nad getColumn() are null too if getFile == null ?00:04
<bonniot>they are ints!00:05
<alexgreif>oh sorry :)
its late :)
<bonniot>-1 == none
:-)
<alexgreif>uploading...00:07
<bonniot>it's smaller now that it is compressed :-)
<alexgreif>did not change the version number00:08
-rw-r--r-- 1 agreif staff 1210581 Jun 21 00:06 nice_plugin.tgz
its there.
you have the url?
<bonniot>downloaded already
for the moment it works00:09
i try something else...
interesting:00:11
Severity Description Resource In Folder Location Creation Time
Package nice.lang is not available.
The source path is: /home/daniel/workspace/Sualtam
The package path is: /tmp/martyr-0.3.0/martyr.jar:. Sualtam line -1 June 21, 2003 12:10:31 AM
!!!
at least the error is reported now
<alexgreif>yep, I included the line info :)
<bonniot>-1
<alexgreif>also when nif file is there00:12
<bonniot>i regenerate the compiler
<alexgreif>what happens when you doubleclick?? exception because of -1?
<bonniot>nothing
i think because there is no folder information
<alexgreif>ok, good
<bonniot>thisi s the kind of error without file: nice.lang is not available00:13
i regenerate the compiler
because i overwrite the compiler in the plugin with a newer one
<alexgreif>ok, its not rubust enough, but its written quick and dirty
<bonniot>maybe the one i put was screwed up
yes, that will be different with the Nice version :-)00:14
<alexgreif>YESSSSSSS
I think we can leave it like this, Ind I begin with the nice version. ok?
<bonniot>oh, one trick is that even if i update the compiler, i have to restart eclipse before it's taken into account00:17
so, it seems working well now :-))
<alexgreif>yes, it has no auto reload of plugins
:))) fine, so I go to bed
<bonniot>ok, we can discuss later the development of the new version00:18
<alexgreif>you can open a new workbench then maybe a new vm is forked and the plugins are reloaded
yes
good night!
<bonniot>jo ejt00:19
well done!