Re: C# to D Compiler :)

2014-12-18 Thread Jacob Carlborg via Digitalmars-d-announce

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.

--
/Jacob Carlborg


Re: D/Objective-C 64bit

2014-12-18 Thread Jacob Carlborg via Digitalmars-d-announce

On 2014-12-18 23:31, Christian Schneider wrote:


Regex is one of my weaknesses. If you don't mind sharing yours (and if
you have them still lying around) please send to schneider at
gerzonic.net, this would be greatly appreciated, and would make my life
a bit easier.


These are two simple regular expression that you can use:

\)\s*\[([\w:]+)\];$

Replace with

) @selector("$1");

And

\)\s*\[([\w:]+)\]$

Replace with

) @selector("$1")

They make some assumption about the code. They will match:

a closing parenthesis ->
zero or more spaces ->
opening bracket ->
at least one or more of: A-Z, a-z, a colon or 0-9 ->
closing bracket ->
semicolon ->
end of line

In the above description the arrow, "->", should be read as "followed by".

When replacing the text, $1 will represent what's caught in the first 
group. In this case what's in between the brackets.


The difference between the first and the second regular expression is 
the trailing semicolon, to handle both extern declarations and methods 
defined in the D source code.


These regular expression assume you only have the selector on the right 
side of the method declaration, i.e. no UDA's or similar.


--
/Jacob Carlborg


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

2014-12-18 Thread Joakim via Digitalmars-d-announce

On Friday, 19 December 2014 at 01:00:30 UTC, Kiith-Sa wrote:

It's not a dethroner for the Unreal Engine 4, but I try my best
to get it into work. It's current name is VDP engine, but if 
you
can come up with a better name I might change it. I still 
haven't

decided to make it open or closed source (if it'll be ever used
by any game that makes profit, I'd like to get some share from
it).


Noticed there's a question at Reddit (a bot submits all 
announce threads to Reddit):


https://www.reddit.com/r/d_language/comments/2pm2ba/2d_game_engine_written_in_d_is_in_progress/


Since others are mentioning commercial open-source models and 
that guy asked about using a more liberal license, let me mention 
another newer model.  Develop most of the codebase in the open 
under a permissive license like MIT/BSD/Apache but keep some of 
the features or patches closed, particularly those that would 
most interest potential commercial licensees.


This is the model used by Android, the most successful open 
source project ever, where AOSP is released as OSS then the 
hardware and smartphone vendors add their proprietary blobs and 
patches before selling the entire software bundle.  It's probably 
the best model if you want to be open source, get wide usage, and 
still have good commercial possibilities.


Re: C# to D Compiler :)

2014-12-18 Thread Stefan Koch 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!


Re: Online documentation for DSFML exists!

2014-12-18 Thread MattCoder via Digitalmars-d-announce

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

Check it out here: http://dsfml.com/doc.html
I would love some feed back on this.


I liked and nice job!

Matheus.


Re: Online documentation for DSFML exists!

2014-12-18 Thread Dmitry via Digitalmars-d-announce

Great! Thank you!


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

2014-12-18 Thread Kiith-Sa via Digitalmars-d-announce
On Wednesday, 17 December 2014 at 19:06:24 UTC, solidstate1991 
wrote:

I started to work on an engine, which emulates the features and
limitations of older graphics systems, mainly for retro-styled
indie games.

Features:

-Support for parallax scrolling, and multiple sprite and tile
layers
-Support for sprite scaling and rotation
-Max. 65536 colors on screen from a palette
-Variable sprite sizes for easier development, tile layers can
work with any size of tiles as long as all of the tiles are the
same size on one layer
-Collision detection
-Support for modding
-Sprite editor, tile map editor

It's not a dethroner for the Unreal Engine 4, but I try my best
to get it into work. It's current name is VDP engine, but if you
can come up with a better name I might change it. I still 
haven't

decided to make it open or closed source (if it'll be ever used
by any game that makes profit, I'd like to get some share from
it).


Noticed there's a question at Reddit (a bot submits all announce 
threads to Reddit):


https://www.reddit.com/r/d_language/comments/2pm2ba/2d_game_engine_written_in_d_is_in_progress/


Online documentation for DSFML exists!

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

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.


Re: C# to D Compiler :)

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

This is the Current Feature List

Basic PInvoke
Arrays including initializers
Fields/ Properties/Methods with correct hiding semantics
Properties are better implemented
String
Int/Double/Bool
Classes and Polymorphism … we follow C# model
Some benchmarks - basic linpack, fannkuch, nbody
Modules/Namespaces
Enum - no enum.Parse support yet though
Iterators are as .Net use enumerators etc … switching arrays to 
use simple for loop though for performance improvement

Constructors/Overloads/Base Class calls
Static Variables/Members/Properties
Basic System.Math, more implementations required though
Extension Methods
Operator Overloading
Indexers
Anonymous Classes
Generics … All current test cases work
Boxed structs and interface casting for them
Inner Classes in the form of OuterClass_InnerClass
Static Constructors
Explicit Interfaces … current fix is not so pretty though … i.e. 
IEnumerator.MoveNext becomes IEnumerator.IEnumerator_MoveNext 
(this allows implementing methods with same name, differently)

Implicit and Explicit Cast Operators
String switch … dlang supports this natively :)
String.Format .. though implementation is very basic
C# multi dimensional arrays work correctly (even with multi dim 
syntax :) )… mostly … look at multi test from CrossNet
Delegates work including multicast (Native delegates through 
P/Invoke work too)

Events work as expected … though a bit slower than C#(mono)


C# to D Compiler :)

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

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


Re: "Programming in D" book, decent ebook versions

2014-12-18 Thread Walter Bright via Digitalmars-d-announce

On 12/18/2014 11:26 AM, Ali Çehreli wrote:

So, it is readable on your Kindle, right?


Haven't checked.


Have you noticed the book does not have any foreword? ;)


Looking at my shoe ...



Re: D/Objective-C 64bit

2014-12-18 Thread Christian Schneider via Digitalmars-d-announce


The reason for the change is that the old syntax, [foo:bar:], 
required language changes wheres the new syntax, 
@selector("foo:bar:"), doesn't. When D/Objective-C was 
initially created D didn't support UDA's, that's why a new 
syntax was invented. If D had supported UDA's back then, that 
would most likely have been used.


Hopefully this will also increase the chances of D/Objective-C 
being merged with upstream DMD.


OK! Yes I understand, the merge with upstream DMD is one of the 
most important things, i totally agree.


I updated all the tests quickly with some global search and 
replace using regular expression.


Regex is one of my weaknesses. If you don't mind sharing yours 
(and if you have them still lying around) please send to 
schneider at gerzonic.net, this would be greatly appreciated, and 
would make my life a bit easier.


this is all a great and exciting adventure ;)



Re: "Programming in D" book, decent ebook versions

2014-12-18 Thread Ali Çehreli via Digitalmars-d-announce

On 12/18/2014 10:09 AM, Walter Bright wrote:

> On 12/15/2014 2:25 AM, Ali Çehreli wrote:

>> I consider these beta quality:
>>
>>http://ddili.org/ders/d.en/

> This is outstanding work! Thank you!

So, it is readable on your Kindle, right? Have you noticed the book does 
not have any foreword? ;)


Ali



Re: "Programming in D" book, decent ebook versions

2014-12-18 Thread Walter Bright via Digitalmars-d-announce

On 12/15/2014 2:25 AM, Ali Çehreli wrote:

- Removed the unrelated Turkish menu from the English pages

- Improved the ebook formats

- Removed the download page and linked the ebook versions directly from the main
page instead

I consider these beta quality:

   http://ddili.org/ders/d.en/

(I am not sure why, but you may have to refresh the page in your browser.)

I know that the format needs further improvements but please let me know if
there are serious issues like some text not showing up at all. (Preferably,
respond in this thread to avoid duplicate reports.)

Ali


This is outstanding work! Thank you!


Re: Travis-CI support for D

2014-12-18 Thread Mathias LANG via Digitalmars-d-announce

On Thursday, 11 December 2014 at 12:50:04 UTC, Martin Nowak wrote:
Nice, that I can finally get hold of you Brad. Need your help 
on three topics.


Cam we please rework the download folder structure? It's a PITA 
to work with, see 
https://github.com/travis-ci/travis-build/pull/340/files#diff-ac986a81b67f1bd5851c535881c18abeR91.

Most obvious idea, make a sub folder per version.
http://forum.dlang.org/post/mailman.2638.1417638975.9932.digitalmar...@puremagic.com

We need some sort of LATEST redirect, you cannot expect all 
downstream maintainers to update their scripts for each release.


And last we need dlang.org on the auto-tester. The 
documentation breaks with many pull requests. Just building 
would be enough for now, though it's a nice reward for people 
if they could see the result of their pull.


https://github.com/braddr/d-tester/issues/41

-Martin


Brad, are we going to see this ? It could be VERY useful for some 
tools.


Also, thank you Martin, Iain and David for this. It was really 
needed :)


Re: Facebook is using D in production starting today

2014-12-18 Thread Rune Christensen via Digitalmars-d-announce
On Monday, 18 November 2013 at 17:23:25 UTC, Andrei Alexandrescu 
wrote:

On 11/18/13 6:03 AM, Gary Willoughby wrote:
On Friday, 11 October 2013 at 00:36:12 UTC, Andrei 
Alexandrescu wrote:
In all likelihood we'll follow up with a blog post describing 
the

process.


Any more news on this Andrei?


Not yet. I'm the bottleneck here - must find the time to work 
on that.


Andrei


Are you still using D in production? Are you using it more than 
before?


Regards,
Rune


Re: D/Objective-C 64bit

2014-12-18 Thread Jacob Carlborg via Digitalmars-d-announce

On 2014-12-17 20:51, Christian Schneider wrote:


OMG, what did you do? all my beautiful appkit and foundation header
files are destroyed! do you plan any other such attacks?


Hopefully no :)


lol, i must admit, i was a bit shocked about this sudden surprise. what
is the main motivation? i thought the old style looked good because it
made visually clear that it was glue into objective-c, as it looked very
familiar.


The reason for the change is that the old syntax, [foo:bar:], required 
language changes wheres the new syntax, @selector("foo:bar:"), doesn't. 
When D/Objective-C was initially created D didn't support UDA's, that's 
why a new syntax was invented. If D had supported UDA's back then, that 
would most likely have been used.


Hopefully this will also increase the chances of D/Objective-C being 
merged with upstream DMD.



with a little scripting / string processing i can adapt to the
new style, i guess.


I updated all the tests quickly with some global search and replace 
using regular expression.


--
/Jacob Carlborg