On 06/10/14 19:48, H. S. Teoh via Digitalmars-d-learn wrote:
This looks wrong to me. Are you sure this finds *all* possible
graphemes?
No, the data I gave was to detect a complete code unit. Graphemes are
something else, I think Uranuz is mixing up the Unicode terms.
--
/Jacob Carlborg
On Mon, 06 Oct 2014 21:24:54 +
AsmMan via Digitalmars-d-learn
wrote:
> Which practice do you use: if you need only one or two functions
> from a module:
>
> import myModule : func, func2;
>
> or (import whole module, assuming no function name conflits of
> course)
>
> import myModule;
>
On Monday, 6 October 2014 at 22:11:50 UTC, Nordlöw wrote:
https://github.com/nordlow/justd/blob/master/range_ex.d#L18
One more thing: I'm unsure how the indexes lower and upper should
be treated for narrow strings. Should an index represent a code
point or a code unit? I'm not sure. In either
On Mon, Oct 06, 2014 at 09:24:54PM +, AsmMan via Digitalmars-d-learn wrote:
> Which practice do you use: if you need only one or two functions from
> a module:
>
> import myModule : func, func2;
>
> or (import whole module, assuming no function name conflits of course)
>
> import myModule;
>
AsmMan:
import myModule : func, func2;
I use this in D to know what I have imported and where is was
imported from.
Bye,
bearophile
On Monday, 6 October 2014 at 21:15:10 UTC, monarch_dodra wrote:
I don't know how your "radial" works. Does the first "back"
print "([1, 2, 3], [])" as it should?
I nailed it!
The problem was the definition of opSlice.
I had to add an extra internal state
lower == upper + 1
to represent
On Monday, 6 October 2014 at 21:15:10 UTC, monarch_dodra wrote:
I don't have time to investigate tonight, and it's probably not
it, but your "save" isn't saving "_upper".
No, that wasn't the current problem.
Thanks for catching it anyway.
On Monday, 6 October 2014 at 21:15:10 UTC, monarch_dodra wrote:
I don't have time to investigate tonight, and it's probably not
it, but your "save" isn't saving "_upper".
I don't know how your "radial" works. Does the first "back"
print "([1, 2, 3], [])" as it should?
I've added some extra a
Which practice do you use: if you need only one or two functions
from a module:
import myModule : func, func2;
or (import whole module, assuming no function name conflits of
course)
import myModule;
any words why one over the other are welcome.
I like the first one why it explicitly show w
On Monday, 6 October 2014 at 20:06:41 UTC, Nordlöw wrote:
I've almost satisfied with my new range slidingSplitter at
https://github.com/nordlow/justd/blob/master/range_ex.d#L19
All unittest work as expected except my radial test
https://github.com/nordlow/justd/blob/master/range_ex.d#L243
whi
I've almost satisfied with my new range slidingSplitter at
https://github.com/nordlow/justd/blob/master/range_ex.d#L19
All unittest work as expected except my radial test
https://github.com/nordlow/justd/blob/master/range_ex.d#L243
which, I believe, incorrectly prints
Tuple!(int[], int[])([1,
On Monday, 6 October 2014 at 19:03:13 UTC, John Colvin wrote:
On Monday, 6 October 2014 at 16:04:02 UTC, eles wrote:
On Monday, 6 October 2014 at 15:44:36 UTC, John Colvin wrote:
On Monday, 6 October 2014 at 12:36:41 UTC, ketmar via
Digitalmars-d-learn wrote:
On Mon, 06 Oct 2014 11:54:55 +
On Monday, 6 October 2014 at 16:04:02 UTC, eles wrote:
On Monday, 6 October 2014 at 15:44:36 UTC, John Colvin wrote:
On Monday, 6 October 2014 at 12:36:41 UTC, ketmar via
Digitalmars-d-learn wrote:
On Mon, 06 Oct 2014 11:54:55 +
John Colvin via Digitalmars-d-learn
wrote:
I disagree. It
On Monday, 6 October 2014 at 17:11:51 UTC, ANtlord wrote:
Good day! I recenlty have tried create typical project on
vibe.d. The web framework is not bad. And I can say, that it is
better that something another web frameworks. But I have met a
problem. I can't find search engine.
I use xapian
On Monday, 6 October 2014 at 17:28:45 UTC, Uranuz wrote:
( str[index] & 0b1000 ) == 0 ||
( str[index] & 0b1110 ) == 0b1100 ||
( str[index] & 0b ) == 0b1110 ||
( str[index] & 0b1000 ) == 0b
If it is true it means that first byte of sequence found and I
can cou
On 10/06/2014 04:40 AM, monarch_dodra wrote:
On Monday, 6 October 2014 at 11:28:16 UTC, John Colvin wrote:
string a;
char[] b;
pragma(msg, typeof(a ~ b)); // char[]
why not string?
What are the rules that determine this?
*Ideally*, I'd have said "it returns char[], so that you can chose via
On Mon, Oct 06, 2014 at 05:28:43PM +, Uranuz via Digitalmars-d-learn wrote:
> >
> >Have a look here [1]. For example, if you have a byte that is between
> >U+0080 and U+07FF you know that you need two bytes to get that whole
> >code point.
> >
> >[1] http://en.wikipedia.org/wiki/UTF-8#Descripti
On Mon, 06 Oct 2014 17:28:43 +
Uranuz via Digitalmars-d-learn
wrote:
> If it is true it means that first byte of sequence found and I
> can count them. Am I right that it equals to number of graphemes,
> or are there some exceptions from this rule?
alot. take for example RIGHT-TO-LEFT MARK,
On 10/06/2014 05:50 AM, ketmar via Digitalmars-d-learn wrote:
On Mon, 06 Oct 2014 12:17:00 +
Alice via Digitalmars-d-learn wrote:
the joy of mixin bugs, yeah! it's a bug in compiler: it instantiates
mixin in invalid scope. for now you can use string mixins, they are
working fine.
you also
Have a look here [1]. For example, if you have a byte that is
between U+0080 and U+07FF you know that you need two bytes to
get that whole code point.
[1] http://en.wikipedia.org/wiki/UTF-8#Description
Thanks. I solved it myself already for UTF-8 encoding. There
choosed approach with using
On 10/6/14 1:01 PM, monarch_dodra wrote:
On Monday, 6 October 2014 at 16:38:37 UTC, Steven Schveighoffer wrote:
I filed this ER ages ago: https://issues.dlang.org/show_bug.cgi?id=1654
Not sure if anyone has it on their radar at this point.
-Steve
I didn't read the whole thing, but wouldn't p
Good day! I recenlty have tried create typical project on vibe.d.
The web framework is not bad. And I can say, that it is better
that something another web frameworks. But I have met a problem.
I can't find search engine.
I use xapian always. It has API for several languages, but except
D. I
On Monday, 6 October 2014 at 16:02:40 UTC, eles wrote:
On Monday, 6 October 2014 at 13:23:55 UTC, John Colvin wrote:
On Monday, 6 October 2014 at 12:16:14 UTC, eles wrote:
On Monday, 6 October 2014 at 11:54:56 UTC, John Colvin wrote:
On Monday, 6 October 2014 at 10:10:04 UTC, eles wrote:
On Sa
On Monday, 6 October 2014 at 16:38:37 UTC, Steven Schveighoffer
wrote:
I filed this ER ages ago:
https://issues.dlang.org/show_bug.cgi?id=1654
Not sure if anyone has it on their radar at this point.
-Steve
I didn't read the whole thing, but wouldn't purity be a major
game changer for 1654?
On 10/6/14 7:28 AM, John Colvin wrote:
string a;
char[] b;
pragma(msg, typeof(a ~ b)); // char[]
why not string?
It really should be whatever you want. a ~ b is going to generate a
completely unique independent copy of a and b.
What are the rules that determine this?
Not sure. I would ha
On Monday, 6 October 2014 at 15:44:36 UTC, John Colvin wrote:
On Monday, 6 October 2014 at 12:36:41 UTC, ketmar via
Digitalmars-d-learn wrote:
On Mon, 06 Oct 2014 11:54:55 +
John Colvin via Digitalmars-d-learn
wrote:
I disagree. It's simple and easy to understand.
and hackish.
D is v
On Monday, 6 October 2014 at 13:23:55 UTC, John Colvin wrote:
On Monday, 6 October 2014 at 12:16:14 UTC, eles wrote:
On Monday, 6 October 2014 at 11:54:56 UTC, John Colvin wrote:
On Monday, 6 October 2014 at 10:10:04 UTC, eles wrote:
On Saturday, 4 October 2014 at 15:29:57 UTC, John Colvin
wro
On Mon, 06 Oct 2014 15:44:34 +
John Colvin via Digitalmars-d-learn
wrote:
> >> I disagree. It's simple and easy to understand.
> > and hackish.
> D is very amenable to slightly hackish code.
D allows to write hackish code, and it's good. but if we can provide a
way to write less hackish code,
On Monday, 6 October 2014 at 12:36:41 UTC, ketmar via
Digitalmars-d-learn wrote:
On Mon, 06 Oct 2014 11:54:55 +
John Colvin via Digitalmars-d-learn
wrote:
I disagree. It's simple and easy to understand.
and hackish.
D is very amenable to slightly hackish code.
This is the only genuin
btw, do you mind to fill a bugreport?
Okay, will do so once I get home from work. Thanks for the scope
tip. Will try that out later too.
On Sunday, 5 October 2014 at 12:09:34 UTC, Uranuz wrote:
Maybe there is some idea how to just detect first code unit of
grapheme without overhead for using Grapheme struct? I just
tried to check if ch < 128 (for UTF-8). But this dont work. How
to check if byte is continuation of code for single
On Monday, 6 October 2014 at 12:16:14 UTC, eles wrote:
On Monday, 6 October 2014 at 11:54:56 UTC, John Colvin wrote:
On Monday, 6 October 2014 at 10:10:04 UTC, eles wrote:
On Saturday, 4 October 2014 at 15:29:57 UTC, John Colvin
wrote:
On Saturday, 4 October 2014 at 11:19:52 UTC, ketmar via
Di
On Mon, 06 Oct 2014 12:17:00 +
Alice via Digitalmars-d-learn wrote:
the joy of mixin bugs, yeah! it's a bug in compiler: it instantiates
mixin in invalid scope. for now you can use string mixins, they are
working fine.
you also can use this to fix scoping:
=== ModuleA.d ===
module Module
On Mon, 06 Oct 2014 11:54:55 +
John Colvin via Digitalmars-d-learn
wrote:
> I disagree. It's simple and easy to understand.
and hackish.
> This is the only genuine problem I can see that requires a
> language extension. Separating class definition from method
> definition in to different c
And just this second I found this... but it's a few months old
and has no follow up.
http://forum.dlang.org/thread/mailman.1054.1398548687.2763.digitalmars-d-b...@puremagic.com
On Monday, 6 October 2014 at 12:17:01 UTC, Alice wrote:
Hi,
I've created a template mixin which contains a struct
On Monday, 6 October 2014 at 11:54:56 UTC, John Colvin wrote:
On Monday, 6 October 2014 at 10:10:04 UTC, eles wrote:
On Saturday, 4 October 2014 at 15:29:57 UTC, John Colvin wrote:
On Saturday, 4 October 2014 at 11:19:52 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sat, 04 Oct 2014 11:01:28 +
Hi,
I've created a template mixin which contains a struct definition.
The template is meant to be mixed into each module - to provide a
little bit of auto generated info in each module - generated at
compile time. As soon as I reference the symbols in any context,
it starts complaining about
Unicode is hard to deal with properly as how you deal with it is
very context dependant.
One grapheme is a visible character and consists of one or more
codepoints. One codepoint is one mapping of a byte sequence to a
meaning, and consists of one or more bytes.
This you do not want to deal with
On Monday, 6 October 2014 at 10:10:04 UTC, eles wrote:
On Saturday, 4 October 2014 at 15:29:57 UTC, John Colvin wrote:
On Saturday, 4 October 2014 at 11:19:52 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sat, 04 Oct 2014 11:01:28 +
John Colvin via Digitalmars-d-learn
wrote:
On Saturday
On Monday, 6 October 2014 at 11:28:16 UTC, John Colvin wrote:
string a;
char[] b;
pragma(msg, typeof(a ~ b)); // char[]
why not string?
What are the rules that determine this?
*Ideally*, I'd have said "it returns char[], so that you can
chose via purity".
However, it's not pure, so that ar
string a;
char[] b;
pragma(msg, typeof(a ~ b)); // char[]
why not string?
What are the rules that determine this?
On Friday, 3 October 2014 at 10:53:27 UTC, Marc Schütz wrote:
On Friday, 3 October 2014 at 04:57:28 UTC, AntonSotov wrote:
auto http = HTTP("dlang.org");
http.onReceive = (ubyte[] data)
{
writeln(cast(string) (data));
return data.length;
};
http.proxy = "192.168.111.111";
http.proxyP
I found out the real issue. Using addRequestHeader also works for
cookies, but there is an issue with HTTP attribute
responseHeaders.
As this attribute is an associative array (string[string]) it
contains only 1 value for 1 key.
In case there are several HTTP keys with the same name, it only
co
On Saturday, 4 October 2014 at 15:29:57 UTC, John Colvin wrote:
On Saturday, 4 October 2014 at 11:19:52 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sat, 04 Oct 2014 11:01:28 +
John Colvin via Digitalmars-d-learn
wrote:
On Saturday, 4 October 2014 at 10:38:32 UTC, ketmar via
Digitalmar
44 matches
Mail list logo