On Monday, 25 May 2015 at 04:07:06 UTC, Jonathan M Davis wrote:
On Monday, May 25, 2015 03:42:22 tcak via Digitalmars-d-learn
wrote:
Well, if I do not check the line number of error, this happens.
It was giving error on the line of creating a new instance.
Line 243: auto fileResourceList = new
On Monday, May 25, 2015 03:42:22 tcak via Digitalmars-d-learn wrote:
> On Monday, 25 May 2015 at 03:35:22 UTC, Jonathan M Davis wrote:
> > On Monday, May 25, 2015 03:19:29 tcak via Digitalmars-d-learn
> > wrote:
> >> Is there any syntax for something like that:
> >>
> >> class Resource(T) if( is(T:
On Monday, 25 May 2015 at 03:35:22 UTC, Jonathan M Davis wrote:
On Monday, May 25, 2015 03:19:29 tcak via Digitalmars-d-learn
wrote:
Is there any syntax for something like that:
class Resource(T) if( is(T: FileResource) ){
}
I tried it as above, but it is not accepted. Maybe I am
following
On Monday, May 25, 2015 03:19:29 tcak via Digitalmars-d-learn wrote:
> Is there any syntax for something like that:
>
> class Resource(T) if( is(T: FileResource) ){
> }
>
>
> I tried it as above, but it is not accepted. Maybe I am following
> a wrong syntax.
>
> I tried
>
> class Resource(T: FileRe
Is there any syntax for something like that:
class Resource(T) if( is(T: FileResource) ){
}
I tried it as above, but it is not accepted. Maybe I am following
a wrong syntax.
I tried
class Resource(T: FileResource){
}
But it is not accepted as well.
On Sunday, May 24, 2015 22:13:25 Steven Schveighoffer via Digitalmars-d-learn
wrote:
> On 5/23/15 4:27 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
> > On Saturday, May 23, 2015 07:03:33 Vladimir Panteleev via
> > Digitalmars-d-learn wrote:
> >> int[] arr = [1, 2, 3];
> >> auto r = iota(4,
On 5/23/15 4:27 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
On Saturday, May 23, 2015 07:03:33 Vladimir Panteleev via Digitalmars-d-learn
wrote:
int[] arr = [1, 2, 3];
auto r = iota(4, 10);
// ???
assert(equal(arr, iota(1, 10)));
Hopefully in one GC allocation (assuming we know the ran
On Sunday, 24 May 2015 at 21:11:34 UTC, Daniel Kozak wrote:
On Sunday, 24 May 2015 at 16:51:44 UTC, CodeSun wrote:
Hello guys,
Today, I found a weird problem when I was learning to enable
SO_KEEPALIVE for a specific socket. I use setsockopt to enable
keepalive firstly, and then use getsockopt
On Sunday, 24 May 2015 at 23:32:52 UTC, ZombineDev wrote:
...
Small correction for clarity:
void main()
{
Derived d = new Derived();
d.x = 13;
d.y = 15;
// 1) writeln(callMethod!(Derived, Derived.toString)(d)); <-
Should print 15
// 2) writeln(callBaseMethod!(Derived, Deri
import std.stdio, std.conv, std.traits;
class Base
{
int x;
override string toString() const
{
return x.to!string;
}
}
class Derived : Base
{
int y;
override string toString() const
{
return y.to!string;
}
}
void callMethod(T, alias Method)(const
On Sunday, 24 May 2015 at 21:13:02 UTC, Daniel Kozak wrote:
On Sunday, 24 May 2015 at 21:11:34 UTC, Daniel Kozak wrote:
On Sunday, 24 May 2015 at 16:51:44 UTC, CodeSun wrote:
Hello guys,
Today, I found a weird problem when I was learning to enable
SO_KEEPALIVE for a specific socket. I use sets
On Sunday, 24 May 2015 at 21:11:34 UTC, Daniel Kozak wrote:
On Sunday, 24 May 2015 at 16:51:44 UTC, CodeSun wrote:
Hello guys,
Today, I found a weird problem when I was learning to enable
SO_KEEPALIVE for a specific socket. I use setsockopt to enable
keepalive firstly, and then use getsockopt
On Sunday, 24 May 2015 at 20:53:03 UTC, Jay Norwood wrote:
On Sunday, 24 May 2015 at 18:14:19 UTC, anonymous wrote:
[...]
1) static int[5] x; -- x is a static variable with a static
array type
2) static int[] x; -- static variable, dynamic array
3) int[5] x; -- non-static variable, static arra
On Sunday, 24 May 2015 at 16:51:44 UTC, CodeSun wrote:
Hello guys,
Today, I found a weird problem when I was learning to enable
SO_KEEPALIVE for a specific socket. I use setsockopt to enable
keepalive firstly, and then use getsockopt to show if it is
enabled correctly.
My code snippet is lis
On Sunday, 24 May 2015 at 18:14:19 UTC, anonymous wrote:
"Static array" has a special meaning. It does not mean "static
variable with an array type". Static arrays are those of the
form Type[size]. That is, the size is known statically.
Examples:
1) static int[5] x; -- x is a static variable
On Sunday, 24 May 2015 at 16:51:44 UTC, CodeSun wrote:
Hello guys,
Today, I found a weird problem when I was learning to enable
SO_KEEPALIVE for a specific socket. I use setsockopt to enable
keepalive firstly, and then use getsockopt to show if it is
enabled correctly.
My code snippet is lis
On Sunday, 24 May 2015 at 18:14:19 UTC, anonymous wrote:
"Static array" has a special meaning. It does not mean "static
variable with an array type". Static arrays are those of the
form Type[size]. That is, the size is known statically.
PS: You may also see the term "fixed-size array" which me
On Sunday, 24 May 2015 at 17:35:39 UTC, Jay Norwood wrote:
I'm a bit confused by the documentation of the ctfe limitations
wrt static arrays due to these seemingly conflicting
statements, and the examples didn't seem to clear anything up.
I was wondering if anyone has examples of clever things
I'm a bit confused by the documentation of the ctfe limitations
wrt static arrays due to these seemingly conflicting statements,
and the examples didn't seem to clear anything up. I was
wondering if anyone has examples of clever things that might be
done with static arrays and pointers using c
Hello guys,
Today, I found a weird problem when I was learning to enable
SO_KEEPALIVE for a specific socket. I use setsockopt to enable
keepalive firstly, and then use getsockopt to show if it is
enabled correctly.
My code snippet is listed below:
Dlang version:
import core.sys.posix.sys.so
On Sunday, 24 May 2015 at 15:53:24 UTC, Idan Arye wrote:
But according to the Blub Paradox, your(Or mine. Or Paul
Graham's) opinion on whether or not a stronger language than
Lisp has appeared can not be trusted!
Based on an article Graham about Blub Paradox, I can conclude
that Blub Paradox
On Sunday, 24 May 2015 at 15:40:21 UTC, Dennis Ritchie wrote:
On Sunday, 24 May 2015 at 14:15:55 UTC, Idan Arye wrote:
This IS ironic, because Paul Graham claims lisp to be the most
powerful, but if he have ever encounter a more powerful
language he couldn't accept it is more powerful than lisp
On Sunday, 24 May 2015 at 14:15:55 UTC, Idan Arye wrote:
This IS ironic, because Paul Graham claims lisp to be the most
powerful, but if he have ever encounter a more powerful
language he couldn't accept it is more powerful than lisp due
to the very same "Blub Paradox" he describes himself.
P
On Sunday, 24 May 2015 at 14:46:52 UTC, ZombineDev wrote:
[snip]
Correction: not exactly the same, because isScalar also allows
wchar, dchar and const and immutable versions of those 'scalar'
types.
On Saturday, 23 May 2015 at 04:40:28 UTC, tcak wrote:
[snip]
Yup, you need to use == to match the exact type.
Btw, you can use enum templates from std.traits, to accomplish
the same with less code:
public void setMarker(M)( size_t markerIndex, M markerValue )
if(isScalarType!M)
{
On Sunday, 24 May 2015 at 11:07:19 UTC, Dennis Ritchie wrote:
On Sunday, 24 May 2015 at 02:43:47 UTC, Idan Arye wrote:
I'm a fan of lisp(Clojure being my favorite. Too bad it takes
about a century just to load the runtime...), and yet I find
it quite ironic that Paul Graham claims lisp to be th
On Sunday, 24 May 2015 at 02:43:47 UTC, Idan Arye wrote:
I'm a fan of lisp(Clojure being my favorite. Too bad it takes
about a century just to load the runtime...), and yet I find it
quite ironic that Paul Graham claims lisp to be the most
powerful language right after claiming that programmers
27 matches
Mail list logo