Awesome! These are exactly what I was looking for. Thanks!
On Friday, 12 September 2014 at 04:04:22 UTC, Ali Çehreli wrote:
On 09/11/2014 08:04 PM, AsmMan wrote:
what's an unicode alphabetic character?
Alphabetic is defined as Lu + Ll + Lt + Lm + Lo + Nl +
Other_Alphabetic, all of which are explained here:
async/await is not so much about futures/promises, but
optimization of IO-bound operations, i.e. when you wait on
network/disk, you don't consume stack, threads and similar
resources, an analog in D is vibe.d
On 09/11/2014 11:38 PM, AsmMan wrote:
If I want ASCII and latin only alphabet which range should I use?
ie, how should I rewrite is_id() function?
This seems to be it:
import std.stdio;
import std.uni;
void main()
{
alias latin = unicode.script.latin;
assert('ç' in latin);
On Thursday, 11 September 2014 at 22:39:40 UTC, H. S. Teoh via
Digitalmars-d-learn Why not just use std.regex?
foreach (line; myInput.split(regex(`\n|\r\n|\r`)))
{
...
}
T
I'll try the lazy variant of std.regex
foreach (line;
On Thursday, 11 September 2014 at 22:39:40 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
foreach (line; myInput.split(regex(`\n|\r\n|\r`)))
Shouldn't you use
foreach (line; myInput.split(regex(\n|\r\n|\r)))
here?
consider the following :
in file a.d
module a;
class class_a
{
struct RESULT{
string[] raw;
void* res;
}
RESULT r;
void dothing()
{
r = new RESULT;
string aa = string;
r.raw ~= aa;
r.res = cast(void*) aa;
}
}
in file b.d
import a;// import path is okey
On Friday, 12 September 2014 at 13:25:22 UTC, Nordlöw wrote:
On Thursday, 11 September 2014 at 22:39:40 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
foreach (line; myInput.split(regex(`\n|\r\n|\r`)))
Shouldn't you use
foreach (line; myInput.split(regex(\n|\r\n|\r)))
here?
There are multiple problems with the code. Is that really what you are
using?
On 09/12/2014 06:35 AM, seany wrote:
consider the following :
in file a.d
module a;
class class_a
{
struct RESULT{
string[] raw;
void* res;
}
RESULT r;
void dothing()
{
r = new RESULT;
On Friday, 12 September 2014 at 07:15:33 UTC, Kagamin wrote:
async/await is not so much about futures/promises, but
optimization of IO-bound operations, i.e. when you wait on
network/disk, you don't consume stack, threads and similar
resources, an analog in D is vibe.d
I should have been
On Friday, 12 September 2014 at 15:26:34 UTC, Ali Çehreli wrote:
you are right, it was a reduced form, of a very complex software.
in file a.d
module a;
class class_a
{
struct RESULT{
string[] raw;
void* res;
}
RESULT * r;
void dothing()
{
r = new RESULT;
string aa =
On Friday, 12 September 2014 at 14:16:07 UTC, monarch_dodra wrote:
Probably not, as (AFAIK) the splitter engine *itself* will
*also* escape the passed in characters. IE: It literally needs
the characters '\' and 'n'.
I ended up with this.
On 09/12/2014 12:16 PM, seany wrote:
On Friday, 12 September 2014 at 15:26:34 UTC, Ali Çehreli wrote:
you are right, it was a reduced form, of a very complex software.
Maybe others can figure it out by reading the code but a working code
that reproduces the problem is very important for
On Thursday, 11 September 2014 at 09:55:05 UTC, Nordlöw wrote:
On Thursday, 11 September 2014 at 09:53:34 UTC, Nordlöw wrote:
I've tried removing ~/.dub/packages with no progres.
I'm using dub git master.
See https://github.com/D-Programming-Language/dub/issues/418
for an explanation.
// the following two lines compile cleanly but when executed, I
get
// D:\Projects\Derelict02_SimpleOpenGL_3_3_program.exe
// object.Error: Access Violation
//
string glShadingLangVer =
to!string(glGetString(GL_SHADING_LANGUAGE_VERSION));
writeln(glShadingLangVer is ,
On 09/12/2014 03:44 PM, WhatMeWorry wrote:
// the following two lines compile cleanly but when executed, I get
// D:\Projects\Derelict02_SimpleOpenGL_3_3_program.exe
// object.Error: Access Violation
//
string glShadingLangVer =
On Friday, 12 September 2014 at 07:57:43 UTC, Ali Çehreli wrote:
On 09/11/2014 11:38 PM, AsmMan wrote:
If I want ASCII and latin only alphabet which range should I
use?
ie, how should I rewrite is_id() function?
This seems to be it:
import std.stdio;
import std.uni;
void main()
{
alias
Thanks Ali, I think I get close:
bool is_id(dchar c)
{
return c = 'a' c = 'z' || c = 'A' c = 'Z' || c = 0xc0
c = 0x0d || c = 0xd8 c = 0xf6 || c = 0xf8 c = 0xff;
}
this doesn't include some math symbols. like c = 0xc0 did.
On Friday, 12 September 2014 at 22:53:35 UTC, Ali Çehreli wrote:
On 09/12/2014 03:44 PM, WhatMeWorry wrote:
// the following two lines compile cleanly but when executed,
I get
// D:\Projects\Derelict02_SimpleOpenGL_3_3_program.exe
// object.Error: Access Violation
//
string
On 09/12/2014 05:52 PM, WhatMeWorry wrote:
Isn't this a contradiction. The documentation says glGetString
returns a pointer to a static string...
They are talking about a C string, which is normally a 'char*' (their
API returns 'GLubyte*' but it doesn't matter here).
But further on down
20 matches
Mail list logo