Jump to page: 1 25  
Page
Thread overview
Text in D article
Nov 18, 2006
Daniel Keep
Nov 18, 2006
Alexander Panek
Nov 18, 2006
Daniel Keep
Nov 18, 2006
Daniel Keep
Nov 18, 2006
Tydr Schnubbis
Nov 18, 2006
Alexander Panek
Nov 18, 2006
Max Samuha
Nov 18, 2006
Daniel Keep
Nov 18, 2006
Max Samuha
Nov 19, 2006
Daniel Keep
Nov 19, 2006
Daniel Keep
Nov 18, 2006
Bill Baxter
Nov 19, 2006
Daniel Keep
Nov 18, 2006
Lutger
Nov 18, 2006
Daniel Keep
Nov 18, 2006
Walter Bright
Nov 19, 2006
Daniel Keep
Nov 19, 2006
Walter Bright
Nov 19, 2006
Daniel Keep
Nov 18, 2006
Serg Kovrov
Nov 19, 2006
Daniel Keep
Nov 19, 2006
Serg Kovrov
Nov 19, 2006
Daniel Keep
Nov 18, 2006
Pierre Rouleau
Nov 18, 2006
Pierre Rouleau
Nov 19, 2006
Daniel Keep
Nov 19, 2006
Pierre Rouleau
Re: Text in D article (3rd revision)
Nov 19, 2006
Daniel Keep
Re: Text in D article (4th revision)
Nov 19, 2006
Daniel Keep
Nov 19, 2006
Hasan Aljudy
Nov 19, 2006
Daniel Keep
Re: Text in D article (4th revision) [OT] ha vs wa
Nov 19, 2006
Hasan Aljudy
Nov 19, 2006
Bill Baxter
Nov 20, 2006
Bruno Medeiros
Nov 20, 2006
Bill Baxter
Nov 20, 2006
Don Clugston
Dec 22, 2006
BCS
November 18, 2006
Here's a draft of an article which, hopefully, will explain some of the details of how text in D works.  Any constructive criticism is welcomed, along with edits or corrections.

Also, any suggestions on where to put this?  Ideally it could go on the D website, but I think anywhere would be fine so long as we can point people to it.

	-- Daniel

-- 
Unlike Knuth, I have neither proven or tried the above; it may not even make sense.

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/


November 18, 2006
Daniel Keep wrote:

> Also, any suggestions on where to put this?  Ideally it could go on the
> D website, but I think anywhere would be fine so long as we can point
> people to it.

If you change the license you can put it in the Wiki4D ?

Like http://www.prowiki.org/wiki4d/wiki.cgi?CharsAndStrs

--anders
November 18, 2006
Would perfectly fit into a wiki! Would be great to have such a text on wiki4d or dsource.org's tutorials.

Alex

Anders F Björklund wrote:
> Daniel Keep wrote:
> 
>> Also, any suggestions on where to put this?  Ideally it could go on the
>> D website, but I think anywhere would be fine so long as we can point
>> people to it.
> 
> If you change the license you can put it in the Wiki4D ?
> 
> Like http://www.prowiki.org/wiki4d/wiki.cgi?CharsAndStrs
> 
> --anders
November 18, 2006
Daniel Keep wrote:

> Here's a draft of an article which, hopefully, will explain some of the
> details of how text in D works.  Any constructive criticism is welcomed,
> along with edits or corrections.

I would avoid the term "Unicode character" like the plague...
If you must have something similar, then use "code point" ?
It's OK to have it in the casual text, like "ASCII character,
BMP character, Unicode character" but better not in the lists.

It also has an example on why: printf("Hello, World!\n");
doesn't work. But it does, since string *literals* are all
NUL-terminated. However, when you then try to extend that
to a string variable, and that variable contains a slice...

--anders
November 18, 2006

Anders F Björklund wrote:
> Daniel Keep wrote:
> 
>> Here's a draft of an article which, hopefully, will explain some of the details of how text in D works.  Any constructive criticism is welcomed, along with edits or corrections.
> 
> I would avoid the term "Unicode character" like the plague... If you must have something similar, then use "code point" ? It's OK to have it in the casual text, like "ASCII character, BMP character, Unicode character" but better not in the lists.

Mmm.  I was trying to use the correct terms where appropriate, I just didn't want it to descend into unintelligible gibberish.  This is sort of aimed at the person who has no idea what a 'code point' or 'code unit' even is.

> It also has an example on why: printf("Hello, World!\n"); doesn't work. But it does, since string *literals* are all NUL-terminated. However, when you then try to extend that to a string variable, and that variable contains a slice...
> 
> --anders

Very true.  I suppose I *should* say that literals are NUL-terminated, but I want to make it perfectly clear that relying on this is a bad idea; is it accepted practice to simply treat all strings as if they were possibly non NUL-terminated?

	-- Daniel

-- 
Unlike Knuth, I have neither proven or tried the above; it may not even make sense.

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/
November 18, 2006

Anders F Björklund wrote:
> Daniel Keep wrote:
> 
>> Also, any suggestions on where to put this?  Ideally it could go on the D website, but I think anywhere would be fine so long as we can point people to it.
> 
> If you change the license you can put it in the Wiki4D ?

I'm happy to change the license so it can be used elsewhere... just trying to find a site that actually has the full FDL and isn't down :(

I chose CC At-Sa since it should be pretty permissive; all you need to do is attribute the original author and make sure you don't change the license.  I thought that's what the FDL did :P

> Like http://www.prowiki.org/wiki4d/wiki.cgi?CharsAndStrs

Some good info there; even a few things I didn't know!  Might try to work some of it in.

> --anders

	-- Daniel

-- 
Unlike Knuth, I have neither proven or tried the above; it may not even make sense.

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/
November 18, 2006
Daniel Keep wrote:
> Here's a draft of an article which, hopefully, will explain some of the
> details of how text in D works.  Any constructive criticism is welcomed,
> along with edits or corrections.
> 
Any chance of an .rtf, .doc, or even .txt? :)
November 18, 2006
Daniel Keep wrote:
> Here's a draft of an article which, hopefully, will explain some of the
> details of how text in D works.  Any constructive criticism is welcomed,
> along with edits or corrections.
> 
> Also, any suggestions on where to put this?  Ideally it could go on the
> D website, but I think anywhere would be fine so long as we can point
> people to it.
> 
> 	-- Daniel
> 

Cool information! I only recently became aware of how unicode works because of this newsgroup. The current solution in D looks fine to me, it's just that people are not aware of it and the documentation doesn't help much in increasing unicode awareness. I would vote for this information being incorporated right into the relevant sections of the official documentation.

Probably the best advice I read here was that if you want your text to just work, you either use dchar or do all string handling with std.string. It's very simple, don't go messing with char[] without the help of phobos unless you know what you're doing. Perhaps you could put something like that in the beginning of your document.

D does have something similar to a string class in the form of std.string imo, the only thing is that's it's procedural instead of object-based. I don't see a problem with that.
November 18, 2006
PDF would be great, too.

Tydr Schnubbis wrote:
> Daniel Keep wrote:
>> Here's a draft of an article which, hopefully, will explain some of the
>> details of how text in D works.  Any constructive criticism is welcomed,
>> along with edits or corrections.
>>
> Any chance of an .rtf, .doc, or even .txt? :)
November 18, 2006
On Sat, 18 Nov 2006 15:59:33 +0100, Alexander Panek <a.panek@brainsware.org> wrote:

>PDF would be great, too.
>
>Tydr Schnubbis wrote:
>> Daniel Keep wrote:
>>> Here's a draft of an article which, hopefully, will explain some of the details of how text in D works.  Any constructive criticism is welcomed, along with edits or corrections.
>>>
>> Any chance of an .rtf, .doc, or even .txt? :)
For those who is still on Windows :), thiere is a free and compact doc viewer that supports the open office format http://www.officeviewers.com/
« First   ‹ Prev
1 2 3 4 5