[freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Matthew Toseland
On Wednesday 04 Apr 2012 22:39:21 Matthew Toseland wrote:
> On Wednesday 04 Apr 2012 20:31:42 Florent Daigniere wrote:
> > On Wed, Apr 04, 2012 at 12:58:55PM -0300, Marco Schulze wrote:
> > > On 04-04-2012 11:43, Zlatin Balevsky wrote:
> > >>
> > >> The problem of abusing the predicate by performing anything other than  
> > >> logging inside it.
> > >>
> > > I guess that that does improve readability a bit. However, less than 5%  
> > > of the ifs guards anything but Log.*() calls.
> > >
> > >> You cannot get rid of the predicate without introducing side effects  
> > >> as I've demonstrated throughout this thread.
> > >>
> > > By removing the predicate and delegating checks to the logging function,  
> > > a _lot_ of boilerplate code is removed. Ideally, as toad said, Java  
> > > would have some kind macro system enabling the best of both worlds.  
> > > Lacking that, the question becomes: 'is the overhead acceptable?'.
> > >
> > > There have been quite a lot of arguments thrown here. In the end,  
> > > though, as fred is big and complex, the only answer is to write some  
> > > code and actually run the thing. Are varargs bad? Sure. Is the slowdown  
> > > unacceptable? No idea. Just bear with my slowness (or do help), and  
> > > you'll at least have a convincing argument for the next fool in the line.
> > >
> > 
> > You're the one who should try to convince us to merge your jumbo patch...
> > 
> > If your proposed solution is not faster than the existing code, you'd
> >  better come up with a solid and representative benchmark showing that
> >  the difference is not significant. If your 'solution' is trading 'jar
> >  size' and 'readability' against run-time performance (for the common
> >  case assuming logNORMAL), we won't merge it. Freenet is slow enough
> >  as is.
> > 
> > Hint: your doing it wrong, the one way to make it faster and nicer is to
> >  use dependancy injection
> 
> You mean patching the bytecode at load time? That's an interesting idea, 
> what's the overhead likely to look like?
> 
I think db4o includes a library for doing such things ... so we may not even 
need any new dependancies for it.
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20120404/c3c16b2b/attachment.pgp>


Re: [freenet-dev] GsoC - FCP Library

2012-04-04 Thread Israel Leiva

El 03/04/12 11:08, Matthew Toseland escribió:
The python module is used in some important tools, so in principle 
this is a good thing. I'm not competent to review Perl code, maybe we 
can find somebody who is though. Generally we don't accept prior work 
as proof that a student can code, but if it's freenet-specific then 
maybe ... 


Alright. Here is a simple demo of what I thought for the FCP2 Perl library.

http://csrg.cl/~ileiva/gsoc/

The directory includes (all files were renamed to .txt so you could read 
it online):


client.pl.txt-- Simple use of FCP2 Perl library
Freenet/FCP2.pm.txt --  FCP2 Perl Module (demo)
Freenet/FCP2/Message.pm.txt -- Message interface for FCP2 Module (demo)
Freenet/FCP2.pod.txt -- Documentation for FCP2.pm
Freenet/FCP2-Message.pod.txt -- Documentation for FCP2/Message.pm Module 
(demo)

output.txt -- Results for the use of client.pl
readme.txt -- You should read this if you want to try this Library at 
your own

Freenet-FCP2-demo.tar.gz -- All the files

Note: Documentation files should be readed with _perldoc_ . Look at the 
readme.txt for more details.


I'm open to suggestions/ideas/comments.

Best Regards.
--
Israel Leiva
___
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl


[freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Matthew Toseland
On Wednesday 04 Apr 2012 20:31:42 Florent Daigniere wrote:
> On Wed, Apr 04, 2012 at 12:58:55PM -0300, Marco Schulze wrote:
> > On 04-04-2012 11:43, Zlatin Balevsky wrote:
> >>
> >> The problem of abusing the predicate by performing anything other than  
> >> logging inside it.
> >>
> > I guess that that does improve readability a bit. However, less than 5%  
> > of the ifs guards anything but Log.*() calls.
> >
> >> You cannot get rid of the predicate without introducing side effects  
> >> as I've demonstrated throughout this thread.
> >>
> > By removing the predicate and delegating checks to the logging function,  
> > a _lot_ of boilerplate code is removed. Ideally, as toad said, Java  
> > would have some kind macro system enabling the best of both worlds.  
> > Lacking that, the question becomes: 'is the overhead acceptable?'.
> >
> > There have been quite a lot of arguments thrown here. In the end,  
> > though, as fred is big and complex, the only answer is to write some  
> > code and actually run the thing. Are varargs bad? Sure. Is the slowdown  
> > unacceptable? No idea. Just bear with my slowness (or do help), and  
> > you'll at least have a convincing argument for the next fool in the line.
> >
> 
> You're the one who should try to convince us to merge your jumbo patch...
> 
> If your proposed solution is not faster than the existing code, you'd
>  better come up with a solid and representative benchmark showing that
>  the difference is not significant. If your 'solution' is trading 'jar
>  size' and 'readability' against run-time performance (for the common
>  case assuming logNORMAL), we won't merge it. Freenet is slow enough
>  as is.
> 
> Hint: your doing it wrong, the one way to make it faster and nicer is to
>  use dependancy injection

You mean patching the bytecode at load time? That's an interesting idea, what's 
the overhead likely to look like?
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20120404/3a94ab54/attachment.pgp>


[freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Florent Daigniere
On Wed, Apr 04, 2012 at 12:58:55PM -0300, Marco Schulze wrote:
> On 04-04-2012 11:43, Zlatin Balevsky wrote:
>>
>> The problem of abusing the predicate by performing anything other than  
>> logging inside it.
>>
> I guess that that does improve readability a bit. However, less than 5%  
> of the ifs guards anything but Log.*() calls.
>
>> You cannot get rid of the predicate without introducing side effects  
>> as I've demonstrated throughout this thread.
>>
> By removing the predicate and delegating checks to the logging function,  
> a _lot_ of boilerplate code is removed. Ideally, as toad said, Java  
> would have some kind macro system enabling the best of both worlds.  
> Lacking that, the question becomes: 'is the overhead acceptable?'.
>
> There have been quite a lot of arguments thrown here. In the end,  
> though, as fred is big and complex, the only answer is to write some  
> code and actually run the thing. Are varargs bad? Sure. Is the slowdown  
> unacceptable? No idea. Just bear with my slowness (or do help), and  
> you'll at least have a convincing argument for the next fool in the line.
>

You're the one who should try to convince us to merge your jumbo patch...

If your proposed solution is not faster than the existing code, you'd
 better come up with a solid and representative benchmark showing that
 the difference is not significant. If your 'solution' is trading 'jar
 size' and 'readability' against run-time performance (for the common
 case assuming logNORMAL), we won't merge it. Freenet is slow enough
 as is.

Hint: your doing it wrong, the one way to make it faster and nicer is to
 use dependancy injection

Florent



[freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Marco Schulze
My English must be failing me, but I've stressed quite a few times both 
possibilities (way slower vs. acceptably slower), and how far current 
changes are from a testable state. Merging is a very distant possibility.

Regarding dependency injection, I take you mean dynamically replacing 
the Logger, and associated classes? That wouldn't be a representative of 
the final benchmark since there's no lazy evaluation.

On 04-04-2012 16:31, Florent Daigniere wrote:
> On Wed, Apr 04, 2012 at 12:58:55PM -0300, Marco Schulze wrote:
>> On 04-04-2012 11:43, Zlatin Balevsky wrote:
>>> The problem of abusing the predicate by performing anything other than
>>> logging inside it.
>>>
>> I guess that that does improve readability a bit. However, less than 5%
>> of the ifs guards anything but Log.*() calls.
>>
>>> You cannot get rid of the predicate without introducing side effects
>>> as I've demonstrated throughout this thread.
>>>
>> By removing the predicate and delegating checks to the logging function,
>> a _lot_ of boilerplate code is removed. Ideally, as toad said, Java
>> would have some kind macro system enabling the best of both worlds.
>> Lacking that, the question becomes: 'is the overhead acceptable?'.
>>
>> There have been quite a lot of arguments thrown here. In the end,
>> though, as fred is big and complex, the only answer is to write some
>> code and actually run the thing. Are varargs bad? Sure. Is the slowdown
>> unacceptable? No idea. Just bear with my slowness (or do help), and
>> you'll at least have a convincing argument for the next fool in the line.
>>
> You're the one who should try to convince us to merge your jumbo patch...
>
> If your proposed solution is not faster than the existing code, you'd
>   better come up with a solid and representative benchmark showing that
>   the difference is not significant. If your 'solution' is trading 'jar
>   size' and 'readability' against run-time performance (for the common
>   case assuming logNORMAL), we won't merge it. Freenet is slow enough
>   as is.
>
> Hint: your doing it wrong, the one way to make it faster and nicer is to
>   use dependancy injection
>
> Florent
> ___
> Devl mailing list
> Devl at freenetproject.org
> https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl



Re: [freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Matthew Toseland
On Wednesday 04 Apr 2012 22:39:21 Matthew Toseland wrote:
> On Wednesday 04 Apr 2012 20:31:42 Florent Daigniere wrote:
> > On Wed, Apr 04, 2012 at 12:58:55PM -0300, Marco Schulze wrote:
> > > On 04-04-2012 11:43, Zlatin Balevsky wrote:
> > >>
> > >> The problem of abusing the predicate by performing anything other than  
> > >> logging inside it.
> > >>
> > > I guess that that does improve readability a bit. However, less than 5%  
> > > of the ifs guards anything but Log.*() calls.
> > >
> > >> You cannot get rid of the predicate without introducing side effects  
> > >> as I've demonstrated throughout this thread.
> > >>
> > > By removing the predicate and delegating checks to the logging function,  
> > > a _lot_ of boilerplate code is removed. Ideally, as toad said, Java  
> > > would have some kind macro system enabling the best of both worlds.  
> > > Lacking that, the question becomes: 'is the overhead acceptable?'.
> > >
> > > There have been quite a lot of arguments thrown here. In the end,  
> > > though, as fred is big and complex, the only answer is to write some  
> > > code and actually run the thing. Are varargs bad? Sure. Is the slowdown  
> > > unacceptable? No idea. Just bear with my slowness (or do help), and  
> > > you'll at least have a convincing argument for the next fool in the line.
> > >
> > 
> > You're the one who should try to convince us to merge your jumbo patch...
> > 
> > If your proposed solution is not faster than the existing code, you'd
> >  better come up with a solid and representative benchmark showing that
> >  the difference is not significant. If your 'solution' is trading 'jar
> >  size' and 'readability' against run-time performance (for the common
> >  case assuming logNORMAL), we won't merge it. Freenet is slow enough
> >  as is.
> > 
> > Hint: your doing it wrong, the one way to make it faster and nicer is to
> >  use dependancy injection
> 
> You mean patching the bytecode at load time? That's an interesting idea, 
> what's the overhead likely to look like?
> 
I think db4o includes a library for doing such things ... so we may not even 
need any new dependancies for it.


signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Matthew Toseland
On Wednesday 04 Apr 2012 20:31:42 Florent Daigniere wrote:
> On Wed, Apr 04, 2012 at 12:58:55PM -0300, Marco Schulze wrote:
> > On 04-04-2012 11:43, Zlatin Balevsky wrote:
> >>
> >> The problem of abusing the predicate by performing anything other than  
> >> logging inside it.
> >>
> > I guess that that does improve readability a bit. However, less than 5%  
> > of the ifs guards anything but Log.*() calls.
> >
> >> You cannot get rid of the predicate without introducing side effects  
> >> as I've demonstrated throughout this thread.
> >>
> > By removing the predicate and delegating checks to the logging function,  
> > a _lot_ of boilerplate code is removed. Ideally, as toad said, Java  
> > would have some kind macro system enabling the best of both worlds.  
> > Lacking that, the question becomes: 'is the overhead acceptable?'.
> >
> > There have been quite a lot of arguments thrown here. In the end,  
> > though, as fred is big and complex, the only answer is to write some  
> > code and actually run the thing. Are varargs bad? Sure. Is the slowdown  
> > unacceptable? No idea. Just bear with my slowness (or do help), and  
> > you'll at least have a convincing argument for the next fool in the line.
> >
> 
> You're the one who should try to convince us to merge your jumbo patch...
> 
> If your proposed solution is not faster than the existing code, you'd
>  better come up with a solid and representative benchmark showing that
>  the difference is not significant. If your 'solution' is trading 'jar
>  size' and 'readability' against run-time performance (for the common
>  case assuming logNORMAL), we won't merge it. Freenet is slow enough
>  as is.
> 
> Hint: your doing it wrong, the one way to make it faster and nicer is to
>  use dependancy injection

You mean patching the bytecode at load time? That's an interesting idea, what's 
the overhead likely to look like?


signature.asc
Description: This is a digitally signed message part.
___
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Marco Schulze
My English must be failing me, but I've stressed quite a few times both 
possibilities (way slower vs. acceptably slower), and how far current 
changes are from a testable state. Merging is a very distant possibility.


Regarding dependency injection, I take you mean dynamically replacing 
the Logger, and associated classes? That wouldn't be a representative of 
the final benchmark since there's no lazy evaluation.


On 04-04-2012 16:31, Florent Daigniere wrote:

On Wed, Apr 04, 2012 at 12:58:55PM -0300, Marco Schulze wrote:

On 04-04-2012 11:43, Zlatin Balevsky wrote:

The problem of abusing the predicate by performing anything other than
logging inside it.


I guess that that does improve readability a bit. However, less than 5%
of the ifs guards anything but Log.*() calls.


You cannot get rid of the predicate without introducing side effects
as I've demonstrated throughout this thread.


By removing the predicate and delegating checks to the logging function,
a _lot_ of boilerplate code is removed. Ideally, as toad said, Java
would have some kind macro system enabling the best of both worlds.
Lacking that, the question becomes: 'is the overhead acceptable?'.

There have been quite a lot of arguments thrown here. In the end,
though, as fred is big and complex, the only answer is to write some
code and actually run the thing. Are varargs bad? Sure. Is the slowdown
unacceptable? No idea. Just bear with my slowness (or do help), and
you'll at least have a convincing argument for the next fool in the line.


You're the one who should try to convince us to merge your jumbo patch...

If your proposed solution is not faster than the existing code, you'd
  better come up with a solid and representative benchmark showing that
  the difference is not significant. If your 'solution' is trading 'jar
  size' and 'readability' against run-time performance (for the common
  case assuming logNORMAL), we won't merge it. Freenet is slow enough
  as is.

Hint: your doing it wrong, the one way to make it faster and nicer is to
  use dependancy injection

Florent
___
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

___
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl


[freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Marco Schulze
On 04-04-2012 11:43, Zlatin Balevsky wrote:
>
> The problem of abusing the predicate by performing anything other than 
> logging inside it.
>
I guess that that does improve readability a bit. However, less than 5% 
of the ifs guards anything but Log.*() calls.

> You cannot get rid of the predicate without introducing side effects 
> as I've demonstrated throughout this thread.
>
By removing the predicate and delegating checks to the logging function, 
a _lot_ of boilerplate code is removed. Ideally, as toad said, Java 
would have some kind macro system enabling the best of both worlds. 
Lacking that, the question becomes: 'is the overhead acceptable?'.

There have been quite a lot of arguments thrown here. In the end, 
though, as fred is big and complex, the only answer is to write some 
code and actually run the thing. Are varargs bad? Sure. Is the slowdown 
unacceptable? No idea. Just bear with my slowness (or do help), and 
you'll at least have a convincing argument for the next fool in the line.

> On Apr 4, 2012 6:01 AM, "Marco Schulze"  <mailto:marco.c.schulze at gmail.com>> wrote:
>
> Which problem is solved? There's still a predicate there.
>
> On 03-04-2012 20:49, Zlatin Balevsky wrote:
>
> May I suggest a nice little script someone ( novice? ) could
> write,
> solve the logging problem and learning a thing or two about
> language
> theory in the process :
>
> Transform:
> 
> if (LOG.isLoggable(Level.DEBUG)) {
> 
> 
> }
> 
> Into
> 
> private static void logComplexComputation( .. arguments! .. ) {
> <  do the stuff above>
> }
>
> if (LOG.isLoggable(Level.DEBUG)) {
> logComplexComputation( .. arguments ..);
> }
> 
>
> This gets run as pre-commit hook and the problem is solved with
> positive run-time side effects.
>
>
> On Sun, Mar 25, 2012 at 6:22 PM, Marco Schulze
> mailto:marco.c.schulze at gmail.com>>
>  wrote:
>
> Working (but incomplete) code is available @
> https://github.com/Heiral/fred-staging/tree/logger++
> ___
> Devl mailing list
> Devl at freenetproject.org <mailto:Devl at freenetproject.org>
> https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>
> ___
> Devl mailing list
> Devl at freenetproject.org <mailto:Devl at freenetproject.org>
> https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>
> ___
> Devl mailing list
> Devl at freenetproject.org <mailto:Devl at freenetproject.org>
> https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>
>
>
> ___
> Devl mailing list
> Devl at freenetproject.org
> https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20120404/c116a810/attachment.html>


Re: [freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Florent Daigniere
On Wed, Apr 04, 2012 at 12:58:55PM -0300, Marco Schulze wrote:
> On 04-04-2012 11:43, Zlatin Balevsky wrote:
>>
>> The problem of abusing the predicate by performing anything other than  
>> logging inside it.
>>
> I guess that that does improve readability a bit. However, less than 5%  
> of the ifs guards anything but Log.*() calls.
>
>> You cannot get rid of the predicate without introducing side effects  
>> as I've demonstrated throughout this thread.
>>
> By removing the predicate and delegating checks to the logging function,  
> a _lot_ of boilerplate code is removed. Ideally, as toad said, Java  
> would have some kind macro system enabling the best of both worlds.  
> Lacking that, the question becomes: 'is the overhead acceptable?'.
>
> There have been quite a lot of arguments thrown here. In the end,  
> though, as fred is big and complex, the only answer is to write some  
> code and actually run the thing. Are varargs bad? Sure. Is the slowdown  
> unacceptable? No idea. Just bear with my slowness (or do help), and  
> you'll at least have a convincing argument for the next fool in the line.
>

You're the one who should try to convince us to merge your jumbo patch...

If your proposed solution is not faster than the existing code, you'd
 better come up with a solid and representative benchmark showing that
 the difference is not significant. If your 'solution' is trading 'jar
 size' and 'readability' against run-time performance (for the common
 case assuming logNORMAL), we won't merge it. Freenet is slow enough
 as is.

Hint: your doing it wrong, the one way to make it faster and nicer is to
 use dependancy injection

Florent
___
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl


[freenet-dev] GSoC 2012 Transport Plugin

2012-04-04 Thread Chetan Hosmani
Hello,

With only three days left for the deadline of submission of proposals
I was hoping I could get some suggestions on my proposal.
This is my only proposal. I am also working on another proposal to
Freenet itself (implementing JCA).
Any suggestions will be really helpful.

The proposal can viewed publicly here-
http://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/chetanhosmani/1

Apart from adding references and links, this is the final version.
Please leave comments.

Thank you
Chetan



[freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Zlatin Balevsky
The problem of abusing the predicate by performing anything other than
logging inside it.

You cannot get rid of the predicate without introducing side effects as
I've demonstrated throughout this thread.
On Apr 4, 2012 6:01 AM, "Marco Schulze"  wrote:

> Which problem is solved? There's still a predicate there.
>
> On 03-04-2012 20:49, Zlatin Balevsky wrote:
>
>> May I suggest a nice little script someone ( novice? ) could write,
>> solve the logging problem and learning a thing or two about language
>> theory in the process :
>>
>> Transform:
>> 
>> if (LOG.isLoggable(Level.DEBUG)) {
>>   
>>   
>> }
>> 
>> Into
>> 
>> private static void logComplexComputation( .. arguments! .. ) {
>><  do the stuff above>
>> }
>>
>> if (LOG.isLoggable(Level.DEBUG)) {
>> logComplexComputation( .. arguments ..);
>> }
>> 
>>
>> This gets run as pre-commit hook and the problem is solved with
>> positive run-time side effects.
>>
>>
>> On Sun, Mar 25, 2012 at 6:22 PM, Marco Schulze
>>   wrote:
>>
>>> Working (but incomplete) code is available @
>>> https://github.com/Heiral/**fred-staging/tree/logger++<https://github.com/Heiral/fred-staging/tree/logger++>
>>> __**_
>>> Devl mailing list
>>> Devl at freenetproject.org
>>> https://emu.freenetproject.**org/cgi-bin/mailman/listinfo/**devl<https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl>
>>>
>> __**_
>> Devl mailing list
>> Devl at freenetproject.org
>> https://emu.freenetproject.**org/cgi-bin/mailman/listinfo/**devl<https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl>
>>
> __**_
> Devl mailing list
> Devl at freenetproject.org
> https://emu.freenetproject.**org/cgi-bin/mailman/listinfo/**devl<https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl>
>
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20120404/b43b43df/attachment.html>


Re: [freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Marco Schulze

On 04-04-2012 11:43, Zlatin Balevsky wrote:


The problem of abusing the predicate by performing anything other than 
logging inside it.


I guess that that does improve readability a bit. However, less than 5% 
of the ifs guards anything but Log.*() calls.


You cannot get rid of the predicate without introducing side effects 
as I've demonstrated throughout this thread.


By removing the predicate and delegating checks to the logging function, 
a _lot_ of boilerplate code is removed. Ideally, as toad said, Java 
would have some kind macro system enabling the best of both worlds. 
Lacking that, the question becomes: 'is the overhead acceptable?'.


There have been quite a lot of arguments thrown here. In the end, 
though, as fred is big and complex, the only answer is to write some 
code and actually run the thing. Are varargs bad? Sure. Is the slowdown 
unacceptable? No idea. Just bear with my slowness (or do help), and 
you'll at least have a convincing argument for the next fool in the line.


On Apr 4, 2012 6:01 AM, "Marco Schulze" > wrote:


Which problem is solved? There's still a predicate there.

On 03-04-2012 20:49, Zlatin Balevsky wrote:

May I suggest a nice little script someone ( novice? ) could
write,
solve the logging problem and learning a thing or two about
language
theory in the process :

Transform:

if (LOG.isLoggable(Level.DEBUG)) {


}

Into

private static void logComplexComputation( .. arguments! .. ) {
<  do the stuff above>
}

if (LOG.isLoggable(Level.DEBUG)) {
logComplexComputation( .. arguments ..);
}


This gets run as pre-commit hook and the problem is solved with
positive run-time side effects.


On Sun, Mar 25, 2012 at 6:22 PM, Marco Schulze
mailto:marco.c.schu...@gmail.com>>
 wrote:

Working (but incomplete) code is available @
https://github.com/Heiral/fred-staging/tree/logger++
___
Devl mailing list
Devl@freenetproject.org 
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

___
Devl mailing list
Devl@freenetproject.org 
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

___
Devl mailing list
Devl@freenetproject.org 
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl



___
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
___
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Zlatin Balevsky
The problem of abusing the predicate by performing anything other than
logging inside it.

You cannot get rid of the predicate without introducing side effects as
I've demonstrated throughout this thread.
On Apr 4, 2012 6:01 AM, "Marco Schulze"  wrote:

> Which problem is solved? There's still a predicate there.
>
> On 03-04-2012 20:49, Zlatin Balevsky wrote:
>
>> May I suggest a nice little script someone ( novice? ) could write,
>> solve the logging problem and learning a thing or two about language
>> theory in the process :
>>
>> Transform:
>> 
>> if (LOG.isLoggable(Level.DEBUG)) {
>>   
>>   
>> }
>> 
>> Into
>> 
>> private static void logComplexComputation( .. arguments! .. ) {
>><  do the stuff above>
>> }
>>
>> if (LOG.isLoggable(Level.DEBUG)) {
>> logComplexComputation( .. arguments ..);
>> }
>> 
>>
>> This gets run as pre-commit hook and the problem is solved with
>> positive run-time side effects.
>>
>>
>> On Sun, Mar 25, 2012 at 6:22 PM, Marco Schulze
>>   wrote:
>>
>>> Working (but incomplete) code is available @
>>> https://github.com/Heiral/**fred-staging/tree/logger++
>>> __**_
>>> Devl mailing list
>>> Devl@freenetproject.org
>>> https://emu.freenetproject.**org/cgi-bin/mailman/listinfo/**devl
>>>
>> __**_
>> Devl mailing list
>> Devl@freenetproject.org
>> https://emu.freenetproject.**org/cgi-bin/mailman/listinfo/**devl
>>
> __**_
> Devl mailing list
> Devl@freenetproject.org
> https://emu.freenetproject.**org/cgi-bin/mailman/listinfo/**devl
>
___
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

[freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Marco Schulze
Which problem is solved? There's still a predicate there.

On 03-04-2012 20:49, Zlatin Balevsky wrote:
> May I suggest a nice little script someone ( novice? ) could write,
> solve the logging problem and learning a thing or two about language
> theory in the process :
>
> Transform:
> 
> if (LOG.isLoggable(Level.DEBUG)) {
>
>
> }
> 
> Into
> 
> private static void logComplexComputation( .. arguments! .. ) {
> <  do the stuff above>
> }
>
> if (LOG.isLoggable(Level.DEBUG)) {
>  logComplexComputation( .. arguments ..);
> }
> 
>
> This gets run as pre-commit hook and the problem is solved with
> positive run-time side effects.
>
>
> On Sun, Mar 25, 2012 at 6:22 PM, Marco Schulze
>   wrote:
>> Working (but incomplete) code is available @
>> https://github.com/Heiral/fred-staging/tree/logger++
>> ___
>> Devl mailing list
>> Devl at freenetproject.org
>> https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
> ___
> Devl mailing list
> Devl at freenetproject.org
> https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl



Re: [freenet-dev] Logging subsystem rewrite

2012-04-04 Thread Marco Schulze

Which problem is solved? There's still a predicate there.

On 03-04-2012 20:49, Zlatin Balevsky wrote:

May I suggest a nice little script someone ( novice? ) could write,
solve the logging problem and learning a thing or two about language
theory in the process :

Transform:

if (LOG.isLoggable(Level.DEBUG)) {
   
   
}

Into

private static void logComplexComputation( .. arguments! .. ) {
<  do the stuff above>
}

if (LOG.isLoggable(Level.DEBUG)) {
 logComplexComputation( .. arguments ..);
}


This gets run as pre-commit hook and the problem is solved with
positive run-time side effects.


On Sun, Mar 25, 2012 at 6:22 PM, Marco Schulze
  wrote:

Working (but incomplete) code is available @
https://github.com/Heiral/fred-staging/tree/logger++
___
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

___
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

___
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl


[freenet-dev] JCA patch

2012-04-04 Thread Chetan Hosmani
Hello,

nextgens as you wanted some changes I have implemented them. I have
sent a pull request to freenet:next.
Here is the patch.

Also wanted some opinion on the idea "Switch from the current code to
JCA". Since I have been working and reading on this, I thought I ll
send in a proposal for this task too. Any pointers or suggestions will
be helpful. I will make a rough draft and mail that too, though there
is hardly any time left for discussion.

Thank you
-- next part --
A non-text attachment was scrubbed...
Name: jca.patch
Type: application/octet-stream
Size: 9341 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20120404/6853b959/attachment.obj>