Hi everyone,
I'm taking a look at D again and asked myself, if
it is possible to write a template mixin or something
similiar that automatically serializes an object to json.
For example:
class MyClass
{
string memberA;
int memberB;
MyClass memberC;
mixin ToJson!MyClass;
}
sho
On 21/07/2011 08:57, Tobias Pankrath wrote:
Hi everyone,
I'm taking a look at D again and asked myself, if
it is possible to write a template mixin or something
similiar that automatically serializes an object to json.
For example:
class MyClass
{
string memberA;
int memberB;
My
On 21/07/2011 08:57, Tobias Pankrath wrote:
Hi everyone,
I'm taking a look at D again and asked myself, if
it is possible to write a template mixin or something
similiar that automatically serializes an object to json.
For example:
class MyClass
{
string memberA;
int memberB;
My
On 2011-07-21 09:57, Tobias Pankrath wrote:
Hi everyone,
I'm taking a look at D again and asked myself, if
it is possible to write a template mixin or something
similiar that automatically serializes an object to json.
For example:
class MyClass
{
string memberA;
int memberB;
My
>
> Have a look at Orange: http://www.dsource.org/projects/orange
> I'm in a middle of a complete rewrite but you can use a previous version
> (if it still works) or look at the code.
>
Thank you for pointing me there. Looks very interesting. I took a quick look
at the code and got some question
Am 21.07.2011 02:01, schrieb bearophile:
Jonathan M Davis:
I believe that there is some level of purity inference with delegates, but I
don't know what the situation with that is exactly.
I didn't know/remember this, but it seems you are right, delegates too seem to
receive purity inference.
For another implementation, find the functions toJson and toJsonValue
in my web.d
http://arsdnet.net/dcode/web.d
Bascially: foreach(member; item.tupleof) {
static if(is(typeof(member) == something)
json it
else static if repeat for supported type families
}
On Wed, 20 Jul 2011 15:57:44 -0400, Jonathan M Davis
wrote:
On Wednesday 20 July 2011 21:54:19 Andrej Mitrovic wrote:
import std.stdio;
void main()
{
writeln("test");
test();
writeln();
writeln("test");
test();
}
struct Foo
{
int state;
this (int i)
{
On 2011-07-21 13:09, Tobias Pankrath wrote:
Have a look at Orange: http://www.dsource.org/projects/orange
I'm in a middle of a complete rewrite but you can use a previous version
(if it still works) or look at the code.
Thank you for pointing me there. Looks very interesting. I took a quick lo
On Thursday 21 July 2011 11:52:58 Steven Schveighoffer wrote:
> On Wed, 20 Jul 2011 15:57:44 -0400, Jonathan M Davis
>
> wrote:
> > On Wednesday 20 July 2011 21:54:19 Andrej Mitrovic wrote:
> >> import std.stdio;
> >>
> >> void main()
> >> {
> >>
> >> writeln("test");
> >> test();
> >>
On Thu, 21 Jul 2011 12:39:27 -0400, Jonathan M Davis
wrote:
However, I don't think that any destructors are called on thread
destruction...
That doesn't sound good.
I may be wrong, a simple test should suffice.
-Steve
On 7/21/11, Steven Schveighoffer wrote:
> On Wed, 20 Jul 2011 15:57:44 -0400, Jonathan M Davis
> wrote:
>
>> On Wednesday 20 July 2011 21:54:19 Andrej Mitrovic wrote:
>>> import std.stdio;
>>>
>>> void main()
>>> {
>>> writeln("test");
>>> test();
>>> writeln();
>>> writeln("test"
Multi-line strings are handy, but I have a small problem.
This is an example, it has a problem, there is an unwanted newline at the
beginning:
writeln("
- First item: 150
- Second item: 200
- Third item: 105");
To avoid it you can write this, but both break the alignment in the source
code,
"bearophile" wrote in message
news:j0ac3m$29hj$1...@digitalmars.com...
> Multi-line strings are handy, but I have a small problem.
>
> This is an example, it has a problem, there is an unwanted newline at the
> beginning:
>
> writeln("
> - First item: 150
> - Second item: 200
> - Third item: 1
writeln(q"EOS
- First item: 150
- Second item: 200
- Third item: 105
EOS");
You can replace EOS with whatever you want.
Andrej Mitrovic:
> writeln(q"EOS
> - First item: 150
> - Second item: 200
> - Third item: 105
> EOS");
>
> You can replace EOS with whatever you want.
It seems to add a newline at the end :-(
Bye,
bearophile
This is the best I can do:
writeln(
`- First item: 150
- Second item: 200
- Third item: 105`);
Hope OCD doesn't kick in! :p
I'm not getting any of the function names on the stack traces.
I tried everything I found in here:
http://www.digitalmars.com/d/archives/digitalmars/D/Windows_Stack_Traces_Function_Names_136887.html
- I installed the "Debugging Tools for Windows" to update my dbghelp.dll
- I'm already compiling
if you can, use write instead of writeln
write(q"EOS
- First item: 150
- Second item: 200
- Third item: 105
EOS");
Followed by stdout.flush(); to be sure.
got one extra line, I meant
write(q"EOS
- First item: 150
- Second item: 200
- Third item: 105
EOS");
Hi, all.
So I see that there is an Ubuntu dmd that has "x86_64" as the "CPU" column.
Before I install Ubuntu to great disappointment, does this mean that I get a 64
bit executable, or does it just mean that the compiler itself is a 64 bit
application?
Thanks,
Charles.
On Friday 22 July 2011 04:45:59 McAnany, Charles E wrote:
> Hi, all.
> So I see that there is an Ubuntu dmd that has "x86_64" as the "CPU" column.
> Before I install Ubuntu to great disappointment, does this mean that I get
> a 64 bit executable, or does it just mean that the compiler itself is a 6
"McAnany, Charles E" wrote in message
news:mailman.1844.1311309969.14074.digitalmars-d-le...@puremagic.com...
>Hi, all.
>So I see that there is an Ubuntu dmd that has "x86_64" as the "CPU"
>column. Before I install Ubuntu to great disappointment, does this mean
>that
>I get a 64 bit executable,
Hi,
I'm not really an experienced programmer so I might be missing something
but...
in
http://d-programming-language.org/attribute.html
static is described as follows:
"The static attribute applies to functions and data. It means that the
declaration does not apply to a particular instance of an
Anyone have a known-working Windows OMF library for MySQL? Static or
dynamic, I don't care. I've tried fucking everything and I can't get the
dang thing to work. Static was a total no-go. With dynamic, using implib I
got it to link, but calling any of it resulted in an Access Violation. Using
c
On Friday 22 July 2011 03:12:00 Diego Canuhé wrote:
> Hi,
> I'm not really an experienced programmer so I might be missing something
> but...
>
> in
> http://d-programming-language.org/attribute.html
> static is described as follows:
>
> "The static attribute applies to functions and data. It mea
On 2011-07-22 08:12, Diego Canuhé wrote:
Hi,
I'm not really an experienced programmer so I might be missing something
but...
in
http://d-programming-language.org/attribute.html
static is described as follows:
"The static attribute applies to functions and data. It means that the
declaration doe
thanks ;)
29 matches
Mail list logo