V Thu, 25 Sep 2014 05:29:36 +
AsmMan via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
napsáno:
Does D has C#'s string.Empty?
string.init
On Thursday, 25 September 2014 at 06:41:55 UTC, Daniel Kozak via
Digitalmars-d-learn wrote:
V Thu, 25 Sep 2014 05:29:36 +
AsmMan via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com
napsáno:
Does D has C#'s string.Empty?
string.init
first ^^
On Thursday, 25 September 2014 at 05:29:37 UTC, AsmMan wrote:
Does D has C#'s string.Empty?
string.init ?
string a;
a = string.init;
assert( a == );
does the job for the type string at least.
On Wednesday, 24 September 2014 at 17:15:39 UTC, Ali Çehreli
wrote:
find() and friends can be used:
import std.algorithm;
void main()
{
string path = myFile.doc;
string extension = .doc;
path = findSplitBefore(path, extension)[0];
assert(path == myFile);
}
I had thought of
I was playing around with how T.init works. And I think I may
have found a type loophole.
Given that you may initialize a pointer member to the address to
a static global:
//
__gshared int a = 0;
struct S
{
int* p = a;
}
//
Then, in theory, any variable, be they mutable or
On 9/23/14 7:12 PM, Ali Çehreli wrote:
Can we get rid of the ResultT template parameter? Tricks with variadic
templates, the with statement, etc. come to mind but I could not manage it.
I don't think so.
yield just returns control back to another fiber. It's not an entry point.
What you
On 9/25/14 2:41 AM, SlomoTheBrave wrote:
On Thursday, 25 September 2014 at 05:29:37 UTC, AsmMan wrote:
Does D has C#'s string.Empty?
string.init ?
string a;
a = string.init;
assert( a == );
does the job for the type string at least.
null also works. In fact, in the
On 9/25/14 5:47 AM, monarch_dodra wrote:
I was playing around with how T.init works. And I think I may have found
a type loophole.
Given that you may initialize a pointer member to the address to a
static global:
//
__gshared int a = 0;
struct S
{
int* p = a;
}
//
Then, in
On Thursday, 25 September 2014 at 12:46:01 UTC, Steven
Schveighoffer wrote:
On 9/25/14 5:47 AM, monarch_dodra wrote:
I was playing around with how T.init works. And I think I may
have found
a type loophole.
Given that you may initialize a pointer member to the address
to a
static global:
On 9/25/14 9:00 AM, monarch_dodra wrote:
On Thursday, 25 September 2014 at 12:46:01 UTC, Steven Schveighoffer wrote:
On 9/25/14 5:47 AM, monarch_dodra wrote:
I was playing around with how T.init works. And I think I may have found
a type loophole.
Given that you may initialize a pointer
On Thursday, 25 September 2014 at 13:37:52 UTC, Steven
Schveighoffer wrote:
On 9/25/14 9:00 AM, monarch_dodra wrote:
On Thursday, 25 September 2014 at 12:46:01 UTC, Steven
Schveighoffer wrote:
On 9/25/14 5:47 AM, monarch_dodra wrote:
I was playing around with how T.init works. And I think I
Hi,
How I can sign a request for flickrl oauth api?
https://www.flickr.com/services/api/auth.oauth.html#request_token
there is no HMAC-SHA1 algorithm in phobos library... should I
implement it from scratch?
Thanks,
Bogdan
On Wednesday, 24 September 2014 at 13:59:41 UTC, csmith wrote:
On Wednesday, 24 September 2014 at 11:07:56 UTC, Mike Parker
wrote:
You're using deprecated OpenGL calls. The gl3 module only
declares and loads modern OpenGL. If you really want to use
the deprecated stuff, change the gl3 import
Thanks a lot.
Kind regards
André
On Thu, Sep 25, 2014 at 03:57:36PM +, szabo bogdan via Digitalmars-d-learn
wrote:
Hi,
How I can sign a request for flickrl oauth api?
https://www.flickr.com/services/api/auth.oauth.html#request_token
there is no HMAC-SHA1 algorithm in phobos library... should I implement it
from
which lib do you recommand?
On Thursday, 25 September 2014 at 16:19:41 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
On Thu, Sep 25, 2014 at 03:57:36PM +, szabo bogdan via
Digitalmars-d-learn wrote:
Hi,
How I can sign a request for flickrl oauth api?
there is no HMAC-SHA1 algorithm in phobos library... should I
implement it from scratch?
http://dlang.org/phobos/std_digest_sha.html#SHA1
On Thursday, 25 September 2014 at 17:03:43 UTC, John Chapman
wrote:
http://dlang.org/phobos/std_digest_sha.html#SHA1
Not quite the same, the oauth requires hmac.
When I did this in my oauth.d for twitter and stuff, I used the C
library mhash
check out my code:
I tried to compile phobos according to the last paragraph in this
page:
http://dlang.org/dmd-linux.html
but this is the error I have
fatal: Not a git repository (or any of the parent directories):
.git
I dont know what happened, i have tried for a few days.
BTW, should I place my dmd2
On 09/25/2014 05:40 AM, Steven Schveighoffer wrote:
On 9/23/14 7:12 PM, Ali Çehreli wrote:
Can we get rid of the ResultT template parameter? Tricks with variadic
templates, the with statement, etc. come to mind but I could not
manage it.
I don't think so.
Me neither. :) This question
On Thursday, 25 September 2014 at 17:09:40 UTC, Adam D. Ruppe
wrote:
On Thursday, 25 September 2014 at 17:03:43 UTC, John Chapman
wrote:
http://dlang.org/phobos/std_digest_sha.html#SHA1
Not quite the same, the oauth requires hmac.
When I did this in my oauth.d for twitter and stuff, I used
On 9/25/14 10:56 AM, monarch_dodra wrote:
On Thursday, 25 September 2014 at 13:37:52 UTC, Steven Schveighoffer wrote:
But clearly, any code that results in an immutable pointer to mutable
data without casts is incorrect. We should start by outlawing such
code, and if there are ways we can
On Thursday, 25 September 2014 at 17:20:42 UTC, JJDuck wrote:
I tried to compile phobos according to the last paragraph in
this page:
http://dlang.org/dmd-linux.html
but this is the error I have
fatal: Not a git repository (or any of the parent directories):
.git
I dont know what happened,
On Thursday, 25 September 2014 at 17:20:42 UTC, JJDuck wrote:
I tried to compile phobos according to the last paragraph in
this page:
http://dlang.org/dmd-linux.html
but this is the error I have
fatal: Not a git repository (or any of the parent directories):
.git
I dont know what happened,
On Thu, Sep 25, 2014 at 06:43:14PM +, monarch_dodra via Digitalmars-d-learn
wrote:
On Thursday, 25 September 2014 at 17:20:42 UTC, JJDuck wrote:
I tried to compile phobos according to the last paragraph in this page:
http://dlang.org/dmd-linux.html
but this is the error I have
fatal:
This happens with a freshly checked out master. I first build
DMD, which completes successfully. However, when I then try to
build Druntime, I got the following error messages:
src\core\stdc\wchar_.d(32): Error: undefined identifier FILE
src\core\stdc\wchar_.d(33): Error: undefined identifier
A few questions regarding GC.malloc.
When requesting a chunk of memory from GC.malloc am i right in
assuming that this chunk is scanned for pointers to other GC
resources in order to make decisions whether to collect them or
not?
What does BlkAttr.FINALIZE do when used in the GC.malloc
On Thursday, 25 September 2014 at 20:58:29 UTC, Gary Willoughby
wrote:
A few questions regarding GC.malloc.
When requesting a chunk of memory from GC.malloc am i right in
assuming that this chunk is scanned for pointers to other GC
resources in order to make decisions whether to collect them
On Thursday, 25 September 2014 at 21:43:53 UTC, monarch_dodra
wrote:
On Thursday, 25 September 2014 at 20:58:29 UTC, Gary Willoughby
wrote:
A few questions regarding GC.malloc.
When requesting a chunk of memory from GC.malloc am i right in
assuming that this chunk is scanned for pointers to
I'm a bit puzzled with the following behavior:
import std.typetuple, std.traits;
struct UDAStruct {
string identifier;
}
class MyClass {
@(UDAStruct(p1), UDAStruct(p2), UDAStruct(P3)) // P3 is
a typo
void func(int p1, string p2, float p3) {}
}
unittest {
alias Func =
On Thursday, 25 September 2014 at 22:11:20 UTC, Mathias LANG
wrote:
I'm a bit puzzled with the following behavior:
import std.typetuple, std.traits;
struct UDAStruct {
string identifier;
}
class MyClass {
@(UDAStruct(p1), UDAStruct(p2), UDAStruct(P3)) // P3
is a typo
void
On 09/25/2014 04:08 PM, SlomoTheBrave wrote:
On Thursday, 25 September 2014 at 22:11:20 UTC, Mathias LANG wrote:
I'm a bit puzzled with the following behavior:
import std.typetuple, std.traits;
struct UDAStruct {
string identifier;
}
class MyClass {
@(UDAStruct(p1),
On Thursday, 25 September 2014 at 06:41:03 UTC, SlomoTheBrave
wrote:
On Thursday, 25 September 2014 at 05:29:37 UTC, AsmMan wrote:
Does D has C#'s string.Empty?
string.init ?
string a;
a = string.init;
assert( a == );
does the job for the type string at least.
On Thursday, 25 September 2014 at 12:43:57 UTC, Steven
Schveighoffer wrote:
On 9/25/14 2:41 AM, SlomoTheBrave wrote:
On Thursday, 25 September 2014 at 05:29:37 UTC, AsmMan wrote:
Does D has C#'s string.Empty?
string.init ?
string a;
a = string.init;
assert( a == );
On Fri, 26 Sep 2014 00:24:27 +
AsmMan via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
It made me a bit confusing. How is the implementation of string
comparasion in D?
has length of 0. null has length of 0. two strings without content
are essentialy the same.
On Thu, 25 Sep 2014 19:13:58 +
Meta via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
This happens with a freshly checked out master. I first build
DMD, which completes successfully. However, when I then try to
build Druntime, I got the following error messages:
can't
On Friday, 26 September 2014 at 00:53:24 UTC, ketmar via
Digitalmars-d-learn wrote:
On Fri, 26 Sep 2014 00:24:27 +
AsmMan via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com
wrote:
It made me a bit confusing. How is the implementation of string
comparasion in D?
has length of 0.
On Fri, 26 Sep 2014 01:08:59 +
AsmMan via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
but null has length? what's null in D?
no, it's dynamic array that have `.length`. compiler magic. assigning
`null` to dynamic array variable does some magic under the hood.
dynamic array
On Fri, 26 Sep 2014 01:08:59 +
AsmMan via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
has length of 0. null has length of 0. two strings without
content
are essentialy the same.
but null has length? what's null in D?
i confused you here, sorry. what i mean is 'null
On Friday, 26 September 2014 at 01:09:01 UTC, AsmMan wrote:
On Friday, 26 September 2014 at 00:53:24 UTC, ketmar via
Digitalmars-d-learn wrote:
On Fri, 26 Sep 2014 00:24:27 +
AsmMan via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com
wrote:
It made me a bit confusing. How is the
On Wednesday, 24 September 2014 at 10:28:05 UTC, Suliman wrote:
string path = thisExePath()
Seems like dirName in std.path is a good candidate ;)
http://dlang.org/phobos/std_path.html#.dirName
You'll find many other path manipulation functions there.
Thanks! But if I want to strip it, how I
On Friday, 26 September 2014 at 03:32:46 UTC, Jay Norwood wrote:
On Wednesday, 24 September 2014 at 10:28:05 UTC, Suliman wrote:
string path = thisExePath()
Seems like dirName in std.path is a good candidate ;)
http://dlang.org/phobos/std_path.html#.dirName
You'll find many other path
42 matches
Mail list logo