March 27, 2005
Jamboree wrote:

>>What are the *advantages* of shipping an old recls (and an old zlib
>>as well) with Phobos ?
> 
> You're asking two questions in one, here. Do you mean what are the advantages of having recls in Phobos? Or what advantages are there in having the old (1.2.x) recls in Phobos instead of the new (1.6.x)?

I meant that: since the bundled version can't be kept up to date, wouldn't it be better to use the "standard" installation of recls ?

The thing against zlib is that it is an old version (1.2.1), without
the security updates that eventually went into zlib version 1.2.2...

> If one wants to pare down Phobos to the absolute minimum, then that's fair, but it'd be going against what the bulk of 'normal' users want, I would think.

Maybe we need a "D Micro Edition" version of Phobos then, with just
what is needed for the language to function. (like garbage collection
and handlers for the assertions and other callbacks, for instance...)

Then again, I wanted to separate the library from the DMD compiler too.

> As far as I know, there's only been one bug with recls, and that was the UTF-8, which was fixed sometime ago. The only 'problem' with it is that updates to it have not been incorporated into Phobos for a *long* time, and, as I keep pointing out,

> I have precisely 0 control over that.

Matthew, is that you ? :-) ("Jamboree")

> I'm confident that recls 1.6 would make a fine, useful, substantial contribution to Phobos. I'm aware several find it useful, and suspect many more would in its later guises. Of course, I'm biased, but since I'd find it a step back if zlib were removed, and you've lumped them together, then I think it's fair to say the same for recls.

Do you mean "it's a substantial D contribution", or did you really mean Phobos ? I'm not arguing that the libraries make a good contribution,
just think it was easier if it wasn't bundled with the runtime library ?

I think building things into the runtime library has rather similar
pros and cons as building features into the language itself, great if
it works (and is up to date) - but useless if it doesn't, or is too old.

Q: Couldn't it be bundled with the "download", but still be separate ?
(so that one could upgrade it to a later library version, if available)

--anders

PS. Sorry for lumping several things together in one post. (i.e. "zlib")
March 27, 2005
Anders F Björklund wrote:
> Jamboree wrote:
> 
>>> What are the *advantages* of shipping an old recls (and an old zlib
>>> as well) with Phobos ?
>>
>>
>> You're asking two questions in one, here. Do you mean what are the advantages of having recls in Phobos? Or what advantages are there in having the old (1.2.x) recls in Phobos instead of the new (1.6.x)?
> 
> 
> I meant that: since the bundled version can't be kept up to date, wouldn't it be better to use the "standard" installation of recls ?

That's a good point. If the recls were easy for a novice to setup and use, I'd see it as a good idea to ask Walter to simply remove recls from Phobos. But I'm not so sure that's the case. Am I wrong on this?

Does the standalone version include a pre-compiled .lib (or even a makefile) for a lazy Windows user like me? I can't find it. Did I download the wrong file or something?

And it looks like I'd have to compile stlsoft-1.8.3-beta3, too. Stlsoft's Readme.txt and ReleaseNotes-1.8.3-beta3.txt look nice, but I couldn't track down any tips for compiling these source files. I thought  maybe the stlsoft FAQ would tell me how to put it all together, but I guess I'm the first one that didn't find it self-explanatory.

I can muster up effort to download a separate library, but I'm much too lazy to be persuaded to compile a bunch C/C++ libraries without even a guide. This may not be a big deal for people with a strong C/C++ background, but if I have to do a bunch of research to compile it myself, I'm just not going to end up using the standalone version of recls.

At least with the "from the dawn of time" version compiled into Phobos, I don't have to download a bunch of separate files and sift through them hunting for instructions that may not exist.

-- 
Justin (a/k/a jcc7)
http://jcc_7.tripod.com/d/
March 27, 2005
> Does the standalone version include a pre-compiled .lib (or even a makefile) for a lazy Windows user like me?

No. I plan to do that in the future, but it's not happened yet.

> I can't find it. Did I download the wrong file or something?

Makefiles are under the /build directory. I should mention this in a readme in the root level. :$

> And it looks like I'd have to compile stlsoft-1.8.3-beta3, too.

STLSoft is 100% header-only, so no compilation required (or possible <G>)

> Stlsoft's Readme.txt and ReleaseNotes-1.8.3-beta3.txt look nice, but I couldn't track down any tips for compiling these source files. I thought maybe the stlsoft FAQ would tell me how to put it all together, but I guess I'm the first one that didn't find it self-explanatory.

The FAQ is not good. I'm not exactly talented when it comes to docs. :(

> I can muster up effort to download a separate library, but I'm much too lazy to be persuaded to compile a bunch C/C++ libraries without even a guide. This may not be a big deal for people with a strong C/C++ background, but if I have to do a bunch of research to compile it myself, I'm just not going to end up using the standalone version of recls.

Sounds like a reasonable point of view. I should add more "Getting started for D users" type help. It's that double-whammy of not knowing what you know implicitly, and being short on time. ;)

> At least with the "from the dawn of time" version compiled into Phobos, I don't have to download a bunch of separate files and sift through them hunting for instructions that may not exist.

Indeed. That's a powerful argument for keeping recls in Phobos. I guess we just have to hope Walter'll.



March 28, 2005
Matthew wrote:
>>Does the standalone version include a pre-compiled .lib (or even a makefile) for a lazy Windows user like me?
> 
> 
> No. I plan to do that in the future, but it's not happened yet.

Cool. That'd be very helpful.

>>I can't find it. Did I download the wrong file or something?
> 
> 
> Makefiles are under the /build directory. I should mention this in a readme in the root level. :$

If I knew to look for a makefile in recls, I would've found it pretty quickly. I just got distracted trying to build STLsoft. (oops)

>>And it looks like I'd have to compile stlsoft-1.8.3-beta3, too.
> 
> 
> STLSoft is 100% header-only, so no compilation required (or possible <G>)

Well, that explains the absence of a makefile. (oops, again)

...

>>I can muster up effort to download a separate library, but I'm much too lazy to be persuaded to compile a bunch C/C++ libraries without even a guide. This may not be a big deal for people with a strong C/C++ background, but if I have to do a bunch of research to compile it myself, I'm just not going to end up using the standalone version of recls.
> 
> 
> Sounds like a reasonable point of view. I should add more "Getting started for D users" type help. It's that double-whammy of not knowing what you know implicitly, and being short on time. ;)

Yes, I understand that you're trying to cater to a lot of different
programming languages. And each person only has so many hours in each day.

I guess I'll try to include some newbie-friendly tips on compiling recls at http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/Phobos/StdRecls
(provided I finally manage to get it built myself).

-- 
Justin (a/k/a jcc7)
http://jcc_7.tripod.com/d/
March 28, 2005
Ok, here's the fast version:

1. Download and install STLSoft 1.8.3 beta 4. Wherever you put it - e.g. C:\3pty\STLSoft\1.8.3 or /usr/include/stlsoft/1.8.3 - you need to setup and environment variable STLSOFT_INCLUDE that points to the directory containing stlsoft.h. The other headers that are in relative directories - e.g. winstl/path.hpp - are under that main directory. Note: recls 1.6.x also uses some of the "in progress" STLSoft components - things that are very likely to go in on the next non-beta release - but the recls makefiles contain include directorives for both "-I$(STLSOFT_INCLUDE)" and "-I$(STLSOFT_INCLUDE)/inprogress", so you shouldn't have to worry about that. (Just FYI, in case <g>)

2. Say you're building recls for DMC++ on Win32. You'll need to be in a CLI which has the STLSOFT_INCLUDE environment set, and can see the DMC++ toolset. Then go to the <recls>/build/dm directory, and just type "make". Or type "make test" and it'll run the sample programs after a successful build.

3. If 1. is set up, which should mean that 2. builds ok, then you'll have recls.dm.lib and recls.dm.debug.lib in the <recls>/lib directory. That contains all the core library, and 'll need to be linked in to your exe

4. Then just go to <recls>/mappings/D, and compile <recls>/mappings/D/std/recls.d. If you like, you can use the makefile there, and just type "make". Assuming DMD is successfully installed and all components visible, you should have the libraries recls.D.debug.lib and recls.D.lib, which, along with the core library, can be linked to form you exe.

That should be it, but I may have missed something obvious. HTH

Cheers

Matthew

"J C Calvarese" <jcc7@cox.net> wrote in message news:d27l9o$hbq$1@digitaldaemon.com...
> Matthew wrote:
>>>Does the standalone version include a pre-compiled .lib (or even a makefile) for a lazy Windows user like me?
>>
>>
>> No. I plan to do that in the future, but it's not happened yet.
>
> Cool. That'd be very helpful.
>
>>>I can't find it. Did I download the wrong file or something?
>>
>>
>> Makefiles are under the /build directory. I should mention this in a readme in the root level. :$
>
> If I knew to look for a makefile in recls, I would've found it pretty quickly. I just got distracted trying to build STLsoft. (oops)
>
>>>And it looks like I'd have to compile stlsoft-1.8.3-beta3, too.
>>
>>
>> STLSoft is 100% header-only, so no compilation required (or possible <G>)
>
> Well, that explains the absence of a makefile. (oops, again)
>
> ...
>
>>>I can muster up effort to download a separate library, but I'm much too lazy to be persuaded to compile a bunch C/C++ libraries without even a guide. This may not be a big deal for people with a strong C/C++ background, but if I have to do a bunch of research to compile it myself, I'm just not going to end up using the standalone version of recls.
>>
>>
>> Sounds like a reasonable point of view. I should add more "Getting started for D users" type help. It's that double-whammy of not knowing what you know implicitly, and being short on time. ;)
>
> Yes, I understand that you're trying to cater to a lot of different programming languages. And each person only has so many hours in each day.
>
> I guess I'll try to include some newbie-friendly tips on compiling recls at http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/Phobos/StdRecls (provided I finally manage to get it built myself).
>
> -- 
> Justin (a/k/a jcc7)
> http://jcc_7.tripod.com/d/


March 28, 2005
"Anders F Björklund" <afb@algonet.se> wrote in message news:d24ofu$jv8$1@digitaldaemon.com...
> Matthew wrote:
>
>> Alas - partly because of the stunning lack of Apple customer service - I've not yet got to the point of using D on Linux. I'd be more than happy for people to make changes to the std/recls.d file in the latest release (http://recls.org/downloads.html) and feed them back to me.
>
> Maybe I'm missing something here, but what does Apple's support has to with Linux ? If anything, it should have more
> to do with Mac OS X, yes ?
> (although I am running both Mac OS X and Linux on my own Apple machines)

Oh, I was just going to use getting an Apple into springboarding me into doing D primarily on Linux. ;) Since they've demotivated me re buying one, it's put a crimp on that side of things.

>> The latter is more my responsibility, since I've not (yet) got around to having D on Linux. Is this easy to do? If so, I'll bite the bullet and get it done. Then it'll all be in Walter's court.
>
> It's not very hard to install GDC on a regular Linux platform... There's a specfile for RPM, an ebuild for Gentoo, and a Makefile ? http://www.algonet.se/~afb/d/Makefile (downloads, compiles, installs)
>
> Installing DMD, on a supported X86 Linux, is even easier to do : http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/InstallingDCompiler

Thanks. I'll note this down. :-)



March 28, 2005
"J C Calvarese" <jcc7@cox.net> wrote in message news:d25km9$1fji$1@digitaldaemon.com...
> Matthew wrote:
>> As I mentioned in the other post, this is stuff that was sorted nearly a year ago.
>>
>> It's a shame, but I guess the recls in Phobos is damn near unusable. :-(
>
> No, it's not unusable -- just often confusing. Such a shame that Walter won't update it.
>
> I was looking at the docs included with Phobos the other day and found a function that I need to use was in recls. Unfortunately, the ancient version in Phobos was missing that particular function. And I wasn't in the mood to compile your updated version myself.
>
> I've written some stuff in D using recls, but not as much as I'd like. :(

Yeah, this is one reason why I've written so much more Ruby code than D code over the last few months. Using recls/D, even for me, is more painful than it need be, and so I tend to go with what's ready and running _right now_, i.e. Ruby.

(FYI: recls 1.6.x also comes with recls/Python, for those who've not yet seen the shining red light that is Ruby <g>)



March 28, 2005
In article <d27p22$kv0$1@digitaldaemon.com>, Matthew says...
>
>
>"Anders F Björklund" <afb@algonet.se> wrote in message news:d24ofu$jv8$1@digitaldaemon.com...
>> Matthew wrote:
>>
>>> Alas - partly because of the stunning lack of Apple customer service - I've not yet got to the point of using D on Linux. I'd be more than happy for people to make changes to the std/recls.d file in the latest release (http://recls.org/downloads.html) and feed them back to me.
>>
>> Maybe I'm missing something here, but what does Apple's support has to with Linux ? If anything, it should have more
>> to do with Mac OS X, yes ?
>> (although I am running both Mac OS X and Linux on my own Apple machines)
>
>Oh, I was just going to use getting an Apple into springboarding me into doing D primarily on Linux. ;) Since they've demotivated me re buying one, it's put a crimp on that side of things.
>
>>> The latter is more my responsibility, since I've not (yet) got around to having D on Linux. Is this easy to do? If so, I'll bite the bullet and get it done. Then it'll all be in Walter's court.
>>
>> It's not very hard to install GDC on a regular Linux platform... There's a specfile for RPM, an ebuild for Gentoo, and a Makefile ? http://www.algonet.se/~afb/d/Makefile (downloads, compiles, installs)
>>
>> Installing DMD, on a supported X86 Linux, is even easier to do : http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/InstallingDCompiler
>
>Thanks. I'll note this down. :-)
>

It sounds like you were ready to spring (for an above avg. cost) new system.

If that's the case - could I suggest something? I'm really impressed with the AMD64 chip and some of the boards coming out for it now, as well as the Linux support for them (in general). If a laptop is what you need, I've been told some of the systems running the AMD64 chip are nice as well, as long as you don't need to run them on battery a lot.

Dual- (Windows/Linux32) or tri- (Windows/Linux32/Linux64) boot the new AMD64
system and you'll have a nice all-around, reasonably high-perf. system for a
reasonable cost as well.

I'd also suggest making sure the Linux distro. you are thinking of using supports the board you buy, though (for example, up until recently SATA support for Linux was about 6 months behind Windows support, and you might want to Google for problems supporting the new system's Video Card - things like that).

Just in case that is an option for you..

- Dave


March 28, 2005
On Sun, 27 Mar 2005 15:30:44 -0600, J C Calvarese <jcc7@cox.net> wrote:
> Anders F Björklund wrote:
>> Jamboree wrote:
>>
>>>> What are the *advantages* of shipping an old recls (and an old zlib
>>>> as well) with Phobos ?
>>>
>>>
>>> You're asking two questions in one, here. Do you mean what are the advantages of having recls in Phobos? Or what advantages are there in having the old (1.2.x) recls in Phobos instead of the new (1.6.x)?
>>   I meant that: since the bundled version can't be kept up to date, wouldn't it be better to use the "standard" installation of recls ?
>
> That's a good point. If the recls were easy for a novice to setup and use, I'd see it as a good idea to ask Walter to simply remove recls from Phobos. But I'm not so sure that's the case. Am I wrong on this?
>
> Does the standalone version include a pre-compiled .lib (or even a makefile) for a lazy Windows user like me? I can't find it. Did I download the wrong file or something?

Why don't/can't we...

- Split recls (and others like it - some sort of discretion is reqd for deciding how/what) into it's own lib file.
- Package the recls lib (and others) with the default D download.

What this means is that:

- People who get D will get recls.
- People who want/need the more recent recls can simply download a prebuilt lib, and/or build one *without* having to rebuild the entirety of phobos as well.

Further, it means:

- Several different D library packages made up of different sub-libraries can be produced/downloaded.
- Parts of the library can be downloaded seperately (updates, new sub-libraries) and added to the whole.
and so on.

So, the D standard library could be called/defined a modular library made up of sub-libraries like "core" (the core functions/modules), "recls", ..etc..

I think it would make life easier for users, they just grab a file and save it in the right place and hey-presto they have updated part of the "D standard library", no messy building required.

It would make life easier for library maintainers, eg if they get a complaint, bug, etc they can fix it and produce a download which the user can immediately grab, try and report back.

Regan
March 28, 2005
Matthew wrote:
> Ok, here's the fast version:
> 
> 1. Download and install STLSoft 1.8.3 beta 4. Wherever you put it - e.g. C:\3pty\STLSoft\1.8.3 or /usr/include/stlsoft/1.8.3 - you need to setup and environment variable STLSOFT_INCLUDE that points to the directory containing stlsoft.h. The other headers that are in relative directories - e.g. winstl/path.hpp - are under that main directory. Note: recls 1.6.x also uses some of the "in progress" STLSoft components - things that are very likely to go in on the next non-beta release - but the recls makefiles contain include directorives for both "-I$(STLSOFT_INCLUDE)" and "-I$(STLSOFT_INCLUDE)/inprogress", so you shouldn't have to worry about that. (Just FYI, in case <g>)
> 
> 2. Say you're building recls for DMC++ on Win32. You'll need to be in a CLI which has the STLSOFT_INCLUDE environment set, and can see the DMC++ toolset. Then go to the <recls>/build/dm directory, and just type "make". Or type "make test" and it'll run the sample programs after a successful build.
> 
> 3. If 1. is set up, which should mean that 2. builds ok, then you'll have recls.dm.lib and recls.dm.debug.lib in the <recls>/lib directory. That contains all the core library, and 'll need to be linked in to your exe
> 
> 4. Then just go to <recls>/mappings/D, and compile <recls>/mappings/D/std/recls.d. If you like, you can use the makefile there, and just type "make". Assuming DMD is successfully installed and all components visible, you should have the libraries recls.D.debug.lib and recls.D.lib, which, along with the core library, can be linked to form you exe.
> 
> That should be it, but I may have missed something obvious. HTH

Thanks. Looks good. I've added already added this to Wiki4D. I plan to go in and explain a tad more about installing DMC and STLport (and adding STLport to the INCLUDE path in sc.ini), but I think what you've written covers most of the bases for the actual recls part.

I finally managed to compile recls.dm.lib, but I can't get my test program to link:

<code>
import std.recls;

void main()
{
    FileSearch  search  = new FileSearch(".", "*.*", RECLS_FLAG.RECLS_F_RECURSIVE);
    foreach(Entry entry; search)
    {
        with(entry)
        {
            if(!shortFile())
                printf("%.*s%.*s\n", directoryPath(), file());
            else
                printf("%.*s%.*s (%.*s)\n", directoryPath(), file(), shortFile());
        }
    }
}
</code>


<command line>
I:\pgm\d\recls>dmd test.d D:\dm\recls-1.6.1\lib\recls.dm.lib -ID:\dm\recls-1.6.1
\mappings\D
d:\dmd\bin\..\..\dm\bin\link.exe test,,,D:\dm\recls-1.6.1\lib\recls.dm.lib+user3
2+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

test.obj(test)
 Error 42: Symbol Undefined __Class_3std5recls10FileSearch
test.obj(test)
 Error 42: Symbol Undefined _D3std5recls10FileSearch5_ctorFAaAakZC3std5recls10Fi
leSearch
--- errorlevel 2
</command line>

My instinct is that I need to recompile Phobos to get it to work since it's called std.recls. It's too late for me to play around with this more tonight. I plan to continue my investigation tomorrow. I think I'm close to understanding what's going on. ;)

-- 
Justin (a/k/a jcc7)
http://jcc_7.tripod.com/d/