Re: [Patch] Refactoring PreviewLoader

2005-01-29 Thread Andreas Vox
Lars Gullik Bjnnes [EMAIL PROTECTED] writes: Andreas Vox [EMAIL PROTECTED] writes: ... | Not bool - int - pointer. Do you have explicit pointers in Java? Of course not, just references. (except from NullPointerException. I always found this an oxymoron...) Yes, I'd also prefer if

Re: [Patch] Refactoring PreviewLoader

2005-01-29 Thread Andreas Vox
Lars Gullik BjÃnnes <[EMAIL PROTECTED]> writes: > > Andreas Vox <[EMAIL PROTECTED]> writes: ... > | Not bool <-> int <-> pointer. > > Do you have explicit pointers in Java? Of course not, just references. > (except from > NullPointerException. I always found this an oxymoron...) Yes, I'd

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Angus Leeming
Andreas Vox wrote: BTW, does anyone know the type of the expression bind(Impl::finishedGenerating, this, _1, _2) No, but you don't need to either. You can store it in a boost::functionReturnType(Arg1Type, Arg2Type) my_func = bind(Impl::finishedGenerating, this, _1, _2); to be used as

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Lars Gullik Bjønnes
Andreas Vox [EMAIL PROTECTED] writes: | I've been a happy Java Programmer for the last 7 years so I missed (*) | all this new C++ stuff like templates, namespaces, exceptions and rtti. Just by looking at java I feel strait-jacketed. | A decent language shouldn't have a preprocessor, pointer

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Asger Ottar Alstrup
Lars Gullik Bjønnes wrote: int a[4]; a+3 == a[3] == 3+a And surprisingly 3[a] works as well! Regards, Asger

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread John Levon
On Fri, Jan 28, 2005 at 12:31:44PM +0100, Lars Gullik Bj?nnes wrote: int a[4]; a+3 == a[3] == 3+a Hah, you missed the really fun one: 3[a] john

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Martin Vermeer
On Fri, 2005-01-28 at 13:37, Asger Ottar Alstrup wrote: Lars Gullik Bjnnes wrote: int a[4]; a+3 == a[3] == 3+a And surprisingly 3[a] works as well! Regards, Asger Yes, that *is* surprising. In a previous life we had a Fortran IV compiler that (unintentionally) allowed the assignment

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Lars Gullik Bjønnes
John Levon [EMAIL PROTECTED] writes: | On Fri, Jan 28, 2005 at 12:31:44PM +0100, Lars Gullik Bj?nnes wrote: int a[4]; a+3 == a[3] == 3+a | Hah, you missed the really fun one: 3[a] Yeah.. quite fun (no wonder why no sane C/C++ programmer exploits this.) (I have some code here that I work on

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread John Levon
On Fri, Jan 28, 2005 at 01:24:50PM +0100, Lars Gullik Bj?nnes wrote: (I have some code here that I work on now that uses it...) My commiserations. (Though I have seen real-life code that uses Duff's device...) john

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Angus Leeming
John Levon wrote: (Though I have seen real-life code that uses Duff's device...) Urggg! Was it needed, or was it an example of a call to the 'false god of efficiency'? -- Angus

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread John Levon
On Fri, Jan 28, 2005 at 01:27:29PM +, Angus Leeming wrote: Was it needed, or was it an example of a call to the 'false god of efficiency'? The latter as far as I could tell... and no, it's staying anonymous :) john

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Andreas Vox
Lars Gullik Bjnnes [EMAIL PROTECTED] writes: Andreas Vox [EMAIL PROTECTED] writes: | I've been a happy Java Programmer for the last 7 years so I missed (*) | all this new C++ stuff like templates, namespaces, exceptions and rtti. Just by looking at java I feel strait-jacketed. Can't

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Jose' Matos
On Friday 28 January 2005 15:16, Andreas Vox wrote: P.S. What about a Java frontend to LyX for true platform independence? Oh, you mean dependant, attached to another platform, java. Not even on Fridays we be believe in fairies, do you know? -- Jos Ablio

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Angus Leeming
Jose' Matos wrote: P.S. What about a Java frontend to LyX for true platform independence? Oh, you mean dependant, attached to another platform, java. Not even on Fridays we be believe in fairies, do you know? It's true. I've never met a fairy that wanted to write 100 000 lines of code just

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Kayvan A. Sylvan
On Fri, Jan 28, 2005 at 02:12:03PM +0200, Martin Vermeer wrote: On Fri, 2005-01-28 at 13:37, Asger Ottar Alstrup wrote: Lars Gullik Bjønnes wrote: int a[4]; a+3 == a[3] == 3+a And surprisingly 3[a] works as well! Regards, Asger Yes, that *is* surprising. Well, x[y] is

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Lars Gullik Bjønnes
Andreas Vox [EMAIL PROTECTED] writes: Then don't use them. And as you see in LyX we use these as little as possible. | Yes. Unfortunately one can't take the same approach for the preprocessor, | at least for the include files. If _that_ is you concern with the preprocessor the you have no

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Andre Poenitz
On Fri, Jan 28, 2005 at 12:31:44PM +0100, Lars Gullik Bjønnes wrote: int a[4]; a+3 == a[3] == 3+a You forgot the fun part: 3[a]. Andre'

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Angus Leeming
Andreas Vox wrote: > BTW, does anyone know the type of the expression > bind(::finishedGenerating, this, _1, _2) No, but you don't need to either. You can store it in a boost::function my_func = bind(::finishedGenerating, this, _1, _2); to be used as

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Lars Gullik Bjønnes
Andreas Vox <[EMAIL PROTECTED]> writes: | I've been a happy Java Programmer for the last 7 years so I "missed" (*) | all this new C++ stuff like templates, namespaces, exceptions and rtti. Just by looking at java I feel strait-jacketed. | A decent language shouldn't have a preprocessor, pointer

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Asger Ottar Alstrup
Lars Gullik Bjønnes wrote: int a[4]; a+3 == a[3] == 3+a And surprisingly "3[a]" works as well! Regards, Asger

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread John Levon
On Fri, Jan 28, 2005 at 12:31:44PM +0100, Lars Gullik Bj?nnes wrote: > int a[4]; > a+3 == a[3] == 3+a Hah, you missed the really fun one: 3[a] john

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Martin Vermeer
On Fri, 2005-01-28 at 13:37, Asger Ottar Alstrup wrote: > Lars Gullik BjÃnnes wrote: > > int a[4]; > > a+3 == a[3] == 3+a > > And surprisingly "3[a]" works as well! > > Regards, > Asger Yes, that *is* surprising. In a previous life we had a Fortran IV compiler that (unintentionally) allowed

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Lars Gullik Bjønnes
John Levon <[EMAIL PROTECTED]> writes: | On Fri, Jan 28, 2005 at 12:31:44PM +0100, Lars Gullik Bj?nnes wrote: > >> int a[4]; >> a+3 == a[3] == 3+a > | Hah, you missed the really fun one: 3[a] Yeah.. quite fun (no wonder why no sane C/C++ programmer exploits this.) (I have some code here that I

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread John Levon
On Fri, Jan 28, 2005 at 01:24:50PM +0100, Lars Gullik Bj?nnes wrote: > (I have some code here that I work on now that uses it...) My commiserations. (Though I have seen real-life code that uses Duff's device...) john

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Angus Leeming
John Levon wrote: > (Though I have seen real-life code that uses Duff's device...) Urggg! Was it needed, or was it an example of a call to the 'false god of efficiency'? -- Angus

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread John Levon
On Fri, Jan 28, 2005 at 01:27:29PM +, Angus Leeming wrote: > Was it needed, or was it an example of a call to the 'false god of > efficiency'? The latter as far as I could tell... and no, it's staying anonymous :) john

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Andreas Vox
Lars Gullik BjÃnnes <[EMAIL PROTECTED]> writes: > > Andreas Vox <[EMAIL PROTECTED]> writes: > > | I've been a happy Java Programmer for the last 7 years so I "missed" (*) > | all this new C++ stuff like templates, namespaces, exceptions and rtti. > > Just by looking at java I feel

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Jose' Matos
On Friday 28 January 2005 15:16, Andreas Vox wrote: > P.S. What about a Java frontend to LyX for true platform independence? Oh, you mean dependant, attached to another platform, java. Not even on Fridays we be believe in fairies, do you know? -- Josà AbÃlio

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Angus Leeming
Jose' Matos wrote: >> P.S. What about a Java frontend to LyX for true platform independence? > > Oh, you mean dependant, attached to another platform, java. Not even on > Fridays we be believe in fairies, do you know? It's true. I've never met a fairy that wanted to write 100 000 lines of code

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Kayvan A. Sylvan
On Fri, Jan 28, 2005 at 02:12:03PM +0200, Martin Vermeer wrote: > On Fri, 2005-01-28 at 13:37, Asger Ottar Alstrup wrote: > > Lars Gullik Bjønnes wrote: > > > int a[4]; > > > a+3 == a[3] == 3+a > > > > And surprisingly "3[a]" works as well! > > > > Regards, > > Asger > > Yes, that *is*

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Lars Gullik Bjønnes
Andreas Vox <[EMAIL PROTECTED]> writes: >> Then don't use them. And as you see in LyX we use these as little as >> possible. > | Yes. Unfortunately one can't take the same approach for the preprocessor, | at least for the include files. If _that_ is you concern with the preprocessor the you

Re: [Patch] Refactoring PreviewLoader

2005-01-28 Thread Andre Poenitz
On Fri, Jan 28, 2005 at 12:31:44PM +0100, Lars Gullik Bjønnes wrote: > int a[4]; > a+3 == a[3] == 3+a You forgot the fun part: 3[a]. Andre'

Re: [Patch] Refactoring PreviewLoader

2005-01-27 Thread John Weiss
On Mon, Jan 24, 2005 at 08:15:10PM +, Andreas Vox wrote: Angus Leeming [EMAIL PROTECTED] writes: namespace support = lyx::support; using std::ostream; typedef liststring SnippetList; is just baaaddd. Ah, bad for *.h, ok for *.C? Got it. The reason being that *.h files are

Re: [Patch] Refactoring PreviewLoader

2005-01-27 Thread John Weiss
On Mon, Jan 24, 2005 at 08:15:10PM +, Andreas Vox wrote: > > Angus Leeming <[EMAIL PROTECTED]> writes: > > namespace support = lyx::support; > > using std::ostream; > > typedef list SnippetList; > > > > is just baaaddd. > > Ah, bad for *.h, ok for *.C? > Got it. The reason being that *.h

Re: [Patch] Refactoring PreviewLoader

2005-01-24 Thread Andreas Vox
Hi! Angus Leeming [EMAIL PROTECTED] writes: It seems GMane ate my last post, so I try again. And it doesn't like top posting -- or what it thinks it is. The diff file looks great. But it's hard to see in detail what's happening. Could you post the PreviewLoader.C file (yeah, I'm lazy).

Re: [Patch] Refactoring PreviewLoader

2005-01-24 Thread Angus Leeming
Andreas Vox wrote: Sounds ok? Yes. Welcome aboard ;-) -- Angus

[Patch] Refactoring PreviewLoader 2

2005-01-24 Thread Andreas Vox
Hi Angus, Here you are. I made the changes you suggested. But probably there's still whitespace wrong, superflous includes, symbols in the wrong namespace etc. -- just tell me. I made a short test: a small file with some maths and then scrolling thru Userguide.lyx with PageDown, checking that

Re: [Patch] Refactoring PreviewLoader

2005-01-24 Thread Andreas Vox
Hi! Angus Leeming <[EMAIL PROTECTED]> writes: > It seems GMane ate my last post, so I try again. And it doesn't like "top posting" -- or what it thinks it is. > The diff file looks great. But it's hard to see in detail what's happening. > Could you post the PreviewLoader.C file (yeah, I'm

Re: [Patch] Refactoring PreviewLoader

2005-01-24 Thread Angus Leeming
Andreas Vox wrote: > Sounds ok? Yes. Welcome aboard ;-) -- Angus

[Patch] Refactoring PreviewLoader 2

2005-01-24 Thread Andreas Vox
Hi Angus, Here you are. I made the changes you suggested. But probably there's still whitespace wrong, superflous includes, symbols in the wrong namespace etc. -- just tell me. I made a short test: a small file with some maths and then scrolling thru Userguide.lyx with PageDown, checking that

[Patch] Refactoring PreviewLoader

2005-01-23 Thread Andreas Vox
Hi! I resumed my last year's project to generate bitmap files for Docbook. As a first measure I refactored some code from PreviewLoader I want to use into its own class, SnippetConversion. I would appreciate if someone could review this code and tell me how to improve it. The code works for me,

Re: [Patch] Refactoring PreviewLoader

2005-01-23 Thread Angus Leeming
Andreas Vox wrote: Hi! I resumed my last year's project to generate bitmap files for Docbook. As a first measure I refactored some code from PreviewLoader I want to use into its own class, SnippetConversion. I would appreciate if someone could review this code and tell me how to

[Patch] Refactoring PreviewLoader

2005-01-23 Thread Andreas Vox
Hi! I resumed my last year's project to generate bitmap files for Docbook. As a first measure I refactored some code from PreviewLoader I want to use into its own class, SnippetConversion. I would appreciate if someone could review this code and tell me how to improve it. The code works for me,

Re: [Patch] Refactoring PreviewLoader

2005-01-23 Thread Angus Leeming
Andreas Vox wrote: > Hi! > > I resumed my last year's project to generate bitmap files for Docbook. > As a first measure I refactored some code from PreviewLoader I want > to use into its own class, SnippetConversion. > > I would appreciate if someone could review this code and tell me how >