Hello, everyone.
I've been thinking about some stuff these days, and I'd like to see what you think about it. I didn't give it much thought yet, so it may be that someone will readily point out why it is not a good idea and move on, so I decided to post before giving any deeper research to the problem.
Right now, whenever the user opens a new empty instance of geany, geany checks out to see if the FIFO exists, and if it does, it asks the user what to do, if it should skip launching or if it should delete the pipe and open.
But I think asking the user is rather annoying, and would like to give Geany the ability to try to connect to the pipe, send a ping message wait for, say, 3 or 5 seconds (enough time for a process to reply a pipe ping message) and if it doesnt reply, deletes the pipe and runs itsel. If it does reply, we skip launching and raise the old instance.
Of course we would be trading the annoyance of asking the user for the annoyance of the time spent in the ping wait, and adding more code to the base (which could have its own bugs). But I think the code increase is not really significant (a select() could do it, in posix at least) and the time the user would take to read and answer the message box would be pretty much the same that Geany would take to check if the pipe is "alive".
I am still in doubt wether this can be achieved easily in windows (I remind reading somewhere last week that windows' select() only applies to winsocks file descriptors...bummer) and don't know what you guys think of it, hence I did not do any work on this matter.
Regards, Alexandre Moreira.
2006/7/24, Alexandre Moreira alexandream@gmail.com:
Hello, everyone.
I've been thinking about some stuff these days, and I'd like to see what you think about it. I didn't give it much thought yet, so it may be that someone will readily point out why it is not a good idea and move on, so I decided to post before giving any deeper research to the problem.
Right now, whenever the user opens a new empty instance of geany, geany checks out to see if the FIFO exists, and if it does, it asks the user what to do, if it should skip launching or if it should delete the pipe and open.
But I think asking the user is rather annoying, and would like to give Geany the ability to try to connect to the pipe, send a ping message wait for, say, 3 or 5 seconds (enough time for a process to reply a pipe ping message) and if it doesnt reply, deletes the pipe and runs itsel. If it does reply, we skip launching and raise the old instance.
Of course we would be trading the annoyance of asking the user for the annoyance of the time spent in the ping wait, and adding more code to the base (which could have its own bugs). But I think the code increase is not really significant (a select() could do it, in posix at least) and the time the user would take to read and answer the message box would be pretty much the same that Geany would take to check if the pipe is "alive".
I am still in doubt wether this can be achieved easily in windows (I remind reading somewhere last week that windows' select() only applies to winsocks file descriptors...bummer) and don't know what you guys think of it, hence I did not do any work on this matter.
Just to correct myself, I just found out that it is possible to set timeouts in the ReadFile() API call for windows, using Communications Structures (COMMTIMEOUTS) and Communications Functions (SetCommTimeouts), so the question is not about the achievability of the feature in Win32 anymore, but on the actual merits of the feature.
Regards, Alexandre Moreira
PS: I can really thank the Geany project, for giving me reason to learn a bit about Windows programming (lol). Learning is never too much.
Regards,
Alexandre Moreira.
On Mon, 2006-07-24 at 13:49 -0300, Alexandre Moreira wrote:
Right now, whenever the user opens a new empty instance of geany, geany checks out to see if the FIFO exists, and if it does, it asks the user what to do, if it should skip launching or if it should delete the pipe and open. But I think asking the user is rather annoying, and would like to give Geany the ability to try to connect to the pipe, send a ping message wait for, say, 3 or 5 seconds (enough time for a process to reply a pipe ping message) and if it doesnt reply, deletes the pipe and runs itsel. If it does reply, we skip launching and raise the old instance.
so the question is not about the achievability of the feature in Win32 anymore, but on the actual merits of the feature.
As an user, i think these 2 choices are choices between 2 evil.
From my point of view the pro and cons of asking the user.
Pro: - User only have to click and Geany starts Cons: - User _must_ click something before Geany starts - User might be confused why its necessary to answer such question and what it means.
From my points of view the pro and cons of the delay.
Pro: - No more dialog at start-up after a crash Cons: - User might be confused why Geany is not responsive at start-up (after a crash)
Now consider the main user target group (at-least that is what i assume, correct me if i am wrong on this) are mostly programmers or at least more experienced computer users. I think the cons of the dialog is not necessary 'confusing' and better than a delay where Geany is 'idle'.
As a suggestion, perhaps you could merge these 2 ideas. Instead of a dialog which needs input. Change it into a dialog with a message Geany is trying to connect to the existing FIFO with a "cancel" button which deletes the current FIFO and starts up, or wait where after X seconds (display count down perhaps to inform the user how long left) of time out and not able to reconnect to existing FIFO and delete it and make a new one.
Regards,
Nex
On Mon, 24 Jul 2006 19:44:48 +0200, Nexu nexu.jin@gmail.com wrote:
Hi,
Wow, so much thoughts, thank you guys for thinking about improving Geany.
Now consider the main user target group (at-least that is what i assume, correct me if i am wrong on this) are mostly programmers or at least more experienced computer users. I think the cons of the dialog is not necessary 'confusing' and better than a delay where
I agree, that the target group are more experienced users(but not all) and so the dialog is not that bad. I don't like the idea of the ping very much, then we get mailings like "Geany hangs on startup". By the way, the fact that an IDE is mostly used by programmers is so nice for us, I noticed it from the beginning, nearly every bug report was more detailed and descriptive than I ever expected it. This is so cool ;-).
As a suggestion, perhaps you could merge these 2 ideas. Instead of a dialog which needs input. Change it into a dialog with a message Geany is trying to connect to the existing FIFO with a "cancel" button which deletes the current FIFO and starts up, or wait where after X seconds (display count down perhaps to inform the user how long left) of time
This idea i like very much and I think this is the way it will be.
Again by the way: Alexandre, can you tell us something about your mentioned game server project? I'm curious about it.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
2006/7/24, Enrico Tröger enrico.troeger@uvena.de:
On Mon, 24 Jul 2006 19:44:48 +0200, Nexu nexu.jin@gmail.com wrote:
Hi,
Wow, so much thoughts, thank you guys for thinking about improving Geany.
Now consider the main user target group (at-least that is what i assume, correct me if i am wrong on this) are mostly programmers or at least more experienced computer users. I think the cons of the dialog is not necessary 'confusing' and better than a delay where
I agree, that the target group are more experienced users(but not all) and so the dialog is not that bad. I don't like the idea of the ping very much, then we get mailings like "Geany hangs on startup". By the way, the fact that an IDE is mostly used by programmers is so nice for us, I noticed it from the beginning, nearly every bug report was more detailed and descriptive than I ever expected it. This is so cool ;-).
As a suggestion, perhaps you could merge these 2 ideas. Instead of a dialog which needs input. Change it into a dialog with a message Geany is trying to connect to the existing FIFO with a "cancel" button which deletes the current FIFO and starts up, or wait where after X seconds (display count down perhaps to inform the user how long left) of time
This idea i like very much and I think this is the way it will be.
Again by the way: Alexandre, can you tell us something about your mentioned game server project? I'm curious about it.
Oh, Sorry about that, I answered the Nexu message privately to him for I didn't want to flood it here (thinking that wouldn't be of much interest of the Geany developpers)
But there it goes. Its not much, I tell you.
I have been thinking a lot about creating a MMORPG server for the past months, and then started designing an outline for it. So far it is in early stages, for I basically have no code, only a lot of design alternatives, brainstorms and notes on my note book (You know, that thing with lots of pages made of dead trees ? I still use them).
Basically today it is in a shape that I can start coding. Unfortunately I believe it is only me who can start working on it right now because the biggest part of the project is in my maniac head (I spend too much time in commute everyday, so I tend to think a lot about the project). And then, I have not much time to program at home with college and work and everything, so it is developping veeeeery slowly.
So there is no "real" project yet, and the project isn't going to become anything useful anytime soon (since after having the server I would still need to gather a group to help developping a client out of it). But my plan is to develop a server of a small community (much like the guys at Eternal-lands have right now) and evolve it with the time.
If anyone is interested in the project I can give more details about ideas and architecture of the system and we can discuss them. I would love to have someone at least to listen to some of my ideas and tell me whenever I am just being too mad ;)
Regards, Alexandre Moreira.
PS: While I have a sourceforge account for the project (namely, Nutshell.sf.net) I don't have anything there yet.
PPS: The project is being developped in C++, and it took me quite some time in modelling since I am using it for learning OO.
Regards,
Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
Geany mailing list Geany@uvena.de http://uvena.de/cgi-bin/mailman/listinfo/geany
On Mon, 24 Jul 2006 16:10:13 -0300, "Alexandre Moreira" alexandream@gmail.com wrote:
Hey,
alternatives, brainstorms and notes on my note book (You know, that thing with lots of pages made of dead trees ? I still use them).
lol. Very nice, finally I know what happened to the forest in front of my window.
If anyone is interested in the project I can give more details about ideas and architecture of the system and we can discuss them. I would love to have someone at least to listen to some of my ideas and tell me whenever I am just being too mad ;)
Just create a mailing list(e.g. on sf.net) and invite some people, make a simple webpage with some basic information and it will go on.
Thanks for the detailed information.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
On Mon, 24 Jul 2006 22:03:24 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Mon, 24 Jul 2006 16:10:13 -0300, "Alexandre Moreira" alexandream@gmail.com wrote:
Hey,
alternatives, brainstorms and notes on my note book (You know, that thing with lots of pages made of dead trees ? I still use them).
lol. Very nice, finally I know what happened to the forest in front of my window.
The one I had in front of my window just got reduced to wood pieces to burn in an incinerator and make space to build more buildings.
Off-topic, I know, but it still hurts.
khaqq