Re: dlang.org faq says dmd is licensed with norton license

2017-08-28 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, August 29, 2017 06:43:19 meppl via Digitalmars-d wrote:
> i incidentally noticed the FAQ claims the dmd-backend would be
> licensed under a norton license. i thought it is an outdated
> information:
> https://dlang.org/faq.html#q5
>
>
> however, i also checked the source code and it turned out that
> some files dont contain the string "boost":
> $ fgrep -iLR boost src/ddmd/backend/
> src/ddmd/backend/bcomplex.h
> src/ddmd/backend/dt.h
> src/ddmd/backend/backend.txt
> src/ddmd/backend/code_stub.h
> src/ddmd/backend/dwarf2.h
> src/ddmd/backend/dwarf.d
> src/ddmd/backend/mach.d
> src/ddmd/backend/md5.c
> src/ddmd/backend/md5.h
> src/ddmd/backend/bcomplex.c
> src/ddmd/backend/mscoff.d
> src/ddmd/backend/dwarf2.d
> src/ddmd/backend/xmm.h
> src/ddmd/backend/cv4.d
> src/ddmd/backend/mscoff.h
> src/ddmd/backend/mach.h
> src/ddmd/backend/dwarf.h
> src/ddmd/backend/melf.h
> src/ddmd/backend/md5.d
> src/ddmd/backend/bcomplex.d
> src/ddmd/backend/cv4.h
>
>
> do you think the missing license headers are relevant? If not, i
> would make a pull request for the FAQ

Both the frontend and backend are now entirely under the Boost license.
Anything that says differently is out-of-date, but the change was recent
enough, and there have been enough places to change, that it's no surprise
if you've found some places where it hasn't been updated yet.

- Jonathan M Davis



dlang.org faq says dmd is licensed with norton license

2017-08-28 Thread meppl via Digitalmars-d
i incidentally noticed the FAQ claims the dmd-backend would be 
licensed under a norton license. i thought it is an outdated 
information:

https://dlang.org/faq.html#q5


however, i also checked the source code and it turned out that 
some files dont contain the string "boost":

$ fgrep -iLR boost src/ddmd/backend/
src/ddmd/backend/bcomplex.h
src/ddmd/backend/dt.h
src/ddmd/backend/backend.txt
src/ddmd/backend/code_stub.h
src/ddmd/backend/dwarf2.h
src/ddmd/backend/dwarf.d
src/ddmd/backend/mach.d
src/ddmd/backend/md5.c
src/ddmd/backend/md5.h
src/ddmd/backend/bcomplex.c
src/ddmd/backend/mscoff.d
src/ddmd/backend/dwarf2.d
src/ddmd/backend/xmm.h
src/ddmd/backend/cv4.d
src/ddmd/backend/mscoff.h
src/ddmd/backend/mach.h
src/ddmd/backend/dwarf.h
src/ddmd/backend/melf.h
src/ddmd/backend/md5.d
src/ddmd/backend/bcomplex.d
src/ddmd/backend/cv4.h


do you think the missing license headers are relevant? If not, i 
would make a pull request for the FAQ


Events in D

2017-08-28 Thread bitwise via Digitalmars-d
I needed some C# style events, so I rolled my own. Long story 
short, the result was unsatisfactory.


Library based events are inadequate for basically the same 
reasons as library based properties (often suggested/attempted in 
C++). The problem is that the properties/events don't have access 
to the fields or methods of the containing object, and as such, 
incur the cost of an extra pointer per event/property, or worse, 
a delegate if custom behavior per event is needed, in order to 
provide that access. One obvious example would be synchronized 
properties/events.


Anyways, I threw together some code while thinking about what an 
event may look like in D:


struct Foo
{
List!(void function()) callbacks;

@event void onEvent(string op, Args...)(Args args)
{
static if(op == "+")
{
callbacks.add(args[0]);
}
else static if(op == "-")
{
callbacks.remove(args[0])
}
else static if(op == "()")
{
foreach(cb; callbacks)
cb(args);
}
}

// or..

@event {
void onEvent(string op, Args...)(Args args)
if(op == "+" && Args.length == 1 && 
isSomeFunction(Args[0]))

{
callbacks.add(args[0]);
}

void onEvent(string op, Args...)(Args args)
if(op == "-" && Args.length == 1 && 
isSomeFunction(Args[0]))

{
callbacks.remove(args[0]);
}

void onEvent(string op, Args...)(Args args)
if(op == "()" && __traits(compiles, { 
callbacks[0](args); })

{
foreach(cb; callbacks)
cb(args);
}

// this could work in the example above
// if events just always returned an int
bool onEvent(string op, Args...)(Args args)
if(op == "!!" && Args.length == 0)
{
return !callbacks.empty;
}
}
}

void baz(int n) {
writeln(n);
}

so usage like this:

`
Foo foo;
foo.onEvent += (int n) => writeln(n);
foo.onEvent += &baz;
foo.onEvent -= &baz;

if(foo.onEvent)
foo.onEvent(1);
`

becomes this:

`
Foo foo;
foo.onEvent!"+"(() => writeln("bar"));
foo.onEvent!"+"(&baz);
foo.onEvent!"-"(&baz);

if(foo.onEvent!"!!"())
 foo.onEvent!"()"(1);
`

and outputs this:

1



Re: D Tour is down

2017-08-28 Thread Moritz Maxeiner via Digitalmars-d

On Monday, 28 August 2017 at 23:57:01 UTC, Mengu wrote:

On Monday, 28 August 2017 at 17:16:59 UTC, Mengu wrote:
On Monday, 28 August 2017 at 08:19:10 UTC, Petar Kirov 
[ZombineDev] wrote:

On Monday, 28 August 2017 at 07:52:00 UTC, Joakim wrote:

On Monday, 28 August 2017 at 07:44:48 UTC, Wulfklaue wrote:

On Sunday, 27 August 2017 at 22:27:45 UTC, Mengu wrote:
d tour page is down for at least a week now. someone 
please fix that.


thanks.


Seems to be active for me ...


It shows a blank page for me.  Also, the wiki seems really 
slow nowadays.


Can you try again? I think that if there was a problem, it is 
gone now.


it works on my android phone rn. i'll post if it doesn't work 
on the mac.


on mac, with chrome version 60.0.3112.90 (64-bit), it renders 
an empty page.


Do you have some script blocking enabled? Because the tour needs 
to be able to load from ajax.googleapis.com; if that is blocked, 
it renders an empty page (tested with uMatrix and Firefox 55.0.2).


Re: D Tour is down

2017-08-28 Thread Mengu via Digitalmars-d

On Monday, 28 August 2017 at 17:16:59 UTC, Mengu wrote:
On Monday, 28 August 2017 at 08:19:10 UTC, Petar Kirov 
[ZombineDev] wrote:

On Monday, 28 August 2017 at 07:52:00 UTC, Joakim wrote:

On Monday, 28 August 2017 at 07:44:48 UTC, Wulfklaue wrote:

On Sunday, 27 August 2017 at 22:27:45 UTC, Mengu wrote:
d tour page is down for at least a week now. someone please 
fix that.


thanks.


Seems to be active for me ...


It shows a blank page for me.  Also, the wiki seems really 
slow nowadays.


Can you try again? I think that if there was a problem, it is 
gone now.


it works on my android phone rn. i'll post if it doesn't work 
on the mac.


on mac, with chrome version 60.0.3112.90 (64-bit), it renders an 
empty page.




Re: Editor recommendations for new users.

2017-08-28 Thread Moritz Maxeiner via Digitalmars-d

On Monday, 28 August 2017 at 20:48:44 UTC, Ryion wrote:
On Sunday, 27 August 2017 at 18:08:52 UTC, Moritz Maxeiner 
wrote:
It's nearly ten times the size, so yeah, it is relative to 
Textadept.


You can say the same thing in comparison with vim which is 
only a 2MB install size,

20MB in comparison is gigantic.


Indeed, but that's only the raw executable, not the full 
package (which includes things like syntax highlighting), 
which adds another 26MB.
But, yes, Textadept and vim+vim-core (Gentoo speak) are both 
gigantic required to bare bones vim. But bare bones vim 
doesn't fulfill the syntax highlighting requirement IIRC.


The requirements are rather vague, you can interpret it in a 
number of ways.


The sensible interpretation imho is "as low an install 
footprint as possible while still fulfilling the other 
requirements". I'm not aware of anything below ~20MB install 
footprint that fulfills the other requirements, but I'd be 
interested if you know any.


As the OP did not state any requirement, he can consider 2GB as 
small.


If there's nothing significantly smaller that fits the other 
requirements, yes.

As those exists, no.


Vague requirements do not invalidate the recommendation.


I don't consider the requirement to be vague if taken together 
with the other *must* requirements. On its own, I would agree 
with you.




Laptops have 1TB harddrives as good as standard.

Even on a "small" 128GB SSD, it pales in comparison to the 10GB 
that Windows alone takes. Let alone the page file, swapfile, 
hibernation file etc...


All red herrings.



I wouldn't consider 200MB gigantic in comparison to 20MB 
cause there is literally no difference of use for me.


The thread is about OP's requirements.

You'd have to have a really shitty laptop for it to be an 
issue.


Not relevant.


As the OP has not stated the size of the laptops it needs to be 
installed upon, the discussion about 180MB vs 20MB or 2MB is 
irrelevant.


Except I'm not arguing that ~20MB is small. It's just small 
compared to 180MB in this specific context as both fulfill the 
other requirements.
If I knew of a 2MB recommendation that fits the other 
requirements (such as easy to install) I would say 20MB is 
gigantic and consider my own recommendation to be invalid.


We are not talking a 4GB Visual Studio installation. And its 
160MB for the 32Bit version. :)


You say that particular discussion is irrelevant, yet you pursue 
it.




So if the OP has other requirements, HE can state them in this 
topic, instead of you making up ideas as to what YOU consider 
small.


I'm not making up any ideas about what's small in terms of a 
fixed number; I've merely argued about size in relationship to 
each other, i.e. 180MB is gigantic only in relation to the 20MB 
under the assumption that both fulfill all other requirements. 
With regards to the requirements I've stated what I consider the 
sane interpretation, but if the OP clarifies that point to a hard 
number, that would indeed be helpful.


Your comments are irrelevant without knowing the OP his 
expectations.


I consider OP's expectations to be clear from his posted 
requirements, so until OP has indeed clarified, I disagree.




So again please do not distract from the topic.


Why "again"? You've not stated so before AFAICT.
Regardless, I disagree that discussing the validity of 
recommendations in a thread specifically made to gather such 
recommendations is a distraction from the topic; I would contend 
that it lies at the heart of the topic.


Re: Editor recommendations for new users.

2017-08-28 Thread Ryion via Digitalmars-d

On Sunday, 27 August 2017 at 18:08:52 UTC, Moritz Maxeiner wrote:
It's nearly ten times the size, so yeah, it is relative to 
Textadept.


You can say the same thing in comparison with vim which is 
only a 2MB install size,

20MB in comparison is gigantic.


Indeed, but that's only the raw executable, not the full 
package (which includes things like syntax highlighting), which 
adds another 26MB.
But, yes, Textadept and vim+vim-core (Gentoo speak) are both 
gigantic required to bare bones vim. But bare bones vim doesn't 
fulfill the syntax highlighting requirement IIRC.


The requirements are rather vague, you can interpret it in a 
number of ways.


The sensible interpretation imho is "as low an install 
footprint as possible while still fulfilling the other 
requirements". I'm not aware of anything below ~20MB install 
footprint that fulfills the other requirements, but I'd be 
interested if you know any.


As the OP did not state any requirement, he can consider 2GB as 
small. Vague requirements do not invalidate the recommendation.


Laptops have 1TB harddrives as good as standard.

Even on a "small" 128GB SSD, it pales in comparison to the 10GB 
that Windows alone takes. Let alone the page file, swapfile, 
hibernation file etc...


I wouldn't consider 200MB gigantic in comparison to 20MB cause 
there is literally no difference of use for me.


The thread is about OP's requirements.

You'd have to have a really shitty laptop for it to be an 
issue.


Not relevant.


As the OP has not stated the size of the laptops it needs to be 
installed upon, the discussion about 180MB vs 20MB or 2MB is 
irrelevant. We are not talking a 4GB Visual Studio installation. 
And its 160MB for the 32Bit version. :)


So if the OP has other requirements, HE can state them in this 
topic, instead of you making up ideas as to what YOU consider 
small. Your comments are irrelevant without knowing the OP his 
expectations.


So again please do not distract from the topic.


Re: HTOD

2017-08-28 Thread Jacob Carlborg via Digitalmars-d

On 2017-08-28 20:24, 12345swordy wrote:


What compiler are you referring to? Clang? LDC? DMD?


The D compilers, DMD and LDC.

--
/Jacob Carlborg


Re: HTOD

2017-08-28 Thread 12345swordy via Digitalmars-d

On Monday, 28 August 2017 at 06:30:53 UTC, Jacob Carlborg wrote:

On 2017-08-26 23:32, 12345swordy wrote:

I am not asking that, I'm asking regarding the project mention 
earlier.


Adding support for C++ to DStep is a long term goal, yes. But 
the compiler still needs to support those features. Unless 
DStep is going to generate C wrappers, which I would like to 
avoid.


What compiler are you referring to? Clang? LDC? DMD?



Re: D Tour is down

2017-08-28 Thread Mengu via Digitalmars-d
On Monday, 28 August 2017 at 08:19:10 UTC, Petar Kirov 
[ZombineDev] wrote:

On Monday, 28 August 2017 at 07:52:00 UTC, Joakim wrote:

On Monday, 28 August 2017 at 07:44:48 UTC, Wulfklaue wrote:

On Sunday, 27 August 2017 at 22:27:45 UTC, Mengu wrote:
d tour page is down for at least a week now. someone please 
fix that.


thanks.


Seems to be active for me ...


It shows a blank page for me.  Also, the wiki seems really 
slow nowadays.


Can you try again? I think that if there was a problem, it is 
gone now.


it works on my android phone rn. i'll post if it doesn't work on 
the mac.




Re: D Tour is down

2017-08-28 Thread via Digitalmars-d

On Sunday, 27 August 2017 at 22:27:45 UTC, Mengu wrote:
d tour page is down for at least a week now. someone please fix 
that.


thanks.


For people still experiencing issues with dlang-tour 
(https://tour.dlang.org/ or https://run.dlang.io/), for example 
getting a blank page, try clearing your browser cache and 
refreshing the page.


Re: D, SCons, Dub

2017-08-28 Thread Atila Neves via Digitalmars-d
On Tuesday, 18 April 2017 at 00:14:40 UTC, Andrei Alexandrescu 
wrote:

On 4/17/17 6:58 PM, Atila Neves wrote:

On Monday, 17 April 2017 at 17:51:33 UTC, Russel Winder wrote:

Just in case anyone gives a :

I have submitted a pull request that adds ProgramAllAtOnce as 
a builder in the dmd, ldc, and gdc tools of SCons. This does 
an 'all at once' compilation in a single compiler 
instantiation, unlike the standard module at a time 
compilation and then link the program. There are lots of 
arguments about whether "all at once" is at all useful, I 
have added it simply because it is the only way Unit-Threaded 
works.


It's the only way __traits(getUnitTests) works. Unfortunately. 
I'm just going to fix that dmd bug myself.


Thanks!! -- Andrei


So... I have, and it's languishing waiting for someone to merge 
it. Or just to give me a LGTM, I'd merge it myself then.


https://github.com/dlang/dmd/pull/6727

Atila


Re: getting dcd completions for dub installed modules

2017-08-28 Thread Fra Mecca via Digitalmars-d

On Sunday, 27 August 2017 at 14:33:24 UTC, user123 wrote:

On Sunday, 27 August 2017 at 14:26:20 UTC, Fra Mecca wrote:

Hi all,
I was wondering how do you get dcd-server to import packages 
installed from dub in ~/.dub


The most generic way is to use the config file:

https://github.com/dlang-community/DCD#configuration-files

but your editor may have a system that does the same.
The one i use does this automatically for the projects lelvel 1 
deps and has also a GUI to edit the path that are known by DCD.


Which one are you using?


Re: D Tour is down

2017-08-28 Thread Joakim via Digitalmars-d
On Monday, 28 August 2017 at 08:19:10 UTC, Petar Kirov 
[ZombineDev] wrote:

On Monday, 28 August 2017 at 07:52:00 UTC, Joakim wrote:

On Monday, 28 August 2017 at 07:44:48 UTC, Wulfklaue wrote:

On Sunday, 27 August 2017 at 22:27:45 UTC, Mengu wrote:
d tour page is down for at least a week now. someone please 
fix that.


thanks.


Seems to be active for me ...


It shows a blank page for me.  Also, the wiki seems really 
slow nowadays.


Can you try again? I think that if there was a problem, it is 
gone now.


Yes, the tour is working again for me.


Re: D Tour is down

2017-08-28 Thread Joakim via Digitalmars-d
On Monday, 28 August 2017 at 08:19:10 UTC, Petar Kirov 
[ZombineDev] wrote:

On Monday, 28 August 2017 at 07:52:00 UTC, Joakim wrote:

On Monday, 28 August 2017 at 07:44:48 UTC, Wulfklaue wrote:

On Sunday, 27 August 2017 at 22:27:45 UTC, Mengu wrote:
d tour page is down for at least a week now. someone please 
fix that.


thanks.


Seems to be active for me ...


It shows a blank page for me.  Also, the wiki seems really 
slow nowadays.


Can you try again? I think that if there was a problem, it is 
gone now.


Yes, the tour is working again for me.


Re: D Tour is down

2017-08-28 Thread Swoorup Joshi via Digitalmars-d

On Monday, 28 August 2017 at 07:52:00 UTC, Joakim wrote:

On Monday, 28 August 2017 at 07:44:48 UTC, Wulfklaue wrote:

On Sunday, 27 August 2017 at 22:27:45 UTC, Mengu wrote:
d tour page is down for at least a week now. someone please 
fix that.


thanks.


Seems to be active for me ...


It shows a blank page for me.  Also, the wiki seems really slow 
nowadays.


Possible garbage collecting?


Re: D Tour is down

2017-08-28 Thread via Digitalmars-d

On Monday, 28 August 2017 at 07:52:00 UTC, Joakim wrote:

On Monday, 28 August 2017 at 07:44:48 UTC, Wulfklaue wrote:

On Sunday, 27 August 2017 at 22:27:45 UTC, Mengu wrote:
d tour page is down for at least a week now. someone please 
fix that.


thanks.


Seems to be active for me ...


It shows a blank page for me.  Also, the wiki seems really slow 
nowadays.


Can you try again? I think that if there was a problem, it is 
gone now.


Re: Promoting TutorialsPoint's D tutorial

2017-08-28 Thread Ecstatic Coder via Digitalmars-d

On Monday, 28 August 2017 at 02:49:30 UTC, Dmitry wrote:

On Sunday, 27 August 2017 at 23:22:06 UTC, Ecstatic Coder wrote:

Done !

https://issues.dlang.org/show_bug.cgi?id=17789

Thanks for the advice :)


Also you could fork the site (main page), make changes and 
share result. Then will be possible see changes, how it'll look 
"live". And people can vote - like/dislike. For example, 
https://forum.dlang.org/thread/odbtivxmrggaywcbe...@forum.dlang.org


I like the idea, but it's too complicated for my current skills.

What I can actually do without problem is a graphical mock up of 
the landing page, as that's something I'm already used to do to 
get a website design validation.


Re: D Tour is down

2017-08-28 Thread Joakim via Digitalmars-d

On Monday, 28 August 2017 at 07:44:48 UTC, Wulfklaue wrote:

On Sunday, 27 August 2017 at 22:27:45 UTC, Mengu wrote:
d tour page is down for at least a week now. someone please 
fix that.


thanks.


Seems to be active for me ...


It shows a blank page for me.  Also, the wiki seems really slow 
nowadays.


Re: D Tour is down

2017-08-28 Thread Wulfklaue via Digitalmars-d

On Sunday, 27 August 2017 at 22:27:45 UTC, Mengu wrote:
d tour page is down for at least a week now. someone please fix 
that.


thanks.


Seems to be active for me ...