On Tue, Jun 28, 2016 at 01:41:03AM +, Smoke Adams via Digitalmars-d-learn
wrote:
> I have a type
>
> public class SuperFunction(T)
> {
> T t;
> return(T) Do() { return t(); }
> }
>
> where T is a delegate or function. First, I would like to be able to
> specify that this must be the case
On Monday, 27 June 2016 at 21:17:52 UTC, Thalamus wrote:
Hi everyone,
I've succeeded in using D as a client for regular (registered)
COM servers in the past, but in this case, I'm building the
server as well. I would like to avoid registering it if
possible so XCOPY-like deployment remains an
On 06/27/2016 06:41 PM, Smoke Adams wrote:
I have a type
public class SuperFunction(T)
{
T t;
return(T) Do() { return t(); }
}
where T is a delegate or function. First, I would like to be able to
specify that this must be the case for SuperFunction so we can't pass
non-function/delegates
I should point out also that this should be inheritable.
Eventually I would like to create an algebra of SuperFunctions.
e.g., SF3 = SF1 + SF2
is a new super function that combines the parameter list of SF1
and SF2 and unionizes their return type. Both functions are
called by Do(which will ul
On 06/27/2016 04:02 PM, Smoke Adams wrote:
> On Monday, 27 June 2016 at 22:56:35 UTC, Ali Çehreli wrote:
>> On 06/27/2016 02:58 PM, Smoke Adams wrote:
>>> I'm in need of a way to create a local array that isn't GC'ed. It must
>>> be dynamic in the sense of setting the size at compile time but it w
On Tuesday, 28 June 2016 at 01:41:03 UTC, "Smoke" Adams wrote:
I have a type
public class SuperFunction(T)
{
T t;
return(T) Do() { return t(); }
}
where T is a delegate or function. First, I would like to be
able to specify that this must be the case for SuperFunction so
we can't pass non
I have a type
public class SuperFunction(T)
{
T t;
return(T) Do() { return t(); }
}
where T is a delegate or function. First, I would like to be able
to specify that this must be the case for SuperFunction so we
can't pass non-function/delegates for T. Second, How to specify
the return ty
On Monday, 27 June 2016 at 22:56:35 UTC, Ali Çehreli wrote:
On 06/27/2016 02:58 PM, Smoke Adams wrote:
I'm in need of a way to create a local array that isn't GC'ed.
It must
be dynamic in the sense of setting the size at compile time
but it will
be used only in scope and only on structs.
func
On 06/27/2016 02:58 PM, Smoke Adams wrote:
I'm in need of a way to create a local array that isn't GC'ed. It must
be dynamic in the sense of setting the size at compile time but it will
be used only in scope and only on structs.
function x(int y)
{
bool[y] arr;
arr ~= 3;
}
I care abou
On Monday, 27 June 2016 at 22:00:15 UTC, gummybears wrote:
Hi,
Today thought lets learn D. I am writing a compiler for a
language
and read D compiles very fast.
Switched my compiler from C++ to D and ran my test suite to use
D.
Doing somethin wrong as creating array of objects gives me a
seg
Hi,
Today thought lets learn D. I am writing a compiler for a language
and read D compiles very fast.
Switched my compiler from C++ to D and ran my test suite to use D.
Doing somethin wrong as creating array of objects gives me a
segmentation fault
Example
import std.stdio;
class Pair {
fl
I'm in need of a way to create a local array that isn't GC'ed. It
must be dynamic in the sense of setting the size at compile time
but it will be used only in scope and only on structs.
function x(int y)
{
bool[y] arr;
arr ~= 3;
}
I care about slicing or anything but appending, removal
Do the various D compilers use multiple passes to handle forward
references or some other technique?
Hi everyone,
I've succeeded in using D as a client for regular (registered)
COM servers in the past, but in this case, I'm building the
server as well. I would like to avoid registering it if possible
so XCOPY-like deployment remains an option. Can a
registration-free COM client be built in D
On Monday, 27 June 2016 at 17:17:19 UTC, John wrote:
import std.traits;
__traits(identifier, TemplateOf!(S!int));
Scratch that, this is what you want:
import std.traits;
static assert(__traits(isSame, TemplateOf!(S!int), S));
I believe this is what
import std.traits : isInstanceOf;
is
On Monday, 27 June 2016 at 19:34:06 UTC, "Smoke" Adams wrote:
I have
alias fnc = void function(Object);
alias del = void delegate();
Does func avoid the GC? I am passing in this to Object so I
don't technically need a delegate or a "context". I want to be
sure that I'm actually gaining someth
I have
alias fnc = void function(Object);
alias del = void delegate();
Does func avoid the GC? I am passing in this to Object so I don't
technically need a delegate or a "context". I want to be sure
that I'm actually gaining something here by doing this.
I read somewhere that delegates only
On Sunday, 26 June 2016 at 16:02:18 UTC, ag0aep6g wrote:
On 06/26/2016 05:37 PM, Smoke Adams wrote:
[...]
Unsolicited spelling correction: no 'i' in "deprecated".
[...]
`system` directly prints its output, `executeShell` returns it
in a tuple with the status code. Maybe cls works by print
On Monday, 27 June 2016 at 17:14:23 UTC, John wrote:
On Monday, 27 June 2016 at 16:40:09 UTC, Nordlöw wrote:
If I have a template parameter
E = S!int
where
struct S(T) { S x; }
how can I extract the template name part `S` from E`?
Something like:
static assert(is(templateName!(
On 06/27/2016 09:54 AM, Lodovico Giaretta wrote:
On Monday, 27 June 2016 at 16:40:09 UTC, Nordlöw wrote:
If I have a template parameter
E = S!int
where
struct S(T) { S x; }
how can I extract the template name part `S` from E`?
Something like:
static assert(is(templateName!(S!in
On Monday, 27 June 2016 at 16:40:09 UTC, Nordlöw wrote:
If I have a template parameter
E = S!int
where
struct S(T) { S x; }
how can I extract the template name part `S` from E`?
Something like:
static assert(is(templateName!(S!int) == S));
Is this already in Phobos somewhere?
On Monday, 27 June 2016 at 16:40:09 UTC, Nordlöw wrote:
If I have a template parameter
E = S!int
where
struct S(T) { S x; }
how can I extract the template name part `S` from E`?
Something like:
static assert(is(templateName!(S!int) == S));
Is this already in Phobos somewhere?
If I have a template parameter
E = S!int
where
struct S(T) { S x; }
how can I extract the template name part `S` from E`?
Something like:
static assert(is(templateName!(S!int) == S));
Is this already in Phobos somewhere?
On Sunday, 26 June 2016 at 19:01:07 UTC, cym13 wrote:
On Sunday, 26 June 2016 at 17:56:08 UTC, Satoshi wrote:
On Sunday, 26 June 2016 at 15:37:03 UTC, "Smoke" Adams wrote:
system("cls") works but executeShell doesn't. system is
depreciated.
What's going on? The docs say that it creates a new
On 6/26/16 12:02 PM, ag0aep6g wrote:
On 06/26/2016 05:37 PM, Smoke Adams wrote:
system("cls") works but executeShell doesn't. system is depreciated.
Use spawn-related function, and avoid capturing output instead. Not sure
if you need to call spawnShell (which creates a new system shell to
ex
25 matches
Mail list logo