On Tuesday, 11 December 2012 at 07:15:38 UTC, Zhenya wrote:
I'm sorry for my english.
I know that D != Python and my example don't need
any RTTI.
D has alias this feature.My example shows that we can use alias
this with types.
And I just want use this:
struct Type(T)
{
alias T m_type;
a
I'm sorry for my english.
I know that D != Python and my example don't need
any RTTI.
D has alias this feature.My example shows that we can use alias
this with types.
And I just want use this:
struct Type(T)
{
alias T m_type;
alias m_type this;
}
int main()
{
Type!int Int;
Int i;/
On Monday, 10 December 2012 at 22:01:37 UTC, Ali Çehreli wrote:
On 12/10/2012 01:52 PM, js.mdnq wrote:
> I want to avoid having to wrap the code with "
> " as it disables highlighting and possibly other
features(intellisense,
> etc...))
The q{} syntax is supposed to help with that issue. Emacs
On Monday, 10 December 2012 at 19:54:51 UTC, Zhenya wrote:
Hi!
In some previous post I asked about possibility of declar
opIndex,that return type.
I thoght about it,and I understood that code like this is legal:
struct Type(T)
{
alias T m_type;
alias m_type this;
}
void main()
This gets back to my question about nested structs(since I'm
trying to find a way to make it work). Take the following working
example:
class A {
struct B {
A* a;
}
B b1;
B b2;
}
Wastes a lot of space as we store a ptr to A for each field we
use. If there were 100 B
On 12/10/2012 01:56 PM, js.mdnq wrote:
> I guess the opGet,
> which I'm still not familiar with, behaves a bit different when aliased.
> Possibly because we are aliasing a operator(or method?)
I may have been too subtle before but opGet() is not an operator
function. Although its name starts wi
On 12/10/2012 01:52 PM, js.mdnq wrote:
> I want to avoid having to wrap the code with "
> " as it disables highlighting and possibly other features(intellisense,
> etc...))
The q{} syntax is supposed to help with that issue. Emacs manages syntax
highlighting correctly for the q{} strings:
imp
On Monday, 10 December 2012 at 07:48:37 UTC, Ali Çehreli wrote:
On 12/09/2012 10:43 PM, js.mdnq wrote:
> I thought `alias this` essentially treats the object as the
alias.
>
> struct A {
> alias value this;
> int value;
> void func();
> }
>
> A a;
>
> then a is essentially the same as a.value?
On Monday, 10 December 2012 at 20:17:41 UTC, Philippe Sigaud
wrote:
If I'm not mistaken isn't the "code" I'm trying to generate
still in a
string?
Well, yes, but not when you mix it in. It's a string mixin in
this case,
not a template mixin.
My whole point is not to use strings to insert
Well. I just try it again and I noticed this things :
-Changind the lambda function from :
auto caca2 = map!((a) {return a * iDeltaT;})(caca);
to :
auto caca2 = map!((a) {return a + iDeltaT;})(caca);
Avoid the segmentation fault
-Using dmd 2.60 avoid the segmentation fault.
The source code
On 10-12-2012 21:22, Matthew Caron wrote:
In C, if I want to parse a UDP packet, I need to build my own offsets
into data based off constants in:
net/ethernet.h
netinet/udp.h
Things like:
#define PACKET_DATA_OFFSET_DEFAULT (
ETHER_HDR_LEN + sizeof(struct iphdr) + \
sizeof(struct udp
In C, if I want to parse a UDP packet, I need to build my own offsets
into data based off constants in:
net/ethernet.h
netinet/udp.h
Things like:
#define PACKET_DATA_OFFSET_DEFAULT (
ETHER_HDR_LEN + sizeof(struct iphdr) + \
sizeof(struct udphdr))
That would be easy to port to D, if I
> If I'm not mistaken isn't the "code" I'm trying to generate still in a
> string?
>
Well, yes, but not when you mix it in. It's a string mixin in this case,
not a template mixin.
>
> (you've unfortunately left out the most important part at `//build your
> code here`)
>
Because it's just simp
Hi!
In some previous post I asked about possibility of declar
opIndex,that return type.
I thoght about it,and I understood that code like this is legal:
struct Type(T)
{
alias T m_type;
alias m_type this;
}
void main()
{
Type!int Int;
// Int a;
}
Is it hard to imp
On Thursday, 6 December 2012 at 00:31:53 UTC, Jonathan M Davis
wrote:
Pretty much the only kind of situation that I remember running
into where I
would consider Variant to be a good solution is one where you
literally have
to return a type from a function where you can't know that type
at com
On 12/10/2012 06:30 AM, December Flower wrote:
> Anyway, what I'm trying to say
> is that is there any good start points to make experiences with D
> language to build a real-world application using GUI?
I think D is in need of documentation of that sort. Books like "D for
FooLang programmers"
On Monday, 10 December 2012 at 18:21:48 UTC, Zardoz wrote:
I'm trying to use Map with a code like this :
...
immutable int m = 10;
int[] caca = [1,2,3,4];
auto caca2 = map!( (a) {return a * m;})(caca);
writeln(caca2);
...
I get a Segmentation fault some times:
The most interesting poi
On Mon, Dec 10, 2012 at 07:21:47PM +0100, Zardoz wrote:
> I'm trying to use Map with a code like this :
>
> ...
> immutable int m = 10;
> int[] caca = [1,2,3,4];
>
> auto caca2 = map!( (a) {return a * m;})(caca);
>
> writeln(caca2);
> ...
>
> I get a Segmentation fault some times:
> The
On 2012-12-10 19:21, Zardoz wrote:
I'm trying to use Map with a code like this :
...
immutable int m = 10;
int[] caca = [1,2,3,4];
auto caca2 = map!( (a) {return a * m;})(caca);
writeln(caca2);
...
I get a Segmentation fault some times:
The most interesting point it's that depends
I'm trying to use Map with a code like this :
...
immutable int m = 10;
int[] caca = [1,2,3,4];
auto caca2 = map!( (a) {return a * m;})(caca);
writeln(caca2);
...
I get a Segmentation fault some times:
The most interesting point it's that depends of the code around
of it ins the same
On Fri, 07 Dec 2012 00:27:57 -, Sam Hu wrote:
On Thursday, 6 December 2012 at 16:44:01 UTC, Regan Heath wrote:
On Thu, 06 Dec 2012 01:26:32 -, Sam Hu
wrote:
Known issues:
Under console reading Access table recordsets works fine ,inserting a
new record which contains only English
On Monday, 10 December 2012 at 13:42:12 UTC, Adam D. Ruppe wrote:
On Monday, 10 December 2012 at 13:34:51 UTC, December Flower
wrote:
I have a question about how to hide a console window.
Make a .def file and include it on your dmd command line.
The file only needs these two lines:
EXETYPE N
Suliman:
But if I have a lot of property like^
string name
int age
it's not good to specify all of them in paranceses:
auto file = new FileName("test.txt", 21, ETC);
How can I specify them in another way?
There are several ways to help that. A simple way is to use
default arguments:
Al 10/12/12 14:34, En/na December Flower ha escrit:
> Hello.
>
> I have a question about how to hide a console window.
>
> http://pds23.egloos.com/pds/201212/10/80/e0088180_50c5e3b1bb789.png
>
> This simple application is made by using gtkD and glade3. As you can see from
> picture above, conso
On Monday, 10 December 2012 at 13:34:51 UTC, December Flower
wrote:
Hello.
I have a question about how to hide a console window.
http://pds23.egloos.com/pds/201212/10/80/e0088180_50c5e3b1bb789.png
This simple application is made by using gtkD and glade3. As
you can see from picture above, con
If you want to learn more about def files:
http://www.digitalmars.com/ctg/ctgDefFiles.html
But those two lines I gave are all you need for the console
problem.
On Monday, 10 December 2012 at 13:34:51 UTC, December Flower
wrote:
I have a question about how to hide a console window.
Make a .def file and include it on your dmd command line.
The file only needs these two lines:
EXETYPE NT
SUBSYSTEM WINDOWS
Call it foo.def, recompile with it on the dmd
Hello.
I have a question about how to hide a console window.
http://pds23.egloos.com/pds/201212/10/80/e0088180_50c5e3b1bb789.png
This simple application is made by using gtkD and glade3. As you
can see from picture above, console window pops up and doesn't
disappear. When I close the console
Thanks!
But if I have a lot of property like^
string name
int age
it's not good to specify all of them in paranceses:
auto file = new FileName("test.txt", 21, ETC);
How can I specify them in another way?
29 matches
Mail list logo