Re: Please help me with improving dlang.org

2015-01-18 Thread MattCoder via Digitalmars-d
On Monday, 19 January 2015 at 01:41:04 UTC, Andrei Alexandrescu 
wrote:

Content discussion to follow soon. -- Andrei


As I asked in another Topic without any answer, I wasn't able to 
find (or at least is not easily visible) anything related to 
CONTRIBUTE even on sitemap.


I think there should be a button for this on the main site.

Matheus.


Re: Please help me with improving dlang.org

2015-01-18 Thread Rikki Cattermole via Digitalmars-d

On 19/01/2015 2:07 p.m., Walter Bright wrote:

On 1/18/2015 1:41 AM, Rikki Cattermole wrote:

On 18/01/2015 10:40 p.m., Tofu Ninja wrote:

On Sunday, 18 January 2015 at 08:42:30 UTC, Walter Bright wrote:


Me like. And I do like the spidery red lines in particular.


The red lines were what I particularly disliked, looks old and unclean
to me.


Also that contrast is awful on the eyes!


How can a 1 pixel wide line be awful on the eyes?


When you have a headache and not in a really good head space it can hurt.


Re: Please help me with improving dlang.org

2015-01-18 Thread Mike via Digitalmars-d
On Monday, 19 January 2015 at 02:00:52 UTC, Andrei Alexandrescu 
wrote:


2) Aside from the documentation generated from the source 
code, why does
the website need to be built?  IMO a static website like 
dlang.org
shouldn't need any additional tools other than a browser and 
an image
editor.  I may explore some options later, but only after 1) 
is done.


The short answer is because there's no robust inclusion and 
code reuse solution at HTML level.


Would it be a horrible idea to render DDoc in javascript?

Mike


Re: [dub] specify dependency configuration

2015-01-18 Thread Rikki Cattermole via Digitalmars-d-learn
I forgot to mention dub should automatically choose the first 
configuration available if you do not specify it.

In this case that's the library one. Or atleast it should do that.


Re: post qualifier and template constraint limitation, is there a reason ?

2015-01-18 Thread Walter Bright via Digitalmars-d

On 1/18/2015 12:16 AM, Daniel Murphy wrote:

Walter Bright  wrote in message news:m9fodo$18lu$1...@digitalmars.com...

I don't really know where the class change came from :-(


https://github.com/D-Programming-Language/dmd/pull/1227


Thanks for digging it up. I see I missed that one.


Re: The ugly truth about ddoc

2015-01-18 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 19 January 2015 at 02:18:32 UTC, Andrei Alexandrescu 
wrote:
I'm sure experts must have tools for allowing things like 
variables and macros for css creation.


My css macro expander (http://code.dlang.org/packages/cssexpand) 
was in part inspired by ddoc actually, so this is no surprise to 
me...


My only real complaint about the ddoc site is that the build 
process is pure evil.


Re: Please help me with improving dlang.org

2015-01-18 Thread MattCoder via Digitalmars-d
On Monday, 19 January 2015 at 02:19:30 UTC, Andrei Alexandrescu 
wrote:

On 1/18/15 6:09 PM, MattCoder wrote:
On Monday, 19 January 2015 at 01:41:04 UTC, Andrei 
Alexandrescu wrote:

Content discussion to follow soon. -- Andrei


As I asked in another Topic without any answer, I wasn't able 
to find
(or at least is not easily visible) anything related to 
CONTRIBUTE

even on sitemap.

I think there should be a button for this on the main site.


Great idea. Could you please put that in bugzilla, it's 
important and shouldn't be forgotten. -- Andrei


My first time using bugzilla: 
https://issues.dlang.org/show_bug.cgi?id=14006


Please could anyone tell if I did right?

Matheus.


Re: The ugly truth about ddoc

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 6:25 PM, Adam D. Ruppe wrote:

On Monday, 19 January 2015 at 02:18:32 UTC, Andrei Alexandrescu wrote:

I'm sure experts must have tools for allowing things like variables
and macros for css creation.


My css macro expander (http://code.dlang.org/packages/cssexpand) was in
part inspired by ddoc actually, so this is no surprise to me...


Awesome.


My only real complaint about the ddoc site is that the build process is
pure evil.


Let's angelize it. Speak up. What's the matter?


Andrei


Re: Please help me with improving dlang.org

2015-01-18 Thread Jacob Carlborg via Digitalmars-d

On 2015-01-19 03:22, Andrei Alexandrescu wrote:


OK, the current attempt has no gradient at all. Probably too flat? --


No, not really. But now the top menu item looks out of place. And the 
bottom border of the menu ... doesn't look right. I would guess you can 
just remove it.


Although I still like the old design better. But the collapsible menu 
might be a good idea.


--
/Jacob Carlborg


Re: import conflicts

2015-01-18 Thread Mike Parker via Digitalmars-d-learn

On 1/19/2015 4:37 AM, AndyC wrote:

On Sunday, 18 January 2015 at 19:20:34 UTC, Vlad Levenfeld wrote:

I get this all the time with std.array.array (I use my own array
implementations, but phobos' array seems to secretly creep in
everywhere). I think its got to do with that private import visibility
bug (https://issues.dlang.org/show_bug.cgi?id=314 or
https://issues.dlang.org/show_bug.cgi?id=13096 I think)
which, by the looks of it, should be getting a fix... soon? ish?


Ah, if its just a compiler bug I'm ok with that.  I was worried there
was something about the language I didnt understand.

I got it to compile ok using:

import std.file: remove, exists, rename;

Thanks,

-Andy


The problem is, that's the bug Vlad was talking about. Selective imports 
wind up becoming public, polluting the namespace. The thing to do when 
you get conflicts is to use the fully-qualified function name, like so:


std.file.remove( lastUpdate.7z );

Keep those selective imports out of module scope until the bug is fixed. 
They work in local scope just fine:


void foo() {
import std.file : remove, exists;
if( exists( foo )) remove( foo );
}


Re: The ugly truth about ddoc

2015-01-18 Thread Meta via Digitalmars-d
On Monday, 19 January 2015 at 02:36:35 UTC, Andrei Alexandrescu 
wrote:

On 1/18/15 6:32 PM, Meta wrote:
On Monday, 19 January 2015 at 02:25:23 UTC, Adam D. Ruppe 
wrote:
On Monday, 19 January 2015 at 02:18:32 UTC, Andrei 
Alexandrescu wrote:
I'm sure experts must have tools for allowing things like 
variables

and macros for css creation.


My css macro expander 
(http://code.dlang.org/packages/cssexpand) was
in part inspired by ddoc actually, so this is no surprise to 
me...


My only real complaint about the ddoc site is that the build 
process

is pure evil.


I can second that. I haven't tried in the past week, but I've 
been
unable to build the site, stopping the doc pulls I wanted to 
make in

their tracks.


Destroy!!! What's not working? -- Andrei


It's late now, but I'll try building tomorrow and see what 
doesn't work.


Re: The ugly truth about ddoc

2015-01-18 Thread Mike via Digitalmars-d
On Monday, 19 January 2015 at 02:36:35 UTC, Andrei Alexandrescu 
wrote:


My only real complaint about the ddoc site is that the build 
process

is pure evil.


I can second that. I haven't tried in the past week, but I've 
been
unable to build the site, stopping the doc pulls I wanted to 
make in

their tracks.


Destroy!!! What's not working? -- Andrei


For starters, simple, accurate instructions in dlang.org's 
Readme.md file.


Mike


Re: Idea: featuring forum content on dlang.org?

2015-01-18 Thread MattCoder via Digitalmars-d
On Monday, 19 January 2015 at 02:34:32 UTC, Andrei Alexandrescu 
wrote:
With all this discussion on more dynamic content on dlang.org, 
I sat down (figuratively; I've been on a hike today) and 
thought - what is dynamic about D?


Are you becoming a web-developer? :)

We already have twitter which is nice. Adding some of the above 
to the homepage would be awesome. What do you all think?


Yes, it could be nice, but you do you have in mind? Put for 
example the last 10 posts of the forum on the main page?


Matheus.


Re: Please help me with improving dlang.org

2015-01-18 Thread Walter Bright via Digitalmars-d

On 1/18/2015 6:07 PM, Rikki Cattermole wrote:

When you have a headache and not in a really good head space it can hurt.


Hope you feel better soon.


[Issue 14006] Contribute button/option on the main site and sitemap

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14006

Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com
   Hardware|x86 |All
 OS|Linux   |All

--


[Issue 14007] New: shmctl with IPC_STAT returns wrong number of attachments. shmid_ds is defined wrong.

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14007

  Issue ID: 14007
   Summary: shmctl with IPC_STAT returns wrong number of
attachments. shmid_ds is defined wrong.
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: druntime
  Assignee: nob...@puremagic.com
  Reporter: 10l94s+31wgxrstmw...@sharklasers.com

Created attachment 1464
  -- https://issues.dlang.org/attachment.cgi?id=1464action=edit
D codes with solution

I have written a simple code to create a shared memory segment (shmget).

Then attached it (shmat), and got the statistics information for that shared
memory.

According to documentation of shmat, number of attachments (shm_nattch) should
be 1.

I wrote same code in both C and D. C returns 1, D return 0.

C's shmid_ds is defined in /usr/include/bits/shm.h
D's shmid_ds is defined in core.sys.posix.sys.shm

C's definition contains conditionals for 64 bit systems.
D has definition for Linux only, no Posix. And its definition is done for
32-bit systems only.

I then defined the shmid_ds myself with conditional by using version. Finally
it is solved. I attached the working solution. dmd main-works.d will do it.

I am not familiar with merge requests. So I am putting it here.

--


[Issue 13436] posix.mak is broken for dlang.org repo

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13436

Mike slavo5...@yahoo.com changed:

   What|Removed |Added

 CC||slavo5...@yahoo.com

--- Comment #4 from Mike slavo5...@yahoo.com ---
This issue should probably be generalized to accurately documenting the build
process for dlang.org.

dlang.org should have clear instructions in readme.md (or contributing.md if
that's the convention) for building all of dlang.org, building a single
document, and how to verify in a browser (e.g. Are there any server-side
components that require a web server? If not, say so.)

A little about the site's structure and technologies would be good.  For
example, I see some files related to dub and even an .ncx file (what's that?). 
Since the site is mostly written in DDOC, a brief sentence about DDOC and a
link to the DDOC reference would be helpful.

--


Re: Please help me with improving dlang.org

2015-01-18 Thread Brad Anderson via Digitalmars-d
On Monday, 19 January 2015 at 02:22:33 UTC, Andrei Alexandrescu 
wrote:

On 1/18/15 11:43 AM, Jacob Carlborg wrote:

On 2015-01-18 17:21, Andrei Alexandrescu wrote:


Suggestions on how to make it better? -- Andrei


Something flat (i.e. no gradient) or with less difference 
between the

colors in the gradient.


OK, the current attempt has no gradient at all. Probably too 
flat? -- Andrei


Much better in my opinion.


Re: Please help me with improving dlang.org

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 6:50 PM, DaveG wrote:

Here's where I'm at. The menus don't use javascript (except when the
screen gets so small it needs a button to open the navigation, the
button uses js). It scales with screen size and should work on mobile
(untested) - I changed doctype to html5 and added metatags for mobile.

https://dl.dropboxusercontent.com/u/114394/D-site/redesign/index.html


I think I know why no javascript. Currently the *.js files are loaded 
from /js/, i.e. absolute path. Change that to relative path and it'll work.


All - what do you think of dropping the background image and use the 
DaveG's telluric background for menu?



Andrei


Re: post qualifier and template constraint limitation, is there a reason ?

2015-01-18 Thread deadalnix via Digitalmars-d

On Monday, 19 January 2015 at 02:24:00 UTC, Walter Bright wrote:

On 1/18/2015 12:46 AM, Brian Schott wrote:
On Sunday, 18 January 2015 at 08:40:19 UTC, Walter Bright 
wrote:
Sounds like a good idea. If I wasn't clear, I think that 
class change was a

mistake.


Now that I see from that pull request that the ugly syntax was 
the original, I'm

not so sure. The dfix feature I'm planning is to convert

class A if (B) : C

to

class A : C if (B)


The other way around. Consider:

  class A(T) : C!(args), D!(more args), E!(lots of stuff) if (B)

the 'if' becomes significantly separated from A.


That's exactly why I thing both should be allowed.


[Issue 12839] std.parallelism with nested functions and lambdas. Segfault

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12839

sinkuup...@gmail.com changed:

   What|Removed |Added

 CC||sinkuup...@gmail.com
  Component|Phobos  |DMD

--- Comment #4 from sinkuup...@gmail.com ---
Even replacing taskPool.amap with map!a().array, it still segfaults.


import std.algorithm;
import std.array;

auto loo(int a, int[] b)
{
auto inner(int c)
{
return a; // debugger caught SEGV at this line
}
return b.map!((x) = () = inner(x));
}

void main()
{
auto res = loo(3, [1,2,3]);
auto jobs = map!a()(res).array; // evaluate eagerly
}


I reduced 'map' version, and found that just returning () = () = inner()
and calling it segfaults. IIUC this seems a compiler bug.


auto loo(int a)
{
auto inner()
{
return a; // debugger caught SEGV at this line
}

return () = () = inner();
}

void main()
{
assert(loo(3)()() == 3);
}

--


Re: simple assignment statement compiles but becomes a run time error

2015-01-18 Thread jpkl via Digitalmars-d-learn

On Monday, 19 January 2015 at 02:04:23 UTC, Mike Parker wrote:

On 1/19/2015 10:44 AM, WhatMeWorry wrote:

On Sunday, 18 January 2015 at 20:07:25 UTC, weaselcat wrote:

On Sunday, 18 January 2015 at 19:51:02 UTC, WhatMeWorry wrote:
On Sunday, 18 January 2015 at 19:42:33 UTC, WhatMeWorry 
wrote:


I've got a OpenGL function returning a pointer

// const GLubyte *version = glGetString(GL_VERSION);  // 
C++ and

openLG code

// the following compiles with no errors or warnings

char openglVersion[100] = 
fromStringz(glGetString(GL_VERSION));

// ABENDS HERE!


// documentation from std.string shows
// pure @system inout(char)[] fromStringz(inout(char)* 
cString);


// Seems pretty innocuous to me.


Debugger returns:
Unhandled exception at 0x76AC2F71 (KernelBase.dll) in
WhatVersionOfOpenGL.exe


Hi,

try replacing the fromStringz with to!string from std.conv


No cigar.

char openglVersion[100] = fromStringz(glGetString(GL_VERSION));
causes the same exception.

Thanks for suggestion.  Could (Can?) OpenGL be marking the 
string as

read only?  So we can print out value put not copy it?




You're trying to shove a dynamic array into a static array. 
That isn't going to fly. Your openglVersion variable needs to 
be dynamic. Declare it as string or auto:


auto openglVersion = fromStringz( glGetString( GL_Version ));

Note that fromStringz returns a slice of the C string, which 
means that if the C string doesn't survive after the return 
call, or if you plan to keep your D string around outside of 
the call site, you can get a crash. The OpenGL specification 
requires strings returned by glGetString to be static, i.e. the 
pointer will always be valid, so you can do whatever you want. 
Generally, though, to!string is what you want. It allocates 
memory for the string and copies it.


the array type helpers _.idup_ and _.dup_ can also be used to 
have a safe copy:


``
auto openglVersion = glGetString(GL_Version).fromStringz.idup;
``


Re: [DRAFT] This Week in D - Jan 18

2015-01-18 Thread jms via Digitalmars-d

Under statistics, both links say bugs fixed

On Monday, 19 January 2015 at 01:42:58 UTC, Adam D. Ruppe wrote:
Anyone like to do a quick proofread of the next edition of This 
Week in D?


http://arsdnet.net/this-week-in-d/jan-18.html

Do NOT post this publically yet - it is just a draft, I want to 
do the broad public release/announcement either later tonight 
or first thing tomorrow morning.


Refresh it btw to get new CSS, I made a minor change on the 
link color, see if you like the plain better.



Also btw this is static content served with pre-gzip. We should 
use that technique on the D site too!


Re: Bug on Posix IPC_STAT. Wrong number of attachments

2015-01-18 Thread tcak via Digitalmars-d-learn

On Monday, 19 January 2015 at 04:18:47 UTC, tcak wrote:

On Sunday, 18 January 2015 at 22:25:39 UTC, anonymous wrote:

On Sunday, 18 January 2015 at 18:07:05 UTC, tcak wrote:
After these, it works perfectly. I hope this can be fixed in 
next version.


Please file a bug at https://issues.dlang.org/. And since 
you seem to know how to fix it, maybe you can make a pull 
request via GitHub, too?


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

I am not familiar with Github's pull system etc. So, I will 
prepare the fixed code and attach it on issue.


Fixed shm.d file is put on issue page. If someone could put a 
pull request on Github with it.


shmid_ds is on version(linux) part is fixed up on it, and works 
properly. But tested on 64-bit system only.


Re: The ugly truth about ddoc

2015-01-18 Thread Ali Çehreli via Digitalmars-d

On 01/18/2015 06:18 PM, Andrei Alexandrescu wrote:

A general plea about ddoc: Please don't change its behavior; a whole 
book depends on how it behaves. :)


There were silent changes in the past, which made me find workarounds 
and change the way I use ddoc.


Ali



Re: druntime build failing because of masm386 problems

2015-01-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, January 18, 2015 23:21:43 jollie via Digitalmars-d-learn wrote:
 Jonathan M Davis via Digitalmars-d-learn digita
 lmars-d-le...@puremagic.com Wrote in message:
  It's been a while since I did anything in Windows with D, and unfortunately,
  I need to again, and now I can't get druntime to build. I'm getting this
  lovely error:
 
  dmc -c  src\rt\minit.asm
  masm386 -DM_I386=1 -D_WIN32 -Mx src\rt\minit.asm;
 
  Can't run 'masm386', check PATH
  Error: 'dmc' not found
 
 
  I know that I've seen this before, but I can't remember how to fix the
  problem. dmc is definitely on my PATH (I successfully built dmd prior to
  trying to build druntime), so the error seems to be wrong, for whatever good
  that does me. I don't see a masm386 with dmc, so I don't know where that
  comes from. Maybe that's part of the problem.
 
  Has anyone seen this problem and figured out how to get around it or fix it?
 
  - Jonathan M Davis
 
 

 It's been some months since I had this problem pop up, but I just
  ran touch on the minit.obj file so make thought it was up to date
  and used it.

That did the trick. Thanks. It looks like that has to be done after every
time I run clean. That definitely sucks.

- Jonathan M Davis



Bug with nested static class referencing?

2015-01-18 Thread d coder via Digitalmars-d
Greetings

I hit what looks like a probable DMD bug. When I reduced with help from
dustmite I get something like this. Can someone tell me if this is a bug or
am I doing something illegal?

class A {
  B.BB b;
}

class B: A {
  static class BB {}
}

When I compile I get:

test.d(2): Error: no property 'BB' for type 'test.B'
test.d(2): Error: B.BB is used as a type

Regards
- Puneet


Re: Please help me with improving dlang.org

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 4:57 PM, Mike wrote:

On Sunday, 18 January 2015 at 02:18:16 UTC, Andrei Alexandrescu wrote:

I took the better part of today working on this:
https://github.com/D-Programming-Language/dlang.org/pull/780. See demo
at http://erdani.com/d/.

What do you all think? Is it an improvement over what we have now?

I'd appreciate your help with reviewing and pulling this, and also
with improving the colors (which I'm terrible at) and page tracking as
mentioned in the pull request.



What are your primary concerns with the website?  I think it would help
to know what you are trying to achieve.


Good point.

1. The site design/styling is old. Simply changing it is now necessary 
just as a refresher.


2. Of course, we'd also like things to be better. The chaotic navigation 
menu on the left was something I long wished to replace with a more 
modern on.


3. Part of my effort is to replace all manual html ad-hoc styles with 
styles in the css. That is invisible right now but will become very 
useful when we pass the site for improvement to a specialist.



Personally, although dlang.org isn't particularly pretty, I think its
fine.  It's the unmaintained and unfinished content that's the real
problem, not the aesthetics.  I've made a number of PRs to move
unofficial content to the wiki so it could be better maintained there,
and if not maintained, at least appear less official.


Thanks!


I believe
dlang.org's lack of maintenance is partially due to the issues mentioned
below. I've tried to do some improvements on dlang.org, and its a PITA. If it
were made more convenient, there would be greater participation from me,
and likely others.  So, I offer the following suggestion:

1) Modify the build scripts and the instructions on dlang.org so that
it's abundantly clear how to fork, modify, build, verify, submit PRs
without having read verbose instructions and without having to clone and
build dmd, druntime, phobos, and other repositories just to get an html
page to verify an edit.  I would do this myself, but an important
prerequisite to updating build scripts and documentation is knowledge,
which I have yet to possess.  But someone in this community knows.


We definitely need to get that working. There are a couple of blocking 
issues (like the interference of local configuration files on the site 
build) but I trust we'll get over them soon.



2) Aside from the documentation generated from the source code, why does
the website need to be built?  IMO a static website like dlang.org
shouldn't need any additional tools other than a browser and an image
editor.  I may explore some options later, but only after 1) is done.


The short answer is because there's no robust inclusion and code reuse 
solution at HTML level.



Andrei



Re: simple assignment statement compiles but becomes a run time error

2015-01-18 Thread Mike Parker via Digitalmars-d-learn

On 1/19/2015 10:44 AM, WhatMeWorry wrote:

On Sunday, 18 January 2015 at 20:07:25 UTC, weaselcat wrote:

On Sunday, 18 January 2015 at 19:51:02 UTC, WhatMeWorry wrote:

On Sunday, 18 January 2015 at 19:42:33 UTC, WhatMeWorry wrote:


I've got a OpenGL function returning a pointer

// const GLubyte *version = glGetString(GL_VERSION);  // C++ and
openLG code

// the following compiles with no errors or warnings

char openglVersion[100] = fromStringz(glGetString(GL_VERSION));
// ABENDS HERE!


// documentation from std.string shows
// pure @system inout(char)[] fromStringz(inout(char)* cString);

// Seems pretty innocuous to me.


Debugger returns:
Unhandled exception at 0x76AC2F71 (KernelBase.dll) in
WhatVersionOfOpenGL.exe


Hi,

try replacing the fromStringz with to!string from std.conv


No cigar.

char openglVersion[100] = fromStringz(glGetString(GL_VERSION));
causes the same exception.

Thanks for suggestion.  Could (Can?) OpenGL be marking the string as
read only?  So we can print out value put not copy it?




You're trying to shove a dynamic array into a static array. That isn't 
going to fly. Your openglVersion variable needs to be dynamic. Declare 
it as string or auto:


auto openglVersion = fromStringz( glGetString( GL_Version ));

Note that fromStringz returns a slice of the C string, which means that 
if the C string doesn't survive after the return call, or if you plan to 
keep your D string around outside of the call site, you can get a crash. 
The OpenGL specification requires strings returned by glGetString to be 
static, i.e. the pointer will always be valid, so you can do whatever 
you want. Generally, though, to!string is what you want. It allocates 
memory for the string and copies it.


Re: Please help me with improving dlang.org

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 11:43 AM, Jacob Carlborg wrote:

On 2015-01-18 17:21, Andrei Alexandrescu wrote:


Suggestions on how to make it better? -- Andrei


Something flat (i.e. no gradient) or with less difference between the
colors in the gradient.


OK, the current attempt has no gradient at all. Probably too flat? -- Andrei



Re: post qualifier and template constraint limitation, is there a reason ?

2015-01-18 Thread Walter Bright via Digitalmars-d

On 1/18/2015 12:46 AM, Brian Schott wrote:

On Sunday, 18 January 2015 at 08:40:19 UTC, Walter Bright wrote:

Sounds like a good idea. If I wasn't clear, I think that class change was a
mistake.


Now that I see from that pull request that the ugly syntax was the original, I'm
not so sure. The dfix feature I'm planning is to convert

class A if (B) : C

to

class A : C if (B)


The other way around. Consider:

  class A(T) : C!(args), D!(more args), E!(lots of stuff) if (B)

the 'if' becomes significantly separated from A.


Re: Please help me with improving dlang.org

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 11:15 AM, Adam D. Ruppe wrote:

On Sunday, 18 January 2015 at 17:56:41 UTC, aldanor wrote:

And yet another thing you gain with (most) frameworks is having access
to the original SASS/LESS.


I think that's a con, actually. My biggest problem with contributing to
the dlang website is that I have to do it blind - it won't make on my
computer.


This has been a continuous source of annoyance for me. Seems like 
whenever I turn my back the site build gets broken.


Right now I have it working smoothly, but I know of a few potential 
issues. Could you please reply here with your problem(s) and I'll get a 
robust solution in place?



Thanks,

Andrei


Re: The ugly truth about ddoc

2015-01-18 Thread MattCoder via Digitalmars-d
On Monday, 19 January 2015 at 02:18:32 UTC, Andrei Alexandrescu 
wrote:
TL;DR: I've uploaded new menu colors at http://erdani.com/d/, 
this time aiming for a more martian red ethos. Please let me 
know.


Well I'd prefer less red-ish: http://i.imgur.com/AIvcoWl.png

But you know this is a personal thing, and if you looking for 
martian aspect so you're ok. Anyway this menu is better than your 
previous one. :)


Matheus.


Re: Please help me with improving dlang.org

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 6:37 PM, MattCoder wrote:

On Monday, 19 January 2015 at 02:19:30 UTC, Andrei Alexandrescu wrote:

On 1/18/15 6:09 PM, MattCoder wrote:

On Monday, 19 January 2015 at 01:41:04 UTC, Andrei Alexandrescu wrote:

Content discussion to follow soon. -- Andrei


As I asked in another Topic without any answer, I wasn't able to find
(or at least is not easily visible) anything related to CONTRIBUTE
even on sitemap.

I think there should be a button for this on the main site.


Great idea. Could you please put that in bugzilla, it's important and
shouldn't be forgotten. -- Andrei


My first time using bugzilla:
https://issues.dlang.org/show_bug.cgi?id=14006

Please could anyone tell if I did right?


Yes. Next step: fix it! :o) -- Andrei



Re: The ugly truth about ddoc

2015-01-18 Thread Ary Borenszweig via Digitalmars-d

On 1/18/15 11:18 PM, Andrei Alexandrescu wrote:

TL;DR: I've uploaded new menu colors at http://erdani.com/d/, this time
aiming for a more martian red ethos. Please let me know.

==

So I was looking at the css today (original at
http://paste.ofcode.org/fHGT24YASrWu3rnMYLdm4C taken from the zip at
http://cssmenumaker.com/menu/modern-jquery-accordion-menu) and it was
quite unwieldy to experiment with. For example, the same color appears
hardcoded in a number of places; whenever changing one I'd need to
change all, or miss some important instances (as it happened with my
first experiment).

I'm sure experts must have tools for allowing things like variables and
macros for css creation.


Sass (http://sass-lang.com/) and Less (http://lesscss.org/) comes to my 
mind. Any decent web framework comes with support for them.


I think you will eventually find that ddoc is turing-complete and will 
implement one of the above transpilers in it.


And css minification isn't just about gzip. It's also about removing 
whitespace and compacting stuff. Can you code a ddoc macro for that?


Re: Idea: featuring forum content on dlang.org?

2015-01-18 Thread Israel via Digitalmars-d
On Monday, 19 January 2015 at 02:34:32 UTC, Andrei Alexandrescu 
wrote:
With all this discussion on more dynamic content on dlang.org, 
I sat down (figuratively; I've been on a hike today) and 
thought - what is dynamic about D?


So it hit me like a hammer:

* Forum discussions (this!)

* github traffic

* bugzilla traffic

* more recently, Adam's weekly newsletter.

We already have twitter which is nice. Adding some of the above 
to the homepage would be awesome. What do you all think?



Andrei


Absolutely. Don't let anything note worthy go unmissed. Let D 
developers know that D is constantly changing things around the 
world and not just the forums.


Add content from other websites, articles, etc.

Just let people know that D isn't dead. And that the front of the 
page proves it.


[Issue 14005] core.exception.InvalidMemoryOperationError@(0) during byLine

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14005

ag0ae...@gmail.com changed:

   What|Removed |Added

 CC||ag0ae...@gmail.com

--- Comment #1 from ag0ae...@gmail.com ---
Reduced:


import core.memory: GC;
void main()
{
/* First line. Exact length doesn't matter. */
auto firstLineLength = 260;
auto buf = new char[firstLineLength];

/* Second line. Must not be about as long as the block allocated for the
first line. */
auto firstBlockSize = GC.sizeOf(buf.ptr);
buf = buf.ptr[0 .. firstBlockSize];
auto secondLineLength = firstBlockSize; /* no good */
version(none) auto secondLineLength = firstBlockSize - 1; /* no good */
version(none) auto secondLineLength = firstBlockSize - 2; /* ok */
buf = buf.ptr[0 .. secondLineLength];

/* popFront the second line. */
assumeSafeAppend(buf); /* core.exception.InvalidMemoryOperationError@(0) */
}


I guess the size returned by GC.sizeOf includes some internal data. Then
std.stdio.readlnImpl is wrong to assume that it can use all of it.

--


Re: Can D get on XBone and PS4?

2015-01-18 Thread Rikki Cattermole via Digitalmars-d

On 19/01/2015 5:13 p.m., Manu via Digitalmars-d wrote:

On 19 January 2015 at 09:50, Rikki Cattermole via Digitalmars-d
digitalmars-d@puremagic.com wrote:

On 19/01/2015 12:47 p.m., Manu via Digitalmars-d wrote:


On 19 January 2015 at 09:42, Rikki Cattermole via Digitalmars-d

digitalmars-d@puremagic.com wrote:


On 19/01/2015 12:39 p.m., Manu via Digitalmars-d wrote:



On 18 January 2015 at 19:56, Joakim via Digitalmars-d
digitalmars-d@puremagic.com wrote:



On Sunday, 18 January 2015 at 08:06:06 UTC, Manu via Digitalmars-d
wrote:




At Remedy, we ran D code on xbone with no opposition from MS.
For xbone, we wanted to maintain compatibility with the rest of our
MSVC code, which meant we needed to produce COFF output that the MSVC
linker accepts. Walter implemented DMD-Win64 with these requirements
in mind.
PS4 should be easier using LDC, but I don't know if Sony would take
issue with this. I expect them to take less issue than MS, so I'd give
good odd's that they'd be fine with it.

Short answer, D works on modern consoles just fine, and there were no
political blocks for us. GC is a demonstrated problem; avoid it. DMD's
codegen is also a problem; it uses x87 to perform operations, despite
the fact the x64 ABI uses SSE regs for float passing. That results in
a lot of register switching, and poor float performance as a result.
As an (awkward) workaround, you can use explicit SSE intrinsics to
keep working in XMM, but I haven't tested the optimiser's quality in
that case, and the std library obviously doesn't do that.





Thanks for the detailed answer.  Sounds like the only thing holding D
back
is someone putting in the effort to integrate it with the console
runtime
and APIs.  It's not going to be me, as I haven't owned a console or
even
played a console game in a decade.  Yes, I know I'm an old fogey. :)




I don't think there's any particularly compelling reason to make
runtime calls from D. You can link C/C++ and D code together just
fine. If you're a gamedev, there's a very high chance that you already
have an engine (presumably C/C++) in place. You'll need to bind the
engine api, not the OS api.
Trouble with the console OS api's are that they're protected by NDA;
it would probably be pretty dubious to release any such foreign
language binding here, so each studio would have to do that work
themselves... unless it were posted on the official dev forums or
something.




$ dub add-local .
Could be rather useful here!



I don't know what that means?



You don't need to register packages of the dub repository for dub to be able
to use a package. In this case its registered locally instead.
In terms of NDA's, can definitely be used to make e.g. wrappers of bindings
private and then use them to publically distribute the usage of them.


...I don't follow.


Because of an NDA's, we may not be able to release bindings to the 
native API's but we can release wrapper interfaces. So long as they are 
not one for one. Atleast theoretically.
Assuming the bindings/wrapper implementation is distributed via official 
means e.g. a forum which is non public and approved of.
Dub could be used, as the build manager for any projects using the 
bindings. As long as when the bindings/wrappers are released, they are 
built as dub packages.
Once downloaded they merely need to be added as a local package into 
dub. Ensuring NDA and the ability to public publically engines and such.


Re: while(...){ ... }else ...

2015-01-18 Thread deadalnix via Digitalmars-d

On Sunday, 18 January 2015 at 18:16:47 UTC, Marc Schütz wrote:

Unfortunately, this would break existing code:

if(some_condition)
while(some_other_condition) {
// ...
}
else
// ...

Currently, the `else` branch belongs to the `if`; with your 
proposal, it would belong to the `while`.


An `else` always attaches to the closest construct where it can 
be accepted; AFAICS, this cannot be changed without making the 
language grammar context-sensitive (it would require parsing 
`while` inside an `if` differently from other `while`s).


Compiler have simplification of CFG passes that makes this 
feature irrelevant in practice.


Re: Please help me with improving dlang.org

2015-01-18 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 19 January 2015 at 04:18:02 UTC, Andrei Alexandrescu 
wrote:

Wati, what resizing stuff? -- Andrei


Resize the browser and the sidebars disappear when there's no 
longer enough room to reasonably fit them. It is important for 
readability on mobile so a really good thing to have (for the 
people who use the mobile browsers).


Re: typescript plugin for vibe.d diet templates

2015-01-18 Thread Ali Çehreli via Digitalmars-d-announce

On 01/17/2015 10:24 AM, Fatih Kadir Akin wrote:

 I met the language yesterday, I wrote the package yesterday :)

I'm in awe! :)

Ali



Re: Please help me with improving dlang.org

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 3:36 PM, Zach the Mystic wrote:

I like the buttons with the dark red gradients on the left. Although the
button titles don't seem professional to me, the buttons do.

I'm personally interested in seeing the story of D told better. I have
more of a conscious opinion of the words of the front page than I do of
the look-and-feel. Are the words up for discussion here, or just the
look-and-feel for now?


Content discussion to follow soon. -- Andrei



Re: The ugly truth about ddoc

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 6:46 PM, Mike wrote:

On Monday, 19 January 2015 at 02:36:35 UTC, Andrei Alexandrescu wrote:


My only real complaint about the ddoc site is that the build process
is pure evil.


I can second that. I haven't tried in the past week, but I've been
unable to build the site, stopping the doc pulls I wanted to make in
their tracks.


Destroy!!! What's not working? -- Andrei


For starters, simple, accurate instructions in dlang.org's Readme.md file.

Mike


There's a bug report for that. 
https://issues.dlang.org/show_bug.cgi?id=14006


Andrei


Re: The ugly truth about ddoc

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 6:43 PM, MattCoder wrote:

On Monday, 19 January 2015 at 02:18:32 UTC, Andrei Alexandrescu wrote:

TL;DR: I've uploaded new menu colors at http://erdani.com/d/, this
time aiming for a more martian red ethos. Please let me know.


Well I'd prefer less red-ish: http://i.imgur.com/AIvcoWl.png

But you know this is a personal thing, and if you looking for martian
aspect so you're ok. Anyway this menu is better than your previous one. :)


No personal aspect to this. What hex colors did you use? -- Andrei



Re: Idea: featuring forum content on dlang.org?

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 6:47 PM, MattCoder wrote:

On Monday, 19 January 2015 at 02:34:32 UTC, Andrei Alexandrescu wrote:

With all this discussion on more dynamic content on dlang.org, I sat
down (figuratively; I've been on a hike today) and thought - what is
dynamic about D?


Are you becoming a web-developer? :)


We already have twitter which is nice. Adding some of the above to the
homepage would be awesome. What do you all think?


Yes, it could be nice, but you do you have in mind? Put for example the
last 10 posts of the forum on the main page?


Something like that. Or maybe the last 10 topics because it's easy the 
last 10 posts are on the same (inane) topic. Brainstorming mode!! -- Andrei





Re: Please help me with improving dlang.org

2015-01-18 Thread Mike via Digitalmars-d

On Monday, 19 January 2015 at 02:10:06 UTC, Mike wrote:
On Monday, 19 January 2015 at 02:00:52 UTC, Andrei Alexandrescu 
wrote:


2) Aside from the documentation generated from the source 
code, why does
the website need to be built?  IMO a static website like 
dlang.org
shouldn't need any additional tools other than a browser and 
an image
editor.  I may explore some options later, but only after 1) 
is done.


The short answer is because there's no robust inclusion and 
code reuse solution at HTML level.


Would it be a horrible idea to render DDoc in javascript?



Answer, yes!  vibe.d is where it's at.

Mike



Re: Bug on Posix IPC_STAT. Wrong number of attachments

2015-01-18 Thread tcak via Digitalmars-d-learn

On Sunday, 18 January 2015 at 22:25:39 UTC, anonymous wrote:

On Sunday, 18 January 2015 at 18:07:05 UTC, tcak wrote:
After these, it works perfectly. I hope this can be fixed in 
next version.


Please file a bug at https://issues.dlang.org/. And since you 
seem to know how to fix it, maybe you can make a pull request 
via GitHub, too?


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

I am not familiar with Github's pull system etc. So, I will 
prepare the fixed code and attach it on issue.


Re: Please help me with improving dlang.org

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 7:18 PM, Adam D. Ruppe wrote:

On Monday, 19 January 2015 at 03:06:35 UTC, Andrei Alexandrescu wrote:

On 1/18/15 6:50 PM, DaveG wrote:

https://dl.dropboxusercontent.com/u/114394/D-site/redesign/index.html

All - what do you think of dropping the background image and use the
DaveG's telluric background for menu?


I like it, and also the resizing stuff covers what I did so if his
changes go through, I can close my PR too. That's a win.


Wati, what resizing stuff? -- Andrei


Re:druntime build failing because of masm386 problems

2015-01-18 Thread jollie via Digitalmars-d-learn
Jonathan M Davis via Digitalmars-d-learn digita
lmars-d-le...@puremagic.com Wrote in message:
 It's been a while since I did anything in Windows with D, and unfortunately,
 I need to again, and now I can't get druntime to build. I'm getting this
 lovely error:
 
 dmc -c  src\rt\minit.asm
 masm386 -DM_I386=1 -D_WIN32 -Mx src\rt\minit.asm;
 
 Can't run 'masm386', check PATH
 Error: 'dmc' not found
 
 
 I know that I've seen this before, but I can't remember how to fix the
 problem. dmc is definitely on my PATH (I successfully built dmd prior to
 trying to build druntime), so the error seems to be wrong, for whatever good
 that does me. I don't see a masm386 with dmc, so I don't know where that
 comes from. Maybe that's part of the problem.
 
 Has anyone seen this problem and figured out how to get around it or fix it?
 
 - Jonathan M Davis
 
 

It's been some months since I had this problem pop up, but I just
 ran touch on the minit.obj file so make thought it was up to date
 and used it.
-- 


Re: Please help me with improving dlang.org

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 6:09 PM, MattCoder wrote:

On Monday, 19 January 2015 at 01:41:04 UTC, Andrei Alexandrescu wrote:

Content discussion to follow soon. -- Andrei


As I asked in another Topic without any answer, I wasn't able to find
(or at least is not easily visible) anything related to CONTRIBUTE
even on sitemap.

I think there should be a button for this on the main site.


Great idea. Could you please put that in bugzilla, it's important and 
shouldn't be forgotten. -- Andrei





The ugly truth about ddoc

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d
TL;DR: I've uploaded new menu colors at http://erdani.com/d/, this time 
aiming for a more martian red ethos. Please let me know.


==

So I was looking at the css today (original at 
http://paste.ofcode.org/fHGT24YASrWu3rnMYLdm4C taken from the zip at 
http://cssmenumaker.com/menu/modern-jquery-accordion-menu) and it was 
quite unwieldy to experiment with. For example, the same color appears 
hardcoded in a number of places; whenever changing one I'd need to 
change all, or miss some important instances (as it happened with my 
first experiment).


I'm sure experts must have tools for allowing things like variables and 
macros for css creation. Indeed there are a number of CSS editors that 
features things like variables, substitutions, and code generations, but 
most come at a cost and require quite some involvement.


So I slapped something much simpler together using... ddoc.

1. I aded this at the top of the original file:

Ddoc

and then this at the bottom:

Macros:

DDOC=$(BODY)
DDOC_COMMENT=/*$0*/
ESCAPES=/// /// ///

then saved the file as cssmenu.css.dd. Now I suddenly had a file 
compilable with ddoc, which produced itself (sans the heading and the 
macros). Here's the cmdline:


dmd -c -o- -Dfweb/css/cssmenu.css css/cssmenu.css.dd

It's a bit of a bummer that I need to define three unintuitive macros to 
get idempotent generation, but I guess that's that. We should document 
that somewhere.


2. Now the fun begins. Now with macros I could define things like 
variables and even functions, and change all by changing one. Cool! So I 
started looking for all colors in the document and converted them to macros.


After a short time I had http://paste.ofcode.org/3agBQ3t6C3UJsqMfRe4GeQL 
working. With that in hand, it was trivially easy to test different 
colors and see how they impact the look.


The result is as I mentioned at http://erdani.com/d. I trust you'll hate 
the colors but maybe not the hack.


So, may I add a pull request of this without anyone having an apoplexy 
attack? When we pass the site for styling we can pass the generated css.



Andrei


Re: Please help me with improving dlang.org

2015-01-18 Thread DaveG via Digitalmars-d
On Monday, 19 January 2015 at 02:21:41 UTC, Andrei Alexandrescu 
wrote:

On 1/18/15 11:15 AM, Adam D. Ruppe wrote:

On Sunday, 18 January 2015 at 17:56:41 UTC, aldanor wrote:
And yet another thing you gain with (most) frameworks is 
having access

to the original SASS/LESS.


I think that's a con, actually. My biggest problem with 
contributing to
the dlang website is that I have to do it blind - it won't 
make on my

computer.
I agree about SASS and other tools. There are so many now you 
have to learn all of them (or none, in my case). Many years ago I 
wrote primitive script to do what SASS eventually did for CSS. 
The added features were nice, but barley justified the added 
complexity and build process. As soon as I joined a team I 
abandoned it completely. They can be useful particularly for 
larger/long-term projects, but it's a steep upfront cost and is 
particularly frustrating for people who just need to make minor 
changes.




This has been a continuous source of annoyance for me. Seems 
like whenever I turn my back the site build gets broken.


I was worried about that, but I actually had no problem. I'm on 
Windows. I cloned your better-menus, had dub build dpl-docs.exe, 
and ran the win32 makefile.


Here's where I'm at. The menus don't use javascript (except when 
the screen gets so small it needs a button to open the 
navigation, the button uses js). It scales with screen size and 
should work on mobile (untested) - I changed doctype to html5 and 
added metatags for mobile.


https://dl.dropboxusercontent.com/u/114394/D-site/redesign/index.html


Re: [DRAFT] This Week in D - Jan 18

2015-01-18 Thread Zach the Mystic via Digitalmars-d

On Monday, 19 January 2015 at 01:42:58 UTC, Adam D. Ruppe wrote:
Anyone like to do a quick proofread of the next edition of This 
Week in D?


float divideBy(float divisor, float dividend) {
return dividend / dividend; -- not a very interesting 
mathematical operation here!


Re: The ugly truth about ddoc

2015-01-18 Thread tcak via Digitalmars-d
On Monday, 19 January 2015 at 02:18:32 UTC, Andrei Alexandrescu 
wrote:
TL;DR: I've uploaded new menu colors at http://erdani.com/d/, 
this time aiming for a more martian red ethos. Please let me 
know.


==

So I was looking at the css today (original at 
http://paste.ofcode.org/fHGT24YASrWu3rnMYLdm4C taken from the 
zip at 
http://cssmenumaker.com/menu/modern-jquery-accordion-menu) and 
it was quite unwieldy to experiment with. For example, the same 
color appears hardcoded in a number of places; whenever 
changing one I'd need to change all, or miss some important 
instances (as it happened with my first experiment).


I'm sure experts must have tools for allowing things like 
variables and macros for css creation. Indeed there are a 
number of CSS editors that features things like variables, 
substitutions, and code generations, but most come at a cost 
and require quite some involvement.


So I slapped something much simpler together using... ddoc.

1. I aded this at the top of the original file:

Ddoc

and then this at the bottom:

Macros:

DDOC=$(BODY)
DDOC_COMMENT=/*$0*/
ESCAPES=/// /// ///

then saved the file as cssmenu.css.dd. Now I suddenly had a 
file compilable with ddoc, which produced itself (sans the 
heading and the macros). Here's the cmdline:


dmd -c -o- -Dfweb/css/cssmenu.css css/cssmenu.css.dd

It's a bit of a bummer that I need to define three unintuitive 
macros to get idempotent generation, but I guess that's that. 
We should document that somewhere.


2. Now the fun begins. Now with macros I could define things 
like variables and even functions, and change all by changing 
one. Cool! So I started looking for all colors in the document 
and converted them to macros.


After a short time I had 
http://paste.ofcode.org/3agBQ3t6C3UJsqMfRe4GeQL working. With 
that in hand, it was trivially easy to test different colors 
and see how they impact the look.


The result is as I mentioned at http://erdani.com/d. I trust 
you'll hate the colors but maybe not the hack.


So, may I add a pull request of this without anyone having an 
apoplexy attack? When we pass the site for styling we can pass 
the generated css.



Andrei



Red colour is hard to work with generally. It takes too much 
attention. It goes well with white and grey colours. Though, here 
is some colours for you to try:


https://color.adobe.com/create/color-wheel/?base=2rule=Customselected=4name=My%20Color%20Thememode=rgbrgbvalues=0.7,0.22200669464295397,0.1097099201844362,0.6268360119554587,1,0.5314703422197685,0.125290070947203,1,0.4581047763190884,0.13626074345941347,0.4015373174033305,0.8,0.3049403467128378,0.4400712229615978,0.7swatchOrder=0,1,2,3,4


I know it is hard to accept change though, for more professional 
look, many changes would require on the site.


This is an example for Phobos documentation:
http://php.net/manual/en/function.shm-attach.php


We could use Open Sans font as well maybe from Google Fonts.


I mostly write CSS, JS, HTML by hand instead of using frameworks. 
So, I am sorry if the tools in the hand are not giving enough 
flexibility.


Re: The ugly truth about ddoc

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 7:12 PM, Ary Borenszweig wrote:

On 1/18/15 11:18 PM, Andrei Alexandrescu wrote:

TL;DR: I've uploaded new menu colors at http://erdani.com/d/, this time
aiming for a more martian red ethos. Please let me know.

==

So I was looking at the css today (original at
http://paste.ofcode.org/fHGT24YASrWu3rnMYLdm4C taken from the zip at
http://cssmenumaker.com/menu/modern-jquery-accordion-menu) and it was
quite unwieldy to experiment with. For example, the same color appears
hardcoded in a number of places; whenever changing one I'd need to
change all, or miss some important instances (as it happened with my
first experiment).

I'm sure experts must have tools for allowing things like variables and
macros for css creation.


Sass (http://sass-lang.com/) and Less (http://lesscss.org/) comes to my
mind. Any decent web framework comes with support for them.


Yah. The ones I found were paid. My point is ddoc was there and fit the 
job perfectly well.



I think you will eventually find that ddoc is turing-complete and will
implement one of the above transpilers in it.


It's not, but irony gotten :o).


And css minification isn't just about gzip. It's also about removing
whitespace and compacting stuff. Can you code a ddoc macro for that?


This is a confusion - css minification is a separate topic altogether; I 
got to it as a drive-by optimization and many people here thought I need 
to spend the next quarter on traffic improvements.


To answer: it is not possible to do that with ddoc macros.


Andrei



Re: Please help me with improving dlang.org

2015-01-18 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 19 January 2015 at 03:06:35 UTC, Andrei Alexandrescu 
wrote:

On 1/18/15 6:50 PM, DaveG wrote:

https://dl.dropboxusercontent.com/u/114394/D-site/redesign/index.html
All - what do you think of dropping the background image and 
use the DaveG's telluric background for menu?


I like it, and also the resizing stuff covers what I did so if 
his changes go through, I can close my PR too. That's a win.


Re: The ugly truth about ddoc

2015-01-18 Thread MattCoder via Digitalmars-d
On Monday, 19 January 2015 at 03:01:44 UTC, Andrei Alexandrescu 
wrote:

No personal aspect to this. What hex colors did you use? --


background-color: #6E6E6E;

And I cleaned:

#cssmenu  ul  li  a {
font-size: 14px;
display: block;
background: 
url(http://erdani.com/d/images/xpattern.png.pagespeed.ic.QEXJsY5pYW.png;) 
repeat scroll left top transparent;

border-right: 1px solid #893A28;
border-width: medium 1px 1px;
border-style: none solid solid;
border-color: -moz-use-text-color #893A28 #893A28;
-moz-border-top-colors: none;
-moz-border-right-colors: none;
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
border-image: none;
color: #FFF;
text-shadow: 0px -1px 1px #751D0C;
}

to

#cssmenu  ul  li  a {
font-size: 14px;
display: block;
color: #FFF;
text-shadow: 0px -1px 1px #751D0C;
}

Matheus.


[Issue 14002] Book link is broken

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14002

Mike slavo5...@yahoo.com changed:

   What|Removed |Added

 CC||slavo5...@yahoo.com

--- Comment #1 from Mike slavo5...@yahoo.com ---
(In reply to weaselcat from comment #0)
 The link to Ali's book on the sidebar is broken, it links to
 http://ddili.org/ders/d.en/index.html.html (note the extra .html)
 
 The link itself in the ddoc appears fine so it might be a macro issue, I
 know nothing of ddoc or I'd submit a quick pull request.

Are you referring to dlang.org's sidebar or forum.dlang.org's sidebar.  The
dlang.org Online Book (Free) works for me. 

forum.dlang.org's sidebar is totally different from dlang.org's side bar.  I'm
not sure how to go about fixing that.

--


Re: post qualifier and template constraint limitation, is there a reason ?

2015-01-18 Thread Walter Bright via Digitalmars-d

On 1/18/2015 7:07 PM, deadalnix wrote:

On Monday, 19 January 2015 at 02:24:00 UTC, Walter Bright wrote:

On 1/18/2015 12:46 AM, Brian Schott wrote:

On Sunday, 18 January 2015 at 08:40:19 UTC, Walter Bright wrote:

Sounds like a good idea. If I wasn't clear, I think that class change was a
mistake.


Now that I see from that pull request that the ugly syntax was the original, I'm
not so sure. The dfix feature I'm planning is to convert

class A if (B) : C

to

class A : C if (B)


The other way around. Consider:

  class A(T) : C!(args), D!(more args), E!(lots of stuff) if (B)

the 'if' becomes significantly separated from A.


That's exactly why I thing both should be allowed.


No. Constraints belong after the template declaration, not embedded in the 
template's implementation.


Furthermore, there's no useful purpose to enabling style wars and then requiring 
people to put one way in their coding standard document.


Re: druntime build failing because of masm386 problems

2015-01-18 Thread Rikki Cattermole via Digitalmars-d-learn

On 19/01/2015 4:53 p.m., Jonathan M Davis via Digitalmars-d-learn wrote:

It's been a while since I did anything in Windows with D, and unfortunately,
I need to again, and now I can't get druntime to build. I'm getting this
lovely error:

dmc -c  src\rt\minit.asm
masm386 -DM_I386=1 -D_WIN32 -Mx src\rt\minit.asm;

Can't run 'masm386', check PATH
Error: 'dmc' not found


I know that I've seen this before, but I can't remember how to fix the
problem. dmc is definitely on my PATH (I successfully built dmd prior to
trying to build druntime), so the error seems to be wrong, for whatever good
that does me. I don't see a masm386 with dmc, so I don't know where that
comes from. Maybe that's part of the problem.

Has anyone seen this problem and figured out how to get around it or fix it?

- Jonathan M Davis


I've actually had a go at rebuilding druntime recently for dub.
This is one of the things I HATE the state of.
masm386 based upon what I read from the NG is a compiler written for 
16bit and hence not runnable on 32bit Windows.

You will find however minit.obj in the repo along with minit.asm.
You shouldn't need to recompile minit.asm.



[Issue 14007] shmctl with IPC_STAT returns wrong number of attachments. shmid_ds is defined wrong.

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14007

--- Comment #3 from tcak 10l94s+31wgxrstmw...@sharklasers.com ---
Created attachment 1467
  -- https://issues.dlang.org/attachment.cgi?id=1467action=edit
Make file to build all codes

--


Re: Please help me with improving dlang.org

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 8:57 PM, Adam D. Ruppe wrote:

On Monday, 19 January 2015 at 04:18:02 UTC, Andrei Alexandrescu wrote:

Wati, what resizing stuff? -- Andrei


Resize the browser and the sidebars disappear when there's no longer
enough room to reasonably fit them. It is important for readability on
mobile so a really good thing to have (for the people who use the mobile
browsers).


Where is that implemented? Is there a pull request? -- Andrei


Re: [DRAFT] This Week in D - Jan 18

2015-01-18 Thread Mike via Digitalmars-d

On Monday, 19 January 2015 at 01:42:58 UTC, Adam D. Ruppe wrote:
Anyone like to do a quick proofread of the next edition of This 
Week in D?


http://arsdnet.net/this-week-in-d/jan-18.html

Do NOT post this publically yet - it is just a draft, I want to 
do the broad public release/announcement either later tonight 
or first thing tomorrow morning.


Refresh it btw to get new CSS, I made a minor change on the 
link color, see if you like the plain better.



Also btw this is static content served with pre-gzip. We should 
use that technique on the D site too!


s/demonstrats/demonstrates


Re: [dub] specify dependency configuration

2015-01-18 Thread Rikki Cattermole via Digitalmars-d-learn

On 19/01/2015 1:59 p.m., cal wrote:

Given myapp and a dependency, specified by dub.json's:

myapp: dub.json
{
   ...
   dependencies: {
 dependency_a: =0.6.0
   }
   ...
}

dependency_a: dub.json
{
   ...
   configurations: [
   {
 name: config_a,
 targetType: library,
 ...
   },
   {
 name: config_b,
 targetType: executable,
 ...
   },
   ...
}

How do I specify (in myapp: dub.json) that I want the config_a
configuration of dependency_a?


I just want to verify, you are using configurations only to determine if 
its being built a certain way?

And not lets say as a subpackage?

Ignoring that, there is something called subConfigurations section.

Example from: http://code.dlang.org/package-format
{
...
name: somepackage
configurations: [
{
name: metro-app,
targetType: executable,
platforms: [windows],
versions: [MetroApp],
libs: [d3d11]
},
{
name: desktop-app,
targetType: executable,
platforms: [windows],
versions: [DesktopApp],
libs: [d3d9]
},
{
name: glut-app,
targetType: executable,
versions: [GlutApp]
}
]
}

{
...
dependencies: {
somepackage: =1.0.0
},
subConfigurations: {
somepackage: glut-app
}
}


Re: The ugly truth about ddoc

2015-01-18 Thread Meta via Digitalmars-d

On Monday, 19 January 2015 at 02:25:23 UTC, Adam D. Ruppe wrote:
On Monday, 19 January 2015 at 02:18:32 UTC, Andrei Alexandrescu 
wrote:
I'm sure experts must have tools for allowing things like 
variables and macros for css creation.


My css macro expander 
(http://code.dlang.org/packages/cssexpand) was in part inspired 
by ddoc actually, so this is no surprise to me...


My only real complaint about the ddoc site is that the build 
process is pure evil.


I can second that. I haven't tried in the past week, but I've 
been unable to build the site, stopping the doc pulls I wanted to 
make in their tracks.


Idea: featuring forum content on dlang.org?

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d
With all this discussion on more dynamic content on dlang.org, I sat 
down (figuratively; I've been on a hike today) and thought - what is 
dynamic about D?


So it hit me like a hammer:

* Forum discussions (this!)

* github traffic

* bugzilla traffic

* more recently, Adam's weekly newsletter.

We already have twitter which is nice. Adding some of the above to the 
homepage would be awesome. What do you all think?



Andrei


Re: The ugly truth about ddoc

2015-01-18 Thread Walter Bright via Digitalmars-d

On 1/18/2015 6:18 PM, Andrei Alexandrescu wrote:

TL;DR: I've uploaded new menu colors at http://erdani.com/d/, this time aiming
for a more martian red ethos. Please let me know.


Nobody likes my taste in color, so I'll not pass judgement!



==

So I was looking at the css today (original at
http://paste.ofcode.org/fHGT24YASrWu3rnMYLdm4C taken from the zip at
http://cssmenumaker.com/menu/modern-jquery-accordion-menu) and it was quite
unwieldy to experiment with. For example, the same color appears hardcoded in a
number of places; whenever changing one I'd need to change all, or miss some
important instances (as it happened with my first experiment).

I'm sure experts must have tools for allowing things like variables and macros
for css creation. Indeed there are a number of CSS editors that features things
like variables, substitutions, and code generations, but most come at a cost and
require quite some involvement.

So I slapped something much simpler together using... ddoc.

1. I aded this at the top of the original file:

Ddoc

and then this at the bottom:

Macros:

DDOC=$(BODY)
DDOC_COMMENT=/*$0*/
ESCAPES=/// /// ///

then saved the file as cssmenu.css.dd. Now I suddenly had a file compilable with
ddoc, which produced itself (sans the heading and the macros). Here's the 
cmdline:

dmd -c -o- -Dfweb/css/cssmenu.css css/cssmenu.css.dd

It's a bit of a bummer that I need to define three unintuitive macros to get
idempotent generation, but I guess that's that. We should document that 
somewhere.


Yes, very nice.



2. Now the fun begins. Now with macros I could define things like variables and
even functions, and change all by changing one. Cool! So I started looking for
all colors in the document and converted them to macros.

After a short time I had http://paste.ofcode.org/3agBQ3t6C3UJsqMfRe4GeQL
working. With that in hand, it was trivially easy to test different colors and
see how they impact the look.

The result is as I mentioned at http://erdani.com/d. I trust you'll hate the
colors but maybe not the hack.


Consider me meh on the colors but love the hack!



So, may I add a pull request of this without anyone having an apoplexy attack?
When we pass the site for styling we can pass the generated css.


Damn the torpedos, full speed ahead!



[Issue 14006] New: Contribute button/option on the main site and sitemap

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14006

  Issue ID: 14006
   Summary: Contribute button/option on the main site and
sitemap
   Product: D
   Version: unspecified
  Hardware: x86
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: websites
  Assignee: nob...@puremagic.com
  Reporter: mbnatw...@gmail.com

I wasn't able to find (or at least is not easily visible) anything related to
CONTRIBUTE even on sitemap.

I think there should be a button for this on the main site.

More:
http://forum.dlang.org/thread/m9f558$lbb$1...@digitalmars.com?page=7#post-m9hpji:244sj:242:40digitalmars.com

Matheus.

--


Re: Use proper frameworks for building dlang.org

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 10:49 AM, Jacob Carlborg wrote:

On 2015-01-18 18:23, Andrei Alexandrescu wrote:


Heheh, way to use Archuduke's Ferdinand assassination :o). I'm sorry
Jacob but this one is really out there.

DDoc has nothing with this, and to the extent it does it actually helps.


No it has not, but other strange solutions you're coming up with for CSS
minification and gzip.


So now minification and gzipping are the culprit? I don't quite understand.


I'm not going to touch the code for the web site as long as it's written
in Ddoc. Simple as that.


I understand. Now there are a couple of issues here worth mentioning.

1. Technical arguments are good, but this sounds a bit like an 
ideological position. I'd have difficulty resonating with that.


2. We all know from math that negating the hypothesis doesn't 
necessarily lead to negating the conclusion :o). So if we switch to 
Rails there's no guarantee you will contribute after all; or it's 
possible you will, just not a lot, and then it's me holding the bag.


3. This rigidity doesn't quite bode well. Simply put, if you led a 
project, would you want to pave the way to work with a guy with a 
similar stance?



Andrei


Re: [dub] specify dependency configuration

2015-01-18 Thread cal via Digitalmars-d-learn
On Monday, 19 January 2015 at 02:10:41 UTC, Rikki Cattermole 
wrote:
I just want to verify, you are using configurations only to 
determine if its being built a certain way?

And not lets say as a subpackage?


Some dependency (that I don't control) might define for example 
two configurations, a sourceLibrary type and a library type (my 
own app does not define it's own configurations). I'm just 
wondering if there is a way to tell dub i'm only interested in 
using that dependency as a sourceLibrary for example.


Re: [dub] specify dependency configuration

2015-01-18 Thread cal via Digitalmars-d-learn
On Monday, 19 January 2015 at 02:10:41 UTC, Rikki Cattermole 
wrote:

subConfigurations: {
somepackage: glut-app
}
}


Ahh I guess this is it, thanks for that!




Re: The ugly truth about ddoc

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 6:32 PM, Meta wrote:

On Monday, 19 January 2015 at 02:25:23 UTC, Adam D. Ruppe wrote:

On Monday, 19 January 2015 at 02:18:32 UTC, Andrei Alexandrescu wrote:

I'm sure experts must have tools for allowing things like variables
and macros for css creation.


My css macro expander (http://code.dlang.org/packages/cssexpand) was
in part inspired by ddoc actually, so this is no surprise to me...

My only real complaint about the ddoc site is that the build process
is pure evil.


I can second that. I haven't tried in the past week, but I've been
unable to build the site, stopping the doc pulls I wanted to make in
their tracks.


Destroy!!! What's not working? -- Andrei


Trivial Issue (Must be fixed my committers)

2015-01-18 Thread Mike via Digitalmars-d

Simple spelling error, but can't be fixed by a pull request.
https://issues.dlang.org/show_bug.cgi?id=9118

Mike


Re: The ugly truth about ddoc

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 7:28 PM, Mike wrote:

On Monday, 19 January 2015 at 03:02:37 UTC, Andrei Alexandrescu wrote:


Destroy!!! What's not working? -- Andrei


For starters, simple, accurate instructions in dlang.org's Readme.md
file.

Mike


There's a bug report for that.
https://issues.dlang.org/show_bug.cgi?id=14006


That's a separate issue.  I'm referring to problems like this:
https://issues.dlang.org/show_bug.cgi?id=13436

The instructions are absent in readme.md and wrong or broken in
contributing.md.

So, you might be wondering, why don't I fix it.  Answer, because I don't
know what it should be.  This should be fixed by someone who already
knows the build process, so others who don't know have a something
working to start with, and can eventually inherit the maintenance and
knowledge so they, themselves, can pass it on to others.


Agreed. If there's anything to add, add to 13436. -- Andrei



Re: post qualifier and template constraint limitation, is there a reason ?

2015-01-18 Thread deadalnix via Digitalmars-d

On Monday, 19 January 2015 at 03:57:14 UTC, Walter Bright wrote:
No. Constraints belong after the template declaration, not 
embedded in the template's implementation.


Furthermore, there's no useful purpose to enabling style wars 
and then requiring people to put one way in their coding 
standard document.


IMO style is the role of the formater. Prompting the programmer 
with don't write this, write that instead only crate reaction à 
la If you know what I meant, why don't you compile that you 
asshole ?


Re: simple assignment statement compiles but becomes a run time error

2015-01-18 Thread WhatMeWorry via Digitalmars-d-learn

On Sunday, 18 January 2015 at 20:07:25 UTC, weaselcat wrote:

On Sunday, 18 January 2015 at 19:51:02 UTC, WhatMeWorry wrote:

On Sunday, 18 January 2015 at 19:42:33 UTC, WhatMeWorry wrote:


I've got a OpenGL function returning a pointer

// const GLubyte *version = glGetString(GL_VERSION);  // C++ 
and openLG code


// the following compiles with no errors or warnings

char openglVersion[100] = 
fromStringz(glGetString(GL_VERSION));

// ABENDS HERE!


// documentation from std.string shows
// pure @system inout(char)[] fromStringz(inout(char)* 
cString);


// Seems pretty innocuous to me.


Debugger returns:
Unhandled exception at 0x76AC2F71 (KernelBase.dll) in 
WhatVersionOfOpenGL.exe


Hi,

try replacing the fromStringz with to!string from std.conv


No cigar.

char openglVersion[100] = fromStringz(glGetString(GL_VERSION));
causes the same exception.

Thanks for suggestion.  Could (Can?) OpenGL be marking the string 
as read only?  So we can print out value put not copy it?







[DRAFT] This Week in D - Jan 18

2015-01-18 Thread Adam D. Ruppe via Digitalmars-d
Anyone like to do a quick proofread of the next edition of This 
Week in D?


http://arsdnet.net/this-week-in-d/jan-18.html

Do NOT post this publically yet - it is just a draft, I want to 
do the broad public release/announcement either later tonight or 
first thing tomorrow morning.


Refresh it btw to get new CSS, I made a minor change on the link 
color, see if you like the plain better.



Also btw this is static content served with pre-gzip. We should 
use that technique on the D site too!


Re: [DRAFT] This Week in D - Jan 18

2015-01-18 Thread Andrei Alexandrescu via Digitalmars-d

On 1/18/15 5:42 PM, Adam D. Ruppe wrote:

Anyone like to do a quick proofread of the next edition of This Week in D?

http://arsdnet.net/this-week-in-d/jan-18.html


* Unclear which week you're referring to - past or upcoming? Use this 
week and next week - right now you use this week for both.


* http://www.meetup.com/D-Lang-Sillicon-Valley/events/219413448/ may be 
mentioned


* Styling needs work :o).


Andrei



Re: The ugly truth about ddoc

2015-01-18 Thread Mike via Digitalmars-d
On Monday, 19 January 2015 at 03:02:37 UTC, Andrei Alexandrescu 
wrote:



Destroy!!! What's not working? -- Andrei


For starters, simple, accurate instructions in dlang.org's 
Readme.md file.


Mike


There's a bug report for that. 
https://issues.dlang.org/show_bug.cgi?id=14006


That's a separate issue.  I'm referring to problems like this:
https://issues.dlang.org/show_bug.cgi?id=13436

The instructions are absent in readme.md and wrong or broken in 
contributing.md.


So, you might be wondering, why don't I fix it.  Answer, because 
I don't know what it should be.  This should be fixed by someone 
who already knows the build process, so others who don't know 
have a something working to start with, and can eventually 
inherit the maintenance and knowledge so they, themselves, can 
pass it on to others.


Mike



Re: Idea: featuring forum content on dlang.org?

2015-01-18 Thread bachmeier via Digitalmars-d
On Monday, 19 January 2015 at 02:34:32 UTC, Andrei Alexandrescu 
wrote:
With all this discussion on more dynamic content on dlang.org, 
I sat down (figuratively; I've been on a hike today) and 
thought - what is dynamic about D?


So it hit me like a hammer:

* Forum discussions (this!)

* github traffic

* bugzilla traffic

* more recently, Adam's weekly newsletter.

We already have twitter which is nice. Adding some of the above 
to the homepage would be awesome. What do you all think?



Andrei


Great idea. In my opinion, priority should be given to answering 
the question what are people doing with D? Announcements of the 
latest additions and updates for Dub, plus links to posts like 
house hunting with D, all make a good impression.


Re: Please help me with improving dlang.org

2015-01-18 Thread Rikki Cattermole via Digitalmars-d

On 19/01/2015 4:49 p.m., Walter Bright wrote:

On 1/18/2015 6:07 PM, Rikki Cattermole wrote:

When you have a headache and not in a really good head space it can hurt.


Hope you feel better soon.


I am slowly, thanks.
Really I just need to start working getting Cmsed and friends back into 
good shape for GSOC.


druntime build failing because of masm386 problems

2015-01-18 Thread Jonathan M Davis via Digitalmars-d-learn
It's been a while since I did anything in Windows with D, and unfortunately,
I need to again, and now I can't get druntime to build. I'm getting this
lovely error:

dmc -c  src\rt\minit.asm
masm386 -DM_I386=1 -D_WIN32 -Mx src\rt\minit.asm;

Can't run 'masm386', check PATH
Error: 'dmc' not found


I know that I've seen this before, but I can't remember how to fix the
problem. dmc is definitely on my PATH (I successfully built dmd prior to
trying to build druntime), so the error seems to be wrong, for whatever good
that does me. I don't see a masm386 with dmc, so I don't know where that
comes from. Maybe that's part of the problem.

Has anyone seen this problem and figured out how to get around it or fix it?

- Jonathan M Davis



[Issue 14007] shmctl with IPC_STAT returns wrong number of attachments. shmid_ds is defined wrong.

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14007

--- Comment #2 from tcak 10l94s+31wgxrstmw...@sharklasers.com ---
Created attachment 1466
  -- https://issues.dlang.org/attachment.cgi?id=1466action=edit
Same as C code, but buggy

--


Re: Can D get on XBone and PS4?

2015-01-18 Thread Manu via Digitalmars-d
On 19 January 2015 at 09:50, Rikki Cattermole via Digitalmars-d
digitalmars-d@puremagic.com wrote:
 On 19/01/2015 12:47 p.m., Manu via Digitalmars-d wrote:

 On 19 January 2015 at 09:42, Rikki Cattermole via Digitalmars-d

 digitalmars-d@puremagic.com wrote:

 On 19/01/2015 12:39 p.m., Manu via Digitalmars-d wrote:


 On 18 January 2015 at 19:56, Joakim via Digitalmars-d
 digitalmars-d@puremagic.com wrote:


 On Sunday, 18 January 2015 at 08:06:06 UTC, Manu via Digitalmars-d
 wrote:



 At Remedy, we ran D code on xbone with no opposition from MS.
 For xbone, we wanted to maintain compatibility with the rest of our
 MSVC code, which meant we needed to produce COFF output that the MSVC
 linker accepts. Walter implemented DMD-Win64 with these requirements
 in mind.
 PS4 should be easier using LDC, but I don't know if Sony would take
 issue with this. I expect them to take less issue than MS, so I'd give
 good odd's that they'd be fine with it.

 Short answer, D works on modern consoles just fine, and there were no
 political blocks for us. GC is a demonstrated problem; avoid it. DMD's
 codegen is also a problem; it uses x87 to perform operations, despite
 the fact the x64 ABI uses SSE regs for float passing. That results in
 a lot of register switching, and poor float performance as a result.
 As an (awkward) workaround, you can use explicit SSE intrinsics to
 keep working in XMM, but I haven't tested the optimiser's quality in
 that case, and the std library obviously doesn't do that.




 Thanks for the detailed answer.  Sounds like the only thing holding D
 back
 is someone putting in the effort to integrate it with the console
 runtime
 and APIs.  It's not going to be me, as I haven't owned a console or
 even
 played a console game in a decade.  Yes, I know I'm an old fogey. :)



 I don't think there's any particularly compelling reason to make
 runtime calls from D. You can link C/C++ and D code together just
 fine. If you're a gamedev, there's a very high chance that you already
 have an engine (presumably C/C++) in place. You'll need to bind the
 engine api, not the OS api.
 Trouble with the console OS api's are that they're protected by NDA;
 it would probably be pretty dubious to release any such foreign
 language binding here, so each studio would have to do that work
 themselves... unless it were posted on the official dev forums or
 something.



 $ dub add-local .
 Could be rather useful here!


 I don't know what that means?


 You don't need to register packages of the dub repository for dub to be able
 to use a package. In this case its registered locally instead.
 In terms of NDA's, can definitely be used to make e.g. wrappers of bindings
 private and then use them to publically distribute the usage of them.

...I don't follow.


[Issue 14007] shmctl with IPC_STAT returns wrong number of attachments. shmid_ds is defined wrong.

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14007

--- Comment #1 from tcak 10l94s+31wgxrstmw...@sharklasers.com ---
Created attachment 1465
  -- https://issues.dlang.org/attachment.cgi?id=1465action=edit
C codes

This code works as supposed to be

--


[Issue 13436] posix.mak is broken for dlang.org repo

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13436

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||and...@erdani.com
 Resolution|--- |FIXED

--- Comment #2 from Andrei Alexandrescu and...@erdani.com ---
Fixed. Thanks!

--


[Issue 9118] typo in github tools repo

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9118

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 CC||and...@erdani.com
 Resolution|--- |FIXED

--- Comment #4 from Andrei Alexandrescu and...@erdani.com ---
Fixed. thanks!

--


[Issue 13436] posix.mak is broken for dlang.org repo

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13436

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #3 from Andrei Alexandrescu and...@erdani.com ---
Sorry, wrong window...

--


[Issue 14007] shmctl with IPC_STAT returns wrong number of attachments. shmid_ds is defined wrong.

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14007

--- Comment #4 from tcak 10l94s+31wgxrstmw...@sharklasers.com ---
Created attachment 1468
  -- https://issues.dlang.org/attachment.cgi?id=1468action=edit
This is the fixed shm.d file

This is the fixed shm.d file. Can someone put a pull request on Github for
this. By using this file, the issue is solved.

--


Re: druntime build failing because of masm386 problems

2015-01-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, January 18, 2015 22:19:29 Jonathan M Davis via Digitalmars-d-learn 
wrote:
 On Sunday, January 18, 2015 23:21:43 jollie via Digitalmars-d-learn wrote:
  It's been some months since I had this problem pop up, but I just
   ran touch on the minit.obj file so make thought it was up to date
   and used it.

 That did the trick. Thanks. It looks like that has to be done after every
 time I run clean. That definitely sucks.

Oh. It looks like this page has an even better suggestion:

http://wiki.dlang.org/Building_DMD

It suggests creating an empty masm386.bat file in a directory which is in
your path (e.g. C:\dm\bin), and then it'll just work, since masm386 will do
nothing. Still, I'm inclined to think that the makefile should be fixed so
that it just uses the provided object file if can't be rebuilt on the system
anyway.

- Jonathan M Davis



Re: Can D get on XBone and PS4?

2015-01-18 Thread Manu via Digitalmars-d
On 18 January 2015 at 16:48, Joakim via Digitalmars-d
digitalmars-d@puremagic.com wrote:
 I just stumbled across this article from a year ago, which says the PS4
 toolchain is based on llvm/clang:

 http://www.phoronix.com/scan.php?page=news_itempx=MTU1MTY

 I know some here were excited about the possibility of getting D on the new
 consoles since they were switching to x86, but is that really possible?  I
 googled other alternative compiled languages combined with playstation 4 and
 found... nothing.

 I don't know if Sony/Microsoft put in legal roadblocks to using anything
 other than the officially supported languages for game development on their
 consoles.  If not, this could be a good way to differentiate D, especially
 given the current nogc focus.

 Perhaps Manu or one of the the other game developers can comment on the
 feasibility of getting D on the major consoles.

At Remedy, we ran D code on xbone with no opposition from MS.
For xbone, we wanted to maintain compatibility with the rest of our
MSVC code, which meant we needed to produce COFF output that the MSVC
linker accepts. Walter implemented DMD-Win64 with these requirements
in mind.
PS4 should be easier using LDC, but I don't know if Sony would take
issue with this. I expect them to take less issue than MS, so I'd give
good odd's that they'd be fine with it.

Short answer, D works on modern consoles just fine, and there were no
political blocks for us. GC is a demonstrated problem; avoid it. DMD's
codegen is also a problem; it uses x87 to perform operations, despite
the fact the x64 ABI uses SSE regs for float passing. That results in
a lot of register switching, and poor float performance as a result.
As an (awkward) workaround, you can use explicit SSE intrinsics to
keep working in XMM, but I haven't tested the optimiser's quality in
that case, and the std library obviously doesn't do that.


Re: Please help me with improving dlang.org

2015-01-18 Thread Daniel Kozak via Digitalmars-d
MattCoder via Digitalmars-d píše v Ne 18. 01. 2015 v 02:55 +:
 On Sunday, 18 January 2015 at 02:18:16 UTC, Andrei Alexandrescu 
 wrote:
  I took the better part of today working on this: 
  https://github.com/D-Programming-Language/dlang.org/pull/780. 
  See demo at http://erdani.com/d/.
 
  What do you all think? Is it an improvement over what we have 
  now?
 
 Nice but I changed a bit, so what do you think about this: 
 http://i.imgur.com/AIvcoWl.png
 
 ?
 
 Matheus.
http://imgur.com/s155ec2



[Issue 13979] ForeachType grammar does not allow 'ref' to appear after type constructors

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13979

--- Comment #2 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dlang.org

https://github.com/D-Programming-Language/dlang.org/commit/ccd33d814f34492cec6e8a4efe0ba38e01cbeef5
Issue 13979 - ForeachType grammar does not allow 'ref' to appear after type
constructors

https://github.com/D-Programming-Language/dlang.org/commit/adf4faffa10193fef69f9b472d72c21f533afb18
Merge pull request #773 from Hackerpilot/issue-13979

Issue 13979 - ForeachType grammar does not allow 'ref' to appear after t...

--


[Issue 10233] [Tracker] Grammar issues

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10233
Issue 10233 depends on issue 13979, which changed state.

Issue 13979 Summary: ForeachType grammar does not allow 'ref' to appear after 
type constructors
https://issues.dlang.org/show_bug.cgi?id=13979

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 13979] ForeachType grammar does not allow 'ref' to appear after type constructors

2015-01-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13979

Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


Re: Can D get on XBone and PS4?

2015-01-18 Thread Paulo Pinto via Digitalmars-d

On Sunday, 18 January 2015 at 06:48:45 UTC, Joakim wrote:
I just stumbled across this article from a year ago, which says 
the PS4 toolchain is based on llvm/clang:


http://www.phoronix.com/scan.php?page=news_itempx=MTU1MTY

I know some here were excited about the possibility of getting 
D on the new consoles since they were switching to x86, but is 
that really possible?  I googled other alternative compiled 
languages combined with playstation 4 and found... nothing.


I don't know if Sony/Microsoft put in legal roadblocks to using 
anything other than the officially supported languages for game 
development on their consoles.  If not, this could be a good 
way to differentiate D, especially given the current nogc focus.


Perhaps Manu or one of the the other game developers can 
comment on the feasibility of getting D on the major consoles.


If you want to know more about it,check the LLVM talks:

http://llvm.org/devmtg/

Many of them have talks from either Sony or CodePlay (also does
PS compilers).


Re: post qualifier and template constraint limitation, is there a reason ?

2015-01-18 Thread Daniel Murphy via Digitalmars-d
Walter Bright  wrote in message news:m9fodo$18lu$1...@digitalmars.com... 


I don't really know where the class change came from :-(


https://github.com/D-Programming-Language/dmd/pull/1227


Re: Please help me with improving dlang.org

2015-01-18 Thread Mike via Digitalmars-d
On Sunday, 18 January 2015 at 02:18:16 UTC, Andrei Alexandrescu 
wrote:
I took the better part of today working on this: 
https://github.com/D-Programming-Language/dlang.org/pull/780. 
See demo at http://erdani.com/d/.


What do you all think? Is it an improvement over what we have 
now?


I'd appreciate your help with reviewing and pulling this, and 
also with improving the colors (which I'm terrible at) and page 
tracking as mentioned in the pull request.




What are your primary concerns with the website?  I think it 
would help to know what you are trying to achieve.


Personally, although dlang.org isn't particularly pretty, I think 
its fine.  It's the unmaintained and unfinished content that's 
the real problem, not the aesthetics.  I've made a number of PRs 
to move unofficial content to the wiki so it could be better 
maintained there, and if not maintained, at least appear less 
official.  I believe dlang.org's lack of maintenance is partially 
due to the issues mentioned below.


I've tried to do some improvements on dlang.org, and its a PITA.  
If it were made more convenient, there would be greater 
participation from me, and likely others.  So, I offer the 
following suggestion:


1) Modify the build scripts and the instructions on dlang.org so 
that it's abundantly clear how to fork, modify, build, verify, 
submit PRs without having read verbose instructions and without 
having to clone and build dmd, druntime, phobos, and other 
repositories just to get an html page to verify an edit.  I would 
do this myself, but an important prerequisite to updating build 
scripts and documentation is knowledge, which I have yet to 
possess.  But someone in this community knows.


2) Aside from the documentation generated from the source code, 
why does the website need to be built?  IMO a static website 
like dlang.org shouldn't need any additional tools other than a 
browser and an image editor.  I may explore some options later, 
but only after 1) is done.


Mike



[dub] specify dependency configuration

2015-01-18 Thread cal via Digitalmars-d-learn

Given myapp and a dependency, specified by dub.json's:

myapp: dub.json
{
  ...
  dependencies: {
dependency_a: =0.6.0
  }
  ...
}

dependency_a: dub.json
{
  ...
  configurations: [
  {
name: config_a,
targetType: library,
...
  },
  {
name: config_b,
targetType: executable,
...
  },
  ...
}

How do I specify (in myapp: dub.json) that I want the config_a 
configuration of dependency_a?


Re: Please help me with improving dlang.org

2015-01-18 Thread Walter Bright via Digitalmars-d

On 1/18/2015 1:41 AM, Rikki Cattermole wrote:

On 18/01/2015 10:40 p.m., Tofu Ninja wrote:

On Sunday, 18 January 2015 at 08:42:30 UTC, Walter Bright wrote:


Me like. And I do like the spidery red lines in particular.


The red lines were what I particularly disliked, looks old and unclean
to me.


Also that contrast is awful on the eyes!


How can a 1 pixel wide line be awful on the eyes?


  1   2   3   >