Re: Added Wiki page Programming_in_D_tutorial_on_Embedded_Linux_ARM_devices

2018-03-14 Thread Aravinda VK via Digitalmars-d-announce

On Wednesday, 14 March 2018 at 09:29:26 UTC, dangbinghoo wrote:

hello there,

Just added a paper for cross compiling D on arm linux devices.

https://wiki.dlang.org/Programming_in_D_tutorial_on_Embedded_Linux_ARM_devices

As my english is not that good, every body who find mistakes 
just try to fix it.


Thanks!


For Fedora I found below link to install `gcc-arm-linux-gnueabihf`

https://copr.fedorainfracloud.org/coprs/lantw44/arm-linux-gnueabihf-toolchain/


Re: Vision document for H1 2018

2018-03-11 Thread Aravinda VK via Digitalmars-d-announce

On Sunday, 11 March 2018 at 16:15:22 UTC, rumbu wrote:

On Sunday, 11 March 2018 at 14:37:28 UTC, bachmeier wrote:
And this clarifies the source of your confusion. The D 
programming language is an open source project, not a 
for-profit company. D is not the language you're looking for.


There are 3 years since C# is also open source project. Last 
week 72 pull requests form 24 contributors were merged on 
~master. And this is only for Roslyn (the C# compiler).


The difference (at least for me) is that contributing to C# is 
a no-brainer. Contributing to D needs an advanced degree in 
computer science. Using the information on the D wiki didn't 
helped me until now to successfully compile and test a fresh 
copy of dmd or phobos.


I contributed to phobos for the first time for the release 
2.079.0. Experience was smooth and also I learnt many new things 
from the review comments. I was able to follow wiki page to 
compile phobos or compile one specific module. Please let us know 
the issue faced, so that wiki can be improved.


Re: dxml 0.2.0 released

2018-02-11 Thread Aravinda VK via Digitalmars-d-announce
On Monday, 12 February 2018 at 05:36:51 UTC, Jonathan M Davis 
wrote:

dxml 0.2.0 has now been released.

I really wasn't planning on releasing anything this quickly 
after announcing dxml, but when I went to start working on DOM 
support, it turned out to be surprisingly quick and easy to 
implement. So, dxml now has basic DOM support.


As part of that, it became clear that dxml.parser.stax should 
be renamed to dxml.parser, since it's really the only parser 
(DOM support involves just providing a way to hold the results 
of the parser, not any actual parsing, and that's clear from 
the API rather than being an implementation detail), and it 
makes for a shorter import path. So, I figured that I should do 
a release sooner rather than later to reduce how many folks the 
rename ends up affecting.


For this release, dxml.parser.stax is now an empty, deprecated, 
module that publicly imports dxml.parser, but it will be 
removed in 0.3.0, whenever that is released. So, the few folks 
who grabbed the initial release won't end up with immediate 
code breakage if they upgrade.


One nice side effect of how I implemented DOM support is that 
it's trivial to get the DOM for a portion of an XML document 
rather than the entire thing, since it will produce a DOMEntity 
from any point in an EntityRange.


Documentation: http://jmdavisprog.com/docs/dxml/0.2.0/
Github: https://github.com/jmdavis/dxml/tree/v0.2.0
Dub: http://code.dlang.org/packages/dxml

- Jonathan M Davis


Awesome. Just tried it now as below and it works. Thanks for this 
library


import std.stdio;

import dxml.dom;

struct Record
{
string name;
string email;
}


Record[] parseRecords(string xml)
{
Record[] records;
auto d = parseDOM!simpleXML(xml);
auto root = d.children[0];

foreach(record; root.children)
{
auto rec = Record();
foreach(ele; record.children)
{
if (ele.name == "name")
rec.name = ele.children[0].text;
if (ele.name == "email")
rec.email = ele.children[0].text;
}
records ~= rec;
}

return records;
}

void main()
{
auto xml = "\n" ~
"\n" ~
"N1\n" ~
"E1\n" ~
"\n" ~
"\n" ~
"N2\n" ~
"E2\n" ~
"\n" ~
"\n" ~
"E3\n" ~
"N3\n" ~
"\n" ~
"\n" ~
"";
auto records = parseRecords(xml);
writeln(records);
}