Re: C# to D Compiler :)

2014-12-19 Thread Dicebot via Digitalmars-d-announce
On Thursday, 18 December 2014 at 23:58:30 UTC, Ronald Adonyo 
wrote:

This is the Current Feature List

...


Looks intriguing :)


Re: C# to D Compiler :)

2014-12-19 Thread Ronald Adonyo via Digitalmars-d-announce

On Friday, 19 December 2014 at 07:39:24 UTC, Jacob Carlborg wrote:

On 2014-12-19 00:56, Ronald Adonyo wrote:

Hi Everyone,
In my spare time over the last 3 weeks, I've been working on a 
C# to D

Compiler based on Roslyn.
Please check it out and give comments. I would also like this 
to be a
basis to provide both Libraries in D and allow building native 
C#

applications with the help of D.

Its available on my github
https://github.com/afrogeek/SharpNative


This is pretty cool.

When the tool is good enough, then you can run the tool the 
Roslyn compiler and on itself. Then you'll have a C# compiler 
and a tool to translate from C# to D, written in D :)


BTW, you should add .DS_Store to .gitignore.


Thanks, Jacob and Stefan,
Done, does anyone have a good idea of how to write Async/Await 
using fibers or state machines in D ?
I have yield return working, and would like to have both these as 
lambdas passed to library functions.


Regards,
Ron.


Re: C# to D Compiler :)

2014-12-19 Thread Kagamin via Digitalmars-d-announce

On Friday, 19 December 2014 at 08:11:42 UTC, Ronald Adonyo wrote:
Done, does anyone have a good idea of how to write Async/Await 
using fibers or state machines in D ?


Same as in .net, look at the generated IL, an async method should 
return a chain of tasks.


Re: 2D game engine written in D is in progress

2014-12-19 Thread ketmar via Digitalmars-d-announce
On Fri, 19 Dec 2014 07:22:13 +
Joakim via Digitalmars-d-announce
 wrote:

> This is the model used by Android, the most successful open 
> source project ever
i can assure you that stupid policy with separating features has
nothing to do with android popularity.


signature.asc
Description: PGP signature


Re: Online documentation for DSFML exists!

2014-12-19 Thread ponce via Digitalmars-d-announce

On Friday, 19 December 2014 at 00:58:57 UTC, Jeremy DeHaan wrote:

It's not the best, but it's a start.

Check it out here: http://dsfml.com/doc.html

I would love some feed back on this. I already have a few 
things I would like to change, namely the layout and adding 
some examples, but I would like to hear what everyone thinks on 
what I have up.


Just a note about the rest of the site though, it is currently 
under construction so don't expect too much.


Beware when including an URL in DDoc 
http://dsfml.com/dsfml/graphics/circleshape.html


Re: 2D game engine written in D is in progress

2014-12-19 Thread Joakim via Digitalmars-d-announce
On Friday, 19 December 2014 at 11:35:54 UTC, ketmar via 
Digitalmars-d-announce wrote:

On Fri, 19 Dec 2014 07:22:13 +
Joakim via Digitalmars-d-announce
 wrote:

This is the model used by Android, the most successful open 
source project ever

i can assure you that stupid policy with separating features has
nothing to do with android popularity.


I can assure you that it's _the_ reason it took off so much.  If 
the Android project had insisted on pure open source, the 
hardware and smartphone vendors would have laughed at them and 
used Windows Mobile or LiMo or one of the myriad other 
alternatives at the time.


It's why Samsung has their own proprietary multi-window 
implementation for Android and Amazon and Xiaomi forked Android 
and released their own proprietary versions.  Commercial vendors 
want to differentiate with their own proprietary features, but 
AOSP provides a common OSS platform on which they can work 
together.


This model has been extraordinarily successful for AOSP, as it 
has led to a billion smartphones running some version of Android 
and capable of running most common apps, albeit with some 
fragmentation too.


Re: 2D game engine written in D is in progress

2014-12-19 Thread ketmar via Digitalmars-d-announce
On Fri, 19 Dec 2014 14:46:33 +
Joakim via Digitalmars-d-announce
 wrote:

> On Friday, 19 December 2014 at 11:35:54 UTC, ketmar via 
> Digitalmars-d-announce wrote:
> > On Fri, 19 Dec 2014 07:22:13 +
> > Joakim via Digitalmars-d-announce
> >  wrote:
> >
> >> This is the model used by Android, the most successful open 
> >> source project ever
> > i can assure you that stupid policy with separating features has
> > nothing to do with android popularity.
> 
> I can assure you that it's _the_ reason it took off so much.  If 
> the Android project had insisted on pure open source, the 
> hardware and smartphone vendors would have laughed at them and 
> used Windows Mobile or LiMo or one of the myriad other 
> alternatives at the time.
> 
> It's why Samsung has their own proprietary multi-window 
> implementation for Android and Amazon and Xiaomi forked Android 
> and released their own proprietary versions.  Commercial vendors 
> want to differentiate with their own proprietary features, but 
> AOSP provides a common OSS platform on which they can work 
> together.
> 
> This model has been extraordinarily successful for AOSP, as it 
> has led to a billion smartphones running some version of Android 
> and capable of running most common apps, albeit with some 
> fragmentation too.

what you described here is a matter of licensing (BSDL vs GPL), not
having some closed-source patches.


signature.asc
Description: PGP signature


Re: 2D game engine written in D is in progress

2014-12-19 Thread Joakim via Digitalmars-d-announce
On Friday, 19 December 2014 at 15:05:05 UTC, ketmar via 
Digitalmars-d-announce wrote:

On Fri, 19 Dec 2014 14:46:33 +
Joakim via Digitalmars-d-announce
 wrote:

On Friday, 19 December 2014 at 11:35:54 UTC, ketmar via 
Digitalmars-d-announce wrote:

> On Fri, 19 Dec 2014 07:22:13 +
> Joakim via Digitalmars-d-announce
>  wrote:
>
>> This is the model used by Android, the most successful open 
>> source project ever
> i can assure you that stupid policy with separating features 
> has

> nothing to do with android popularity.

I can assure you that it's _the_ reason it took off so much.  
If the Android project had insisted on pure open source, the 
hardware and smartphone vendors would have laughed at them and 
used Windows Mobile or LiMo or one of the myriad other 
alternatives at the time.


It's why Samsung has their own proprietary multi-window 
implementation for Android and Amazon and Xiaomi forked 
Android and released their own proprietary versions.  
Commercial vendors want to differentiate with their own 
proprietary features, but AOSP provides a common OSS platform 
on which they can work together.


This model has been extraordinarily successful for AOSP, as it 
has led to a billion smartphones running some version of 
Android and capable of running most common apps, albeit with 
some fragmentation too.


what you described here is a matter of licensing (BSDL vs GPL), 
not

having some closed-source patches.


Which of those OSS licenses are the proprietary features and 
blobs I listed offered under?  None, and the choice of license is 
critical because you cannot offer closed-source patches under the 
viral GPL, ie it is the BSDL/Apache permissive licenses that make 
this winning mixed model possible.


If your point is that AOSP is released as pure open source, no 
Android phone is sold running pure AOSP, including Nexus devices 
because of binary blob drivers.  Without the proprietary add-ons, 
AOSP would be unusable.


Re: 2D game engine written in D is in progress

2014-12-19 Thread ketmar via Digitalmars-d-announce
On Fri, 19 Dec 2014 17:04:22 +
Joakim via Digitalmars-d-announce
 wrote:

> If your point is that AOSP is released as pure open source, no 
> Android phone is sold running pure AOSP, including Nexus devices 
> because of binary blob drivers.  Without the proprietary add-ons, 
> AOSP would be unusable.
it is still unusable. i don't care what problems samsung or other oem
have, as i still got the closed proprietary system. what google really
has with their "open-sourceness" is a bunch of people that works as
additional coders and testers for free. and alot of hype like "hey,
android is open! it's cool! use android!" bullshit.


signature.asc
Description: PGP signature


Re: 2D game engine written in D is in progress

2014-12-19 Thread Kagamin via Digitalmars-d-announce
On Friday, 19 December 2014 at 17:21:43 UTC, ketmar via 
Digitalmars-d-announce wrote:
have, as i still got the closed proprietary system. what google 
really
has with their "open-sourceness" is a bunch of people that 
works as

additional coders and testers for free.


Well, those people want to do that, so why not?


Concise Binary Object Representation (CBOR) binary serialization library.

2014-12-19 Thread MrSmith via Digitalmars-d-announce

The Concise Binary Object Representation (CBOR) is a data format
whose design goals include the possibility of extremely small code
size, fairly small message size, and extensibility without the 
need
for version negotiation.  These design goals make it different 
from

earlier binary serializations such as ASN.1 and MessagePack.

Here is more info about format: http://cbor.io/

You can easily encode and decode things like built-in types, 
arrays, hash-maps, structs, tuples, classes, strings and raw 
arrays (ubyte[]).


Here is some simple code:

import cbor;

struct Inner
{
int[] array;
string someText;
}

struct Test
{
ubyte b;
short s;
uint i;
long l;
float f;
double d;
ubyte[] arr;
string str;
Inner inner;

void fun(){} // not encoded
void* pointer; // not encoded
int* numPointer; // not encoded
}

ubyte[1024] buffer;
size_t encodedSize;

Test test = Test(42, -120, 11, -123456789, 0.1234, 
-0.987654,

cast(ubyte[])[1,2,3,4,5,6,7,8], "It is a test string",
Inner([1,2,3,4,5], "Test of inner struct"));

encodedSize = encodeCborArray(buffer[], test);

// ubyte[] and string types are slices of input ubyte[].
Test result = decodeCborSingle!Test(buffer[0..encodedSize]);

// decodeCborSingleDup can be used to auto-dup those types.

assert(test == result);

Here is github link: https://github.com/MrSmith33/cbor-d
Destroy!


Re: 2D game engine written in D is in progress

2014-12-19 Thread ketmar via Digitalmars-d-announce
On Fri, 19 Dec 2014 18:23:59 +
Kagamin via Digitalmars-d-announce
 wrote:

> On Friday, 19 December 2014 at 17:21:43 UTC, ketmar via 
> Digitalmars-d-announce wrote:
> > have, as i still got the closed proprietary system. what google 
> > really
> > has with their "open-sourceness" is a bunch of people that 
> > works as
> > additional coders and testers for free.
> 
> Well, those people want to do that, so why not?

i have nothing against that, everyone is free to do what he want. what
i'm against is declaring android "open project". it's proprietary
project with partially opened source.


signature.asc
Description: PGP signature


Re: Online documentation for DSFML exists!

2014-12-19 Thread Israel via Digitalmars-d-announce

On Friday, 19 December 2014 at 00:58:57 UTC, Jeremy DeHaan wrote:

It's not the best, but it's a start.

Check it out here: http://dsfml.com/doc.html

I would love some feed back on this. I already have a few 
things I would like to change, namely the layout and adding 
some examples, but I would like to hear what everyone thinks on 
what I have up.


Just a note about the rest of the site though, it is currently 
under construction so don't expect too much.


Would it be possible to contribute screenshots of code examples?
Or is it not necessary?


Re: Online documentation for DSFML exists!

2014-12-19 Thread Jeremy DeHaan via Digitalmars-d-announce

On Friday, 19 December 2014 at 20:03:39 UTC, Israel wrote:
On Friday, 19 December 2014 at 00:58:57 UTC, Jeremy DeHaan 
wrote:

It's not the best, but it's a start.

Check it out here: http://dsfml.com/doc.html

I would love some feed back on this. I already have a few 
things I would like to change, namely the layout and adding 
some examples, but I would like to hear what everyone thinks 
on what I have up.


Just a note about the rest of the site though, it is currently 
under construction so don't expect too much.


Would it be possible to contribute screenshots of code examples?
Or is it not necessary?


Adding example code is definitely on my todo list for the docs.


Re: Concise Binary Object Representation (CBOR) binary serialization library.

2014-12-19 Thread Nordlöw

On Friday, 19 December 2014 at 18:26:26 UTC, MrSmith wrote:

Here is github link: https://github.com/MrSmith33/cbor-d
Destroy!


It would be nice to have a side-by-side comparison with 
http://msgpack.org/ which is in current use by a couple existing 
D projects, include D Completion Daemon (DCD) and a few of mine.


Re: Concise Binary Object Representation (CBOR) binary serialization library.

2014-12-19 Thread BBaz via Digitalmars-d-announce

On Friday, 19 December 2014 at 18:26:26 UTC, MrSmith wrote:

The Concise Binary Object Representation (CBOR) is a data format
whose design goals include the possibility of extremely small 
code
size, fairly small message size, and extensibility without the 
need
for version negotiation.  These design goals make it different 
from

earlier binary serializations such as ASN.1 and MessagePack.

Here is more info about format: http://cbor.io/

You can easily encode and decode things like built-in types, 
arrays, hash-maps, structs, tuples, classes, strings and raw 
arrays (ubyte[]).


Here is some simple code:

import cbor;

struct Inner
{
int[] array;
string someText;
}

struct Test
{
ubyte b;
short s;
uint i;
long l;
float f;
double d;
ubyte[] arr;
string str;
Inner inner;

void fun(){} // not encoded
void* pointer; // not encoded
int* numPointer; // not encoded
}

ubyte[1024] buffer;
size_t encodedSize;

Test test = Test(42, -120, 11, -123456789, 0.1234, 
-0.987654,

cast(ubyte[])[1,2,3,4,5,6,7,8], "It is a test string",
Inner([1,2,3,4,5], "Test of inner struct"));

encodedSize = encodeCborArray(buffer[], test);

// ubyte[] and string types are slices of input ubyte[].
Test result = decodeCborSingle!Test(buffer[0..encodedSize]);

// decodeCborSingleDup can be used to auto-dup those types.

assert(test == result);

Here is github link: https://github.com/MrSmith33/cbor-d
Destroy!


Do you know OGDL ?

http://ogdl.org/

It's currently the more 'appealing' thing to me for serialization.



Re: Concise Binary Object Representation (CBOR) binary serialization library.

2014-12-19 Thread ponce via Digitalmars-d-announce

On Friday, 19 December 2014 at 22:33:57 UTC, BBaz wrote:

On Friday, 19 December 2014 at 18:26:26 UTC, MrSmith wrote:
The Concise Binary Object Representation (CBOR) is a data 
format
whose design goals include the possibility of extremely small 
code
size, fairly small message size, and extensibility without the 
need
for version negotiation.  These design goals make it different 
from

earlier binary serializations such as ASN.1 and MessagePack.



When implementing CBOR serialization/parsing I got the impression 
that it was remarkably similar to MessagePack except late. Dis 
you spot anything different?


Re: C# to D Compiler :)

2014-12-19 Thread ZombineDev via Digitalmars-d-announce
Well done! I also thought of making a C# to D compiler using 
Roslyn, so I'm glad to see fruits of your labour :)



On Thursday, 18 December 2014 at 23:58:30 UTC, Ronald Adonyo 
wrote:

This is the Current Feature List


Re: C# to D Compiler :)

2014-12-19 Thread FrankLike via Digitalmars-d-announce
On Thursday, 18 December 2014 at 23:56:54 UTC, Ronald Adonyo 
wrote:

Hi Everyone,
In my spare time over the last 3 weeks, I've been working on a 
C# to D Compiler based on Roslyn.
Please check it out and give comments. I would also like this 
to be a basis to provide both Libraries in D and allow building 
native C# applications with the help of D.


Its available on my github
https://github.com/afrogeek/SharpNative


Nice work.