[fossil-users] minor milestone: using file/stdin as POST data for json mode

2011-10-02 Thread Stephan Beal
Hi, all! Out of the long/divergent "Java" thread (which wasn't really about Java, it turns out), a new capability has been born - we can now use files as POST data for JSON mode. This takes us one step further towards removing some of the minor arg-handling differences between CLI and HTTP modes..

Re: [fossil-users] minor milestone: Java client

2011-10-02 Thread Stephan Beal
On Sun, Oct 2, 2011 at 2:22 PM, Stephan Beal wrote: > How's this look... a first prototype at feeding POST data in via CLI > mode... > And here's a second attempt, the major improvement being that the command to run can be specified in the POST data: [stephan@cheyenne:~/cvs/fossil/fossil-json]

Re: [fossil-users] minor milestone: Java client

2011-10-02 Thread Stephan Beal
On Sat, Oct 1, 2011 at 3:07 PM, Paul Ruizendaal wrote: > Isn't "fossil cgi" already doing that? A front-end could build the > appropriate environment variables and fork/exec "fossil cgi", feeding the > post body to fossil's stdin. > How's this look... a first prototype at feeding POST data in vi

Re: [fossil-users] minor milestone: Java client

2011-10-02 Thread Stephan Beal
2011/10/2 Lluís Batlle i Rossell > messages to this list. I invite someone understanding clearly blob.c to > review those, because I might have understood something wrong there. > blob.c was actually the first code from fossil i studied really deeply (coming from the world of C++, i was amazed t

Re: [fossil-users] minor milestone: Java client

2011-10-02 Thread Lluís Batlle i Rossell
On Sun, Oct 02, 2011 at 12:43:25PM +0200, Stephan Beal wrote: > They can be forgotten because of exit(), not fork(). fork() will duplicate > leaked memory but exit() will clean it up. Well, I meant that. > I just wanted to state the difference about those and the 'annotate > > leak'. > > > > Ye

Re: [fossil-users] minor milestone: Java client

2011-10-02 Thread Stephan Beal
2011/10/2 Lluís Batlle i Rossell > Well, those are exactly the kind of leaks that can be forgotten about, > thanks to > fork(). They can be forgotten because of exit(), not fork(). fork() will duplicate leaked memory but exit() will clean it up. I just wanted to state the difference about tho

Re: [fossil-users] minor milestone: Java client

2011-10-02 Thread Lluís Batlle i Rossell
On Sun, Oct 02, 2011 at 12:33:08PM +0200, Stephan Beal wrote: > 2011/10/2 Lluís Batlle i Rossell > > > As for leaks, the memory leak about annotate was at every checkin > > traversed, > > though. Does the change in that branch look fine for a merge? > > > Just to be clear - that's not the only

Re: [fossil-users] minor milestone: Java client

2011-10-02 Thread Stephan Beal
2011/10/2 Lluís Batlle i Rossell > As for leaks, the memory leak about annotate was at every checkin > traversed, > though. Does the change in that branch look fine for a merge? Just to be clear - that's not the only leak in fossil. There many, many places where resources are left to be cleaned

Re: [fossil-users] minor milestone: Java client

2011-10-02 Thread Lluís Batlle i Rossell
On Sun, Oct 02, 2011 at 11:58:33AM +0200, Joerg Sonnenberger wrote: > On Sat, Oct 01, 2011 at 11:22:28PM +0200, Paul Ruizendaal wrote: > > Doing fork/exec sounds expensive, but on a posix box there is not much > > difference between that and spawning a thread: > > http://bulk.fefe.de/scalable-netwo

Re: [fossil-users] minor milestone: Java client

2011-10-02 Thread Stephan Beal
On Sun, Oct 2, 2011 at 11:58 AM, Joerg Sonnenberger wrote: > On Sat, Oct 01, 2011 at 11:22:28PM +0200, Paul Ruizendaal wrote: > > http://bulk.fefe.de/scalable-networking.pdf > > Please don't base decisions on questionable micro-benchmarks. fork+exec > is significantly more expensive than thread

Re: [fossil-users] minor milestone: Java client

2011-10-02 Thread Lluís Batlle i Rossell
On Sat, Oct 01, 2011 at 09:55:36AM -0400, Richard Hipp wrote: > On Sat, Oct 1, 2011 at 9:07 AM, Paul Ruizendaal wrote: > > > > > > after every command fossil runs, exit() is called somewhere, which makes > > it difficult or impossible to chain commands together in the same app > > session. > > >

Re: [fossil-users] minor milestone: Java client

2011-10-02 Thread Lluís Batlle i Rossell
On Sat, Oct 01, 2011 at 03:07:52PM +0200, Paul Ruizendaal wrote: > > Maybe you could do some http-over-stdin/stdout, and speak json there. :) > > Isn't "fossil cgi" already doing that? A front-end could build the > appropriate environment variables and fork/exec "fossil cgi", feeding the > post

Re: [fossil-users] minor milestone: Java client

2011-10-02 Thread Joerg Sonnenberger
On Sat, Oct 01, 2011 at 11:22:28PM +0200, Paul Ruizendaal wrote: > Doing fork/exec sounds expensive, but on a posix box there is not much > difference between that and spawning a thread: > http://bulk.fefe.de/scalable-networking.pdf Please don't base decisions on questionable micro-benchmarks. for

Re: [fossil-users] minor milestone: Java client

2011-10-02 Thread Stephan Beal
On Sat, Oct 1, 2011 at 11:22 PM, Paul Ruizendaal wrote: > ...Yes, and this is what any wrapper program can do. For example, there are > folks that would like to have Tcl/Jim with Fossil, I would prefer Javascript > (me, too, but don't tell anyone ;) Doing fork/exec sounds expensive, but on a po