On Friday, 26 September 2014 at 05:59:33 UTC, AsmMan wrote:
for debugging purposes, I need to get the caller name. Is it
possible? if so, how do I do this?
void foo()
{
baa();
}
void baa()
{
wrilten(caller_name()); // foo
}
I know I could create an extra parameter and pass the current
fu
On Fri, 26 Sep 2014 05:59:32 +
AsmMan via Digitalmars-d-learn
wrote:
> for debugging purposes, I need to get the caller name. Is it
> possible? if so, how do I do this?
use debugger? or parse debugging info and do stackwalk.
signature.asc
Description: PGP signature
for debugging purposes, I need to get the caller name. Is it
possible? if so, how do I do this?
void foo()
{
baa();
}
void baa()
{
wrilten(caller_name()); // foo
}
I know I could create an extra parameter and pass the current
function name as argument but it isn't a possibility for now.
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 manip
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
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
wrote:
It made me a bit confusing. How is the implementation of
string
comparasi
On Fri, 26 Sep 2014 01:08:59 +
AsmMan via Digitalmars-d-learn
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 string', not 'null' as
a t
On Fri, 26 Sep 2014 01:08:59 +
AsmMan via Digitalmars-d-learn
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 is actually this: `struct { size_
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
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
On Thu, 25 Sep 2014 19:13:58 +
Meta via Digitalmars-d-learn 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 confirm. just updated everything an
On Fri, 26 Sep 2014 00:24:27 +
AsmMan via Digitalmars-d-learn
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.
signature.asc
Description: PGP signature
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 == "");
d
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.
Thank
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 {
>>
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
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 Fu
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 ot
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 o
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 call?
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 F
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
>
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 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 carv
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 th
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 que
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 folde
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:
https://github.com/adamdrup
there is no HMAC-SHA1 algorithm in phobos library... should I
implement it from scratch?
http://dlang.org/phobos/std_digest_sha.html#SHA1
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?
https://www.flickr.com/services/api/
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
> fro
Thanks a lot.
Kind regards
André
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 to
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 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
ma
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 member
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 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 theory
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 *cou
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 th
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 const
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
42 matches
Mail list logo