March 15, 2008 Re: "D" annoyances | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ty Tower | Ty Tower wrote: > Another > The output does not recognise "C" nor "alignment" ? For C, see below. "alignment" is not a specifier in itself in any way, it is the number seen behind a comma in some of the examples; so what do you mean with it not being recognized? > Your lookers should not have to go delving to find out why, it needs to > just work. We appreciate tickets posted at http://www.dsource.org/projects/tango/newticket > > [tytower@linuxbox text]$ formatspec > I have {unknown format 'C'} in cash. > Avogadro's number is 6.02e+23. > Avogadro's number (with alignment) is 6.02e+23. > > > This is the example program which also appears in the tango book You need to point me to where this can be found in the book, in which case it will be listed in the errata. > /** > > Example showing how to use format specifier components in a format > string's argument. > > Put into public domain by Lars Ivar Igesund > > */ > > import tango.io.Stdout; > > void main(){ > double avogadros = 6.0221415e23; > Stdout.formatln("I have {0:C} in cash.", 100); > Stdout.formatln("Avogadro's number is {0:E}.", avogadros); > Stdout.formatln("Avogadro's number (with alignment) is {0,4:E}.", > avogadros); > } Thanks, this example is indeed in error. Currently C is only available as a specifier if you have a Locale enabled (as you can read in the book). The E specifier does appear to not work properly under Locale though. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango |
March 16, 2008 Re: "D" annoyances | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ty Tower | Ty Tower Wrote: > Take them as things to be fixed or deny their existence > > Either way I will post here the stupid things I find as I go through bits and pieces . The best critic is the most schooled in the subject > In Tango examples the dsss.conf is out of date as below new one is further down dss.conf - missing no cluster [concurrency/fiber_test.d] buildflags += -unittest [conduits/composite.d] [conduits/createzip.d] version (Windows) { buildflags += -L"zlib;libbz2" - made global } version (Posix) { buildflags += -L-lz -made global } [conduits/filebubbler.d] [conduits/filecat.d] - filebucket missed [conduits/filecopy.d] [conduits/fileops.d] [conduits/filepathname.d] [conduits/filescan.d] [conduits/filescanregex.d] [conduits/lineio.d] [conduits/mmap.d] [conduits/paths.d] [conduits/randomio.d] [conduits/shuffle.d] [conduits/unifile.d] [console/hello.d] [console/stdout.d]- missing buffered.d #[external/GlueFlectioned.d]........needs cn.kuehne.flectioned [logging/chainsaw.d] [logging/logging.d] [logging/multilog.d]-context [manual/chapterStorage.d] [networking/homepage.d] [networking/httpget.d] [networking/selector.d] [networking/sockethello.d] [networking/socketserver.d] [system/arguments.d] -synchronisation/* missing? [system/localtime.d] [system/normpath.d] [system/process.d] [text/formatalign.d] [text/formatindex.d] [text/formatspec.d] [text/localetime.d] [text/properties.d] [text/token.d] [text/xmldom.d] buildflags += -Jtext -don't know about globalising this ? [text/xmlpull.d] buildflags += -Jtext [text/xmlsax.d] buildflags += -Jtext [text/xmlpath.d] [vfs/vfszip.d] version (Windows) { buildflags += -L"zlib;libbz2"-made global } version (Posix) { buildflags += -L-lz -made global } --------------------------------------------------------------------------------------------------- So new one -tested [*] version (Windows) { buildflags += -L"zlib;libbz2" } version (Posix) { buildflags += -L-lz } #[cluster/Add.d]...........class no main [cluster/alert.d] [cluster/cclient.d] [cluster/cserver.d] [cluster/invalidate.d] [cluster/qclient.d] [cluster/qlisten.d] [cluster/qrequest.d] [cluster/qserver.d] [cluster/reply.d] #[cluster/task.d]..........does not compile uses Add #[cluster/tclient.d].......same #[cluster/tserver.d].......same # Perhaps cluster should not compile in case the inexperienced like myself # fiddle with them. Already swept my /home/ for all html's with /conduits/filebubbler # wiped the lot until it filled up and seg faulted ! [concurrency/fiber_test.d] buildflags += -unittest [conduits/composite.d] [conduits/createzip.d] [conduits/filebubbler.d] #[conduits/FileBucket.d] #.......class does not compile [conduits/filecat.d] [conduits/filecopy.d] [conduits/fileops.d] [conduits/filepathname.d] [conduits/filescan.d] [conduits/filescanregex.d] [conduits/lineio.d] [conduits/mmap.d] [conduits/paths.d] [conduits/randomio.d] [conduits/shuffle.d] [conduits/unifile.d] [console/buffered.d] [console/hello.d] [console/stdout.d] [logging/chainsaw.d] [logging/logging.d] [logging/multilog.d] [manual/chapterStorage.d] [networking/homepage.d] [networking/httpget.d] [networking/selector.d] [networking/sockethello.d] [networking/socketserver.d] [synchronization/barrier.d] [synchronization/condition.d] #[synchronization/mutex.d]..........does not compile [synchronization/readwritemutex.d] [synchronization/semaphore.d] [system/arguments.d] [system/localtime.d] [system/normpath.d] [system/process.d] [text/formatalign.d] [text/formatindex.d] [text/formatspec.d] [text/localetime.d] [text/properties.d] [text/token.d] [text/xmldom.d] buildflags += -Jtext [text/xmlpull.d] buildflags += -Jtext [text/xmlsax.d] buildflags += -Jtext [text/xmlpath.d] [vfs/vfszip.d] ------------------------------------------------------------------------------------- It looked like the Jake file for windows needed some work too |
March 18, 2008 Re: "D" annoyances | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ty Tower | Ty Tower Wrote:
> Ty Tower Wrote:
>
> > Take them as things to be fixed or deny their existence
> >
> > Either way I will post here the stupid things I find as I go through bits and pieces . The best critic is the most schooled in the subject
I wanted to do the install process again because it is such a mess I also wanted to write a guide for Linux users .
Now hereś the rub . Dsss requires dmd installed first.
So I go to get dmd 1.028
dmd 1.028 and all prior do not have an install instruction file in them so stupidly they dont associate the install instructions with each distribution
Now this means whatever install instructions you see on the web site are for the current distro only. So if you have downloaded the 5Meg file previously , you now can use it because the installation instructions may be wrong .
You have to download it again ! Clots
|
March 18, 2008 Re: "D" annoyances | ||||
---|---|---|---|---|
| ||||
Posted in reply to TyTower | And this is what you get when you follow their instructions . This is what got to me in the first place . I remember the frustration . Where the F#@! is std/file.d [root@localhost dsss-0.75]# make -f Makefile.dmd.posix cp -f rebuild/defaults/dmd-posix rebuild/rebuild.conf/default ./rebuild/rebuild -full -Irebuild sss/main.d -ofdsss sss/main.d(31): module file cannot read file 'std/file.d' make: *** [dsss] Error 1 [root@localhost dsss-0.75]# |
March 18, 2008 Re: "D" annoyances | ||||
---|---|---|---|---|
| ||||
Posted in reply to TyTower | Reply to tytower, The install process for DMD hasn't changed in so long the original could well have be written in stone and stored in the Ark. OTOH look for /dmd/html/d/dcompiler.html in dmd.zip |
March 19, 2008 Re: "D" annoyances | ||||
---|---|---|---|---|
| ||||
Posted in reply to TyTower | > > Ty Tower Wrote:
> >
> > > Take them as things to be fixed or deny their existence
> > >
> > > Either way I will post here the stupid things I find as I go through bits and pieces . The best critic is the most schooled in the subject
Well here we go again.
Whoever writes the installation notes for dsss and dmd should initially suggest to new users to put the directories in their $HOME directory . I see now that following the given instructions means you have some permission problems getting to object.d.
That causes errors in the compiles and the messages are cryptic from both of these programs. New lookers without some prior dmd and dsss experience will find the compiler output nearly indecipherable.
|
March 19, 2008 Re: "D" annoyances | ||||
---|---|---|---|---|
| ||||
Posted in reply to TyTower | > > Ty Tower Wrote:
> >
> > > Take them as things to be fixed or deny their existence
> > >
> > > Either way I will post here the stupid things I find as I go through bits and pieces . The best critic is the most schooled in the subject
DMD comes with samples - one in particular won't compile
This is the error
d2html.d(335): Error: identifier 'ReadError' is not defined
d2html.d(335): Error: ReadError is used as a type
and this the offending program piece
}
// if end of file is reached and we try to read something
// with typed read(), a ReadError is thrown; in our case,
// this means that job is successfully done
catch (ReadError e)
{
Dunno at this stage where ReadError comes from
Now looking at the English above what do they mean "with typed read() Should that be "with type read()"........"with a keyboard entry"......"with method read()"......."with function read()" .........God knows
|
March 19, 2008 Re: "D" annoyances | ||||
---|---|---|---|---|
| ||||
Posted in reply to TyTower | > > Ty Tower Wrote: > > > > > Take them as things to be fixed or deny their existence > > > > > > Either way I will post here the stupid things I find as I go through bits and pieces . The best critic is the most schooled in the subject A little more on the examples All of the COM examples ,chello.d,dclient.d,dserver.d don't compile along with winsamp.d. The reason given is /home/tytower/dmd/bin/../src/phobos/std/c/windows/windows.d(12): static assert is false Now I see a batch file leading to a script file for all in Windows but no Dsss.conf file for us Linux dumbos. I suppose these need special treatment or libraries. |
Copyright © 1999-2021 by the D Language Foundation