Re: formatted assert error messages inside nogc functions

2016-01-10 Thread Timothee Cour via Digitalmars-d
update: with @nogc @trusted pure this becomes even uglier:


@nogc @trusted pure
void test(int a){
  if(!(a==3)){
debug{
char[100]buf; //TODO:make sure big enough
// would like to use 'auto s=sformat(buf, "a = %s", a);' but not nogc:
https://issues.dlang.org/show_bug.cgi?id=13055
auto m=snprintf(buf.ptr, buf.length, "a = %d", a);
assert(m0);
assert(0, buf[0..m]);
}
else{
  assert(0);
}
  }
}


On Sat, Jan 9, 2016 at 11:54 PM, Timothee Cour 
wrote:

> Is there a better way than the example below to have an informative (ie
> formatted with runtime values) error message inside a nogc function?
>
> @nogc
> void test(int a){
>   char[100]buf; //TODO:make sure big enough
>   //auto s=sformat(buf, "a = %s", a);/// not nogc even though it accepts a
> buf
>   auto m=snprintf(buf.ptr, buf.length, "a = %d", a);
>   assert(m0);
>   assert(a==3, buf[0..m]);
> }
>
>


flag -ignore_nogc to allow breaking nogc rules during debugging [analog to debug for pure]

2016-01-10 Thread Timothee Cour via Digitalmars-d
this would make error handling trivial and solve issues such as this:

FORUM:formatted assert error messages inside nogc functions
http://forum.dlang.org/thread/CANri+EyNyrhMWGCSqZHx_vXDJFSrwhOrV=j2katz6t9-upt...@mail.gmail.com

usage:

during development:
dmd -debug -ignore_nogc other_flags foo.d
during release:
dmd other_flags foo.d

@nogc
void test(int a){

version(ignore_nogc)
  assert(a==1, text("a = ", a));
else
  assert(a==1, "a = ?");

}


Re: flag -ignore_nogc to allow breaking nogc rules during debugging [analog to debug for pure]

2016-01-10 Thread rsw0x via Digitalmars-d

On Sunday, 10 January 2016 at 09:17:20 UTC, Timothee Cour wrote:
this would make error handling trivial and solve issues such as 
this:


FORUM:formatted assert error messages inside nogc functions 
http://forum.dlang.org/thread/CANri+EyNyrhMWGCSqZHx_vXDJFSrwhOrV=j2katz6t9-upt...@mail.gmail.com


usage:

during development:
dmd -debug -ignore_nogc other_flags foo.d
during release:
dmd other_flags foo.d

@nogc
void test(int a){

version(ignore_nogc)
  assert(a==1, text("a = ", a));
else
  assert(a==1, "a = ?");

}


is there a valid reason that debug shouldn't just ignore @nogc?
this is also an issue with contracts iirc


Re: What are you planning for 2016?

2016-01-10 Thread bachmeier via Digitalmars-d

On Saturday, 9 January 2016 at 21:40:02 UTC, jmh530 wrote:

On Saturday, 9 January 2016 at 19:39:44 UTC, Jakob Jenkov wrote:
The communication is the easy part. The time consuming part 
is converting R objects to D objects and vice versa. I've had 
to learn the internals of R at the same time that I've 
learned D. I've been working on it in my spare time for more 
than two years.


Would it have been possible to make a D API for data analysis 
instead? Or is that too big a job?


You could program anything in D that would run in R and it 
would probably be faster (unless the R code is using some 
optimized C/C++ code already). The issue is that D libraries 
for data analysis aren't as developed and don't have as many 
people working on them as R. You might be more productive 
calling an R library than re-writing the same functionality in 
D.


In many cases, such as graphics, speed is not an issue so a 
rewrite won't help. By integrating R inside D, an existing R user 
gives up nothing - you can choose how much to write in D vs R.


Re: flag -ignore_nogc to allow breaking nogc rules during debugging [analog to debug for pure]

2016-01-10 Thread Timothee Cour via Digitalmars-d
just more fine-grained control ... but either way.
having an escape away from nogc would be needed.


On Sun, Jan 10, 2016 at 1:56 AM, rsw0x via Digitalmars-d <
digitalmars-d@puremagic.com> wrote:

> On Sunday, 10 January 2016 at 09:17:20 UTC, Timothee Cour wrote:
>
>> this would make error handling trivial and solve issues such as this:
>>
>> FORUM:formatted assert error messages inside nogc functions
>> http://forum.dlang.org/thread/CANri+EyNyrhMWGCSqZHx_vXDJFSrwhOrV=j2katz6t9-upt...@mail.gmail.com
>>
>> usage:
>>
>> during development:
>> dmd -debug -ignore_nogc other_flags foo.d
>> during release:
>> dmd other_flags foo.d
>>
>> @nogc
>> void test(int a){
>>
>> version(ignore_nogc)
>>   assert(a==1, text("a = ", a));
>> else
>>   assert(a==1, "a = ?");
>>
>> }
>>
>
> is there a valid reason that debug shouldn't just ignore @nogc?
> this is also an issue with contracts iirc
>


Re: flag -ignore_nogc to allow breaking nogc rules during debugging [analog to debug for pure]

2016-01-10 Thread Guillaume Piolat via Digitalmars-d

On Sunday, 10 January 2016 at 12:33:19 UTC, Timothee Cour wrote:

just more fine-grained control ... but either way.
having an escape away from nogc would be needed.



Is it a bit annoying to use, but have you aware of: 
http://p0nce.github.io/d-idioms/#Bypassing-@nogc ?


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread anonymous via Digitalmars-d

On 09.01.2016 23:36, Jack Stouffer wrote:

On Friday, 8 January 2016 at 22:32:59 UTC, anonymous wrote:

[...]

4) Fonts

[...]

One nitpick here: can you change the function signatures to use a
monospace font (any will do really)?


Done.


Also, can you institute this change
to the function signatures as well:
https://github.com/D-Programming-Language/dlang.org/pull/1169


It's already in. You have to look at the pre-release docs. The release 
docs are built with an older dmd.


Example: 
http://d-ag0aep6g.rhcloud.com/phobos-prerelease/std_algorithm_searching.html#.commonPrefix



5) Justified Text

[...]

See my arguments here:
https://github.com/D-Programming-Language/dlang.org/pull/1152


I'm going the conservative route for now, keeping the text justified. I 
don't think hyphenation/justification is worth the troubles, but Andrei 
is the one that would have to be convinced here.



6) Red For Clickables Only?

[...]

I would take the converse of your conclusion because I have to disagree
with the use of red for links. People expect links to be blue and
underlined and darker when they are already visited; it's one of the
only design standards that exists on the web.

If you change links to be blue, then you can keep red as a highlight color.


I think that standard is pretty weak, more of a default really.

We want a red site, not a blue one. Links are the site's number one 
source of color. Blue links would make for a blue site with a red bar on 
top.


Re visited links: I removed the :visited styling without thinking too 
much about it, as I don't consider it very important. Am I wrong?


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread anonymous via Digitalmars-d

On 09.01.2016 22:43, Andrei Alexandrescu wrote:

On 1/8/16 5:32 PM, anonymous wrote:

[...]

5) Justified Text

[...]

Justified font only looks good in conjunction with hyphenation. I'd say
make text justified on browsers that support css hyphenation (all but
Chrome I recall?) and left align on the others.


I.e., revert the change. Done.

By the way, in Ubuntu I don't see any hyphenation in Firefox. It works 
in Windows, though.


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread anonymous via Digitalmars-d

On 09.01.2016 23:24, Vladimir Panteleev wrote:

On Friday, 8 January 2016 at 22:32:59 UTC, anonymous wrote:

[...]

Once this is merged, would you be OK with working together on updating
the forum to the new design?


Sure.


3) New Pages

[...]

Perhaps also link to (or even replace with) the wiki pages:

http://wiki.dlang.org/Articles
http://wiki.dlang.org/Development_tools


Added links. About replacing, let's see later.


6) Red For Clickables Only?

[...]

Perhaps just use bold without a color change for symbol highlighting?


That works pretty well with the new de-emphasized template constraints 
and a monospaced font (as per Jack Stouffer's request). So uncolored, 
bold symbols and red borders it is.


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread anonymous via Digitalmars-d

On 09.01.2016 11:35, Jacob Carlborg wrote:

I'm not sure that I like that some of the headers (learn, packages) are
clickable on the main page. This also causes some icons to be black
(gray?) and some to be red. How about a link at the end of the section
with the title "Read more", or similar?


Agreed. I unlinked Learn and Packages. The links were duplicated in the 
text already anyway.


Re: D Cross Platform Status + OpenGL Status ?

2016-01-10 Thread Adam D. Ruppe via Digitalmars-d

On Saturday, 9 January 2016 at 19:43:03 UTC, Jakob Jenkov wrote:
What is the status of cross compiling D to multiple platforms? 
I know it is possible, but how easy is it? How many issues do 
you have to mess with on different platforms?


The desktop ones are easy. ARM linux isn't to bad (use gdc or 
ldc). Android, iOS are in the works and have some support.


idk about Windows Phone, but I plan to take a look soonish.

And what about OpenGL support? Is that easy? And does it work 
easily across platforms?


You can call opengl functions the same as C.


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Bastiaan Veelo via Digitalmars-d

On Sunday, 10 January 2016 at 14:04:44 UTC, anonymous wrote:
Example: 
http://d-ag0aep6g.rhcloud.com/phobos-prerelease/std_algorithm_searching.html#.commonPrefix


Can I ask not to use dotted frames? It may be my eyes, but I get 
dizzy reading the tables.
Maybe format tables like the cheat sheet at the top of the page, 
which I think looks beautiful.


Thanks!


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Andrei Alexandrescu via Digitalmars-d

On 1/10/16 9:05 AM, anonymous wrote:

On 09.01.2016 22:43, Andrei Alexandrescu wrote:

On 1/8/16 5:32 PM, anonymous wrote:

[...]

5) Justified Text

[...]

Justified font only looks good in conjunction with hyphenation. I'd say
make text justified on browsers that support css hyphenation (all but
Chrome I recall?) and left align on the others.


I.e., revert the change. Done.

By the way, in Ubuntu I don't see any hyphenation in Firefox. It works
in Windows, though.


Probably we need to fix that, but it's a preexisting matter so don't 
worry about it. Do you have a PR in place yet? Thx! -- Andrei


Re: Wait-free thread communication

2016-01-10 Thread David Nadlinger via Digitalmars-d
On Saturday, 9 January 2016 at 22:44:53 UTC, Ola Fosheim Grøstad 
wrote:
Yes. But my experience from writing custom multi-single queues 
is that it can end up harder than it looks to get it working 
and efficient. […] (Intuition is often wrong in this area...)


I wholeheartedly agree with that statement. However, if one 
doesn't understand atomics well enough to correctly implement 
even a simple single-single queue, I'm not sure whether one would 
be able to correctly port an existing implementation either.


Then again, the primitives might be similar enough between C++11 
and D so that a literal translation is possible without 
understanding what is going on.


 — David


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread anonymous via Digitalmars-d

On 10.01.2016 15:27, Bastiaan Veelo wrote:

Can I ask not to use dotted frames?


I agree that they're ugly, but they've been ugly before the redesign, 
too. Let's do such stuff in separate pull requests.


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread anonymous via Digitalmars-d

On 08.01.2016 23:32, anonymous wrote:

My implementation of the redesign is pretty much complete.

Check it out: http://d-ag0aep6g.rhcloud.com/


No blocking issues in sight so far. Time to make a pull request:

https://github.com/D-Programming-Language/dlang.org/pull/1187


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread anonymous via Digitalmars-d

On 10.01.2016 16:11, Andrei Alexandrescu wrote:

Do you have a PR in place yet?


Here we go:
https://github.com/D-Programming-Language/dlang.org/pull/1187


GDC includes from LDC

2016-01-10 Thread Russel Winder via Digitalmars-d
Iain,

Playing with the SCons tests, I am heading to the hypothesis that, at
least on Debian Sid, if both gdc and ldc packages are installed, then
gdc picks up the D source files from the ldc package in preference to
the ones from the gdc package.


scons: Building targets ...
gdc -I. -c -o foo.o foo.d
scons: building terminated because of errors.

STDERR =
/usr/include/d/core/stdc/config.d:28:3: error: static if conditional cannot be 
at global scope
   static if( (void*).sizeof > int.sizeof )
   ^
scons: *** [foo.o] Error 1


|> dpkg -S /usr/include/d/core/stdc/config.d
libphobos2-ldc-dev: /usr/include/d/core/stdc/config.d

-- 
Russel.
=
Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder



signature.asc
Description: This is a digitally signed message part


Re: GDC includes from LDC

2016-01-10 Thread John Colvin via Digitalmars-d

On Sunday, 10 January 2016 at 16:23:24 UTC, Russel Winder wrote:

Iain,

Playing with the SCons tests, I am heading to the hypothesis 
that, at least on Debian Sid, if both gdc and ldc packages are 
installed, then gdc picks up the D source files from the ldc 
package in preference to the ones from the gdc package.



scons: Building targets ...
gdc -I. -c -o foo.o foo.d
scons: building terminated because of errors.

STDERR 
=
/usr/include/d/core/stdc/config.d:28:3: error: static if 
conditional cannot be at global scope

   static if( (void*).sizeof > int.sizeof )
   ^
scons: *** [foo.o] Error 1


|> dpkg -S /usr/include/d/core/stdc/config.d 
libphobos2-ldc-dev: /usr/include/d/core/stdc/config.d


I think this is the same problem I have on OS X.


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Saurabh Das via Digitalmars-d

On Friday, 8 January 2016 at 22:32:59 UTC, anonymous wrote:

My implementation of the redesign is pretty much complete.

Check it out: http://d-ag0aep6g.rhcloud.com/

This is an implementation of a design done by one Ivan Smirnov, 
brought forward by Jacob Carlborg [1].


The dark forum widgets on the home page are in iframes. Their 
styling will need to be updated at the source, which is 
forum.dlang.org.


Another external dependency is the This Week in D script. Adam, 
it would be nice if the `setTwid` function could take the date 
separately. That would allow me to word the text without having 
"This Week in D" there twice.


Other than those two little things I consider this done. From 
my side it could be merged immediately.


But I'm sure there are a thousand things wrong with this. Here 
are some topics to get you started:


1) Legalities

I mentioned this before, but noone reacted. Can we use Ivan's 
work? Do we have his ok? Do we need it? Jacob mentioned that he 
can't in contact with him anymore. Is that a problem?


2) Reviewing the code

https://github.com/aG0aep6G/dlang.org/commits/Ivan-Smirnov's-redesign

This is just one giant commit (the others are independent minor 
fixes). GitHub refuses to show the diff for the style.css file, 
because it's too big. Is this acceptable, or do I need to split 
it up somehow? If I need to split it up, any advice on how to 
do that?


3) New Pages

Aside from the overall style changes and menu reorganization, I 
also added overview pages for the articles and for the tools:


http://d-ag0aep6g.rhcloud.com/articles.html
http://d-ag0aep6g.rhcloud.com/tools.html

They feature new text that should be proofread.

4) Fonts

Vladimir Panteleev has spoken out against web fonts [2]. His 
argument is that they can look fine on one system but bad on 
another. Indeed the recently changed code font on dlang.org 
looks pretty bad for me while the default 'monospace' looks 
just fine, which is why I reverted that in the redesign.


The redesign uses a web font for its main font, though: Roboto 
Slab. It looks good for me, but I'm not able to test it on a 
large variety of device/OS/browser combinations. Maybe it's 
fine, or maybe we should stay away from web fonts 
categorically. I don't really have an opinion on this.


5) Justified Text

Andrei loves it, everybody else hates it. I killed it as the 
mockup didn't have it. Is that ok, or is justified text a must?


6) Red For Clickables Only?

Currently, the site uses red almost exclusively for clickable 
stuff. But it's also used as a highlight color for 
non-clickable things. For example in phobos signatures:


http://d-ag0aep6g.rhcloud.com/phobos/object.html#.Object

The left borders of the signature boxes are red, and the 
documented symbol is highlighted with red.


Red does not signal clickability here. I don't like that and 
I'd prefer to go with another color for generic highlighting, 
reserving red for clickable stuff.


7) The Logo

As requested by Andrei, this does not feature a logo change for 
now. I'm going to make a pull request for the slicker logo 
variant [3] when this is through.



[1] http://forum.dlang.org/post/n53ps0$2j8f$1...@digitalmars.com
[2] 
http://forum.dlang.org/post/xezfeilxblfkibldv...@forum.dlang.org

[3] https://gist.github.com/aG0aep6G/0803ec5ae49f6afb0196


Again, thanks for doing this. The new design overall looks much 
more modern and approachable.


Some feedback I do have:

Fonts
---
I do not have any problem with Web Fonts. In particular the web 
fonts created by Google are highly tested and render pretty 
similarly on many device/browser combinations. This is from 
practical experience.


On the font used, Roboto Slab: I feel that the serif nature of 
the font makes it clash with the clean design. A sans serif font 
would look much better.


Justified Text

I'm with Andrei on this one. Justified text is preferable to 
aligned text for large paragraphs which span the reading width of 
the page. It always makes it easier to read. For mini-paragraphs, 
sometimes left aligned does look better.


"Your Code Here" widget
-
The widget that displays and allows you to run code in the 
browser has been a staple of the D website for a long time now. 
It's a great feature. There is one issue here: When the code 
length is large, it takes half the screen before any actual 
content begins. The grayed out header colour looks funny.


I suggest displaying the first 7-9 lines of code in the box and 
either making the box scrollable, or making it so that clicking 
on the box expands it to show the entire code.


The "Sort lines" example is about the right size. The "Round 
floating point numbers" is a bit large.


PS: Sorry if there were opportunities to give feedback on this 
earlier and somehow I missed it. I do hope you consider this even 
it if comes a bit late.


Thanks,
Saurabh



Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Saurabh Das via Digitalmars-d

On Sunday, 10 January 2016 at 17:02:59 UTC, Saurabh Das wrote:

[...]
The grayed out header colour looks funny.


I meant it looks funny when it spans half the height of the page 
when the example code is long. It looks fine otherwise :)




Anyone using DMD to build 32bit on OS X?

2016-01-10 Thread Jacob Carlborg via Digitalmars-d
I've implemented native TLS in DMD on OS X for 64bit. Now the question 
is, does it need to work for 32bit as well?


The easiest would be to drop the 32bit support all together. Other 
options would be to continue to use emulate TLS on 32bit or implement 
native TLS for 32bit as well. I would prefer to not have to do this for 
32bit as well.


As far as I know we haven't released a 32bit binary of DMD for a very 
long time. It would be very rare to find a Mac that cannot run 64bit 
binaries.


Native TLS on OS X would mean that the runtime requirements for the 
binaries produced by DMD on OS X would be OS X 10.7 (Lion) or later. 
Hopefully that should not be a problem since it's several years (and 
versions) old.


--
/Jacob Carlborg


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Andrei Alexandrescu via Digitalmars-d

On 1/10/16 10:23 AM, anonymous wrote:

On 10.01.2016 16:11, Andrei Alexandrescu wrote:

Do you have a PR in place yet?


Here we go:
https://github.com/D-Programming-Language/dlang.org/pull/1187


...aand we're live. Congratulations and many thanks to the folks who 
worked on this! -- Andrei


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Jack Stouffer via Digitalmars-d

On Friday, 8 January 2016 at 22:32:59 UTC, anonymous wrote:

My implementation of the redesign is pretty much complete.

Check it out: http://d-ag0aep6g.rhcloud.com/


Congratulations on getting this merged!


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Robert burner Schadek via Digitalmars-d

congratulations


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Saurabh Das via Digitalmars-d
On Sunday, 10 January 2016 at 17:17:44 UTC, Andrei Alexandrescu 
wrote:

On 1/10/16 10:23 AM, anonymous wrote:

On 10.01.2016 16:11, Andrei Alexandrescu wrote:

Do you have a PR in place yet?


Here we go:
https://github.com/D-Programming-Language/dlang.org/pull/1187


...aand we're live. Congratulations and many thanks to the 
folks who worked on this! -- Andrei


Congratulations to everyone who's worked on this!

What is the canonical way to report bugs on the website? On 
mobile, the red "your code here" merges with the code itself.





Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Vladimir Panteleev via Digitalmars-d
On Sunday, 10 January 2016 at 17:17:44 UTC, Andrei Alexandrescu 
wrote:

On 1/10/16 10:23 AM, anonymous wrote:

On 10.01.2016 16:11, Andrei Alexandrescu wrote:

Do you have a PR in place yet?


Here we go:
https://github.com/D-Programming-Language/dlang.org/pull/1187


...aand we're live. Congratulations and many thanks to the 
folks who worked on this! -- Andrei


@anonymous, thank you for the great work and congratulations on 
getting it merged and live.


@Andrei, I am once again disappointed and frustrated at your 
attitude towards your fellow dlang.org maintainers. Please allow 
proper time for code review for pull requests, but at this point 
I feel like talking to a wall.




Re: Anyone using DMD to build 32bit on OS X?

2016-01-10 Thread Jack Stouffer via Digitalmars-d

On Sunday, 10 January 2016 at 17:12:40 UTC, Jacob Carlborg wrote:
The easiest would be to drop the 32bit support all together. 
Other options would be to continue to use emulate TLS on 32bit 
or implement native TLS for 32bit as well. I would prefer to 
not have to do this for 32bit as well.


I would suggest dropping 32bit OSX support, especially since it 
doesn't exist anymore. Mountain Lion, which was released in 2012, 
was the last version to ship a 32bit version. And you're right, 
DMD doesn't even have a 32bit binary for download.


Also, the probability of extra bugs in the 32bit OSX is high, due 
to the fact that no one uses it.


Re: GDC includes from LDC

2016-01-10 Thread Mathias Lang via Digitalmars-d
Looks like a packaging issue. In Archlinux there is one extra directory
level for the compiler (e.g. `/usr/include/dlang//`) to prevent
such things.

Looking at the file list for both libraries:
- GDC: https://packages.debian.org/sid/amd64/libphobos-4.9-dev/filelist
- LDC: https://packages.debian.org/fr/sid/amd64/libphobos2-ldc-dev/filelist

It seems that indeed GDC is picking LDC's libphobos.

2016-01-10 17:51 GMT+01:00 John Colvin via Digitalmars-d <
digitalmars-d@puremagic.com>:

> On Sunday, 10 January 2016 at 16:23:24 UTC, Russel Winder wrote:
>
>> Iain,
>>
>> Playing with the SCons tests, I am heading to the hypothesis that, at
>> least on Debian Sid, if both gdc and ldc packages are installed, then gdc
>> picks up the D source files from the ldc package in preference to the ones
>> from the gdc package.
>>
>>
>> scons: Building targets ...
>> gdc -I. -c -o foo.o foo.d
>> scons: building terminated because of errors.
>>
>> STDERR
>> =
>> /usr/include/d/core/stdc/config.d:28:3: error: static if conditional
>> cannot be at global scope
>>static if( (void*).sizeof > int.sizeof )
>>^
>> scons: *** [foo.o] Error 1
>>
>>
>> |> dpkg -S /usr/include/d/core/stdc/config.d libphobos2-ldc-dev:
>> /usr/include/d/core/stdc/config.d
>>
>
> I think this is the same problem I have on OS X.
>


Re: Self-Modifying code for user settings optimization

2016-01-10 Thread Jay Norwood via Digitalmars-d

On Saturday, 9 January 2016 at 21:09:05 UTC, Jason Jeffory wrote:
It might, which is why I asked, seems like it would be 
something trivial to do if the address of the function and 
relative address of the "variable" can be gotten at "compile 
time"(not sure it is possible by maybe one could write an 
object parser).


There is debug line info, but good luck with most of that after 
the optimizer gets through with the code.


This project provides an api for code patching.  Maybe it will 
help, or at least give you ideas.

http://www.dyninst.org/dyninst

I also have some interest in the ability to add arbitrary named 
markers to code at compile time that could be accessed from 
symbol info.  I'm not interested in modifying the code, but in 
using the addresses to create windows for code measurement.  Our 
hardware supports performance analysis limited to a specified 
address range without instrumenting the code, but with optimized 
code it is difficult to use.




Re: Anyone using DMD to build 32bit on OS X?

2016-01-10 Thread John Colvin via Digitalmars-d

On Sunday, 10 January 2016 at 17:12:40 UTC, Jacob Carlborg wrote:
I've implemented native TLS in DMD on OS X for 64bit. Now the 
question is, does it need to work for 32bit as well?


The easiest would be to drop the 32bit support all together. 
Other options would be to continue to use emulate TLS on 32bit 
or implement native TLS for 32bit as well. I would prefer to 
not have to do this for 32bit as well.


As far as I know we haven't released a 32bit binary of DMD for 
a very long time. It would be very rare to find a Mac that 
cannot run 64bit binaries.


Native TLS on OS X would mean that the runtime requirements for 
the binaries produced by DMD on OS X would be OS X 10.7 (Lion) 
or later. Hopefully that should not be a problem since it's 
several years (and versions) old.


I definitely don't care about 32 bit on OS X. However, I see no 
need to drop it if the current TLS emulation works.


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread cym13 via Digitalmars-d
On Sunday, 10 January 2016 at 17:17:44 UTC, Andrei Alexandrescu 
wrote:

On 1/10/16 10:23 AM, anonymous wrote:

On 10.01.2016 16:11, Andrei Alexandrescu wrote:

Do you have a PR in place yet?


Here we go:
https://github.com/D-Programming-Language/dlang.org/pull/1187


...aand we're live. Congratulations and many thanks to the 
folks who worked on this! -- Andrei


Congrats! This looks great!


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Gary Willoughby via Digitalmars-d

On Sunday, 10 January 2016 at 19:50:40 UTC, cym13 wrote:
On Sunday, 10 January 2016 at 17:17:44 UTC, Andrei Alexandrescu 
wrote:

On 1/10/16 10:23 AM, anonymous wrote:

On 10.01.2016 16:11, Andrei Alexandrescu wrote:

Do you have a PR in place yet?


Here we go:
https://github.com/D-Programming-Language/dlang.org/pull/1187


...aand we're live. Congratulations and many thanks to the 
folks who worked on this! -- Andrei


Congrats! This looks great!


I like it! It's a vast improvement. My one criticism would be 
that the logo is far too small.


Well done!


Re: Anyone using DMD to build 32bit on OS X?

2016-01-10 Thread Jacob Carlborg via Digitalmars-d

On 2016-01-10 20:42, John Colvin wrote:


I definitely don't care about 32 bit on OS X. However, I see no need to
drop it if the current TLS emulation works.


It's easier to remove it than supporting both :)

--
/Jacob Carlborg


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Andrei Alexandrescu via Digitalmars-d

On 1/10/16 1:05 PM, Vladimir Panteleev wrote:

@Andrei, I am once again disappointed and frustrated at your attitude
towards your fellow dlang.org maintainers. Please allow proper time for
code review for pull requests, but at this point I feel like talking to
a wall.


You're right, sorry about getting too enthusiastic. Should we undo? -- 
Andrei


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread mate via Digitalmars-d

Thanks and congrats!

I have one issue with icons display on my laptop, although they 
display well on my phone:

http://imgur.com/lZWgWI4
http://imgur.com/KZWBiVr

Usually this kind of issues is due to my use of script blocker, 
but disabling it and reloading the page does not seem to fix it.


Any idea?


Re: Anyone using DMD to build 32bit on OS X?

2016-01-10 Thread bitwise via Digitalmars-d

On Sunday, 10 January 2016 at 17:12:40 UTC, Jacob Carlborg wrote:
I've implemented native TLS in DMD on OS X for 64bit. Now the 
question is, does it need to work for 32bit as well?


The easiest would be to drop the 32bit support all together. 
Other options would be to continue to use emulate TLS on 32bit 
or implement native TLS for 32bit as well. I would prefer to 
not have to do this for 32bit as well.


As far as I know we haven't released a 32bit binary of DMD for 
a very long time. It would be very rare to find a Mac that 
cannot run 64bit binaries.


Native TLS on OS X would mean that the runtime requirements for 
the binaries produced by DMD on OS X would be OS X 10.7 (Lion) 
or later. Hopefully that should not be a problem since it's 
several years (and versions) old.


Awesome!

Is there a way I can have a look at the code? I'd like to start 
looking into how this will fit together with shared library 
support.


Thanks,
   Bit



Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread deadalnix via Digitalmars-d
On Sunday, 10 January 2016 at 17:17:44 UTC, Andrei Alexandrescu 
wrote:

On 1/10/16 10:23 AM, anonymous wrote:

On 10.01.2016 16:11, Andrei Alexandrescu wrote:

Do you have a PR in place yet?


Here we go:
https://github.com/D-Programming-Language/dlang.org/pull/1187


...aand we're live. Congratulations and many thanks to the 
folks who worked on this! -- Andrei


That's awesome. Now :
 - I have no idea what the code sample is doing. The code sample 
is not for me or anyone that already knows D, but for newcomer 
that wonder what the hell D is about. If I can't understand it at 
first glance, then it is missing it's goal BY FAR.
 - Learn barely make the cut on my 15' monitor. That's way too 
low. If one doesn't know D, one doesn't care about news, 
community or whatever.

 - Widget are still broken on https.
 - The download button is small while surrounded by wasted grey 
area. BIG FAT DOWNLOAD WANTED, DEAD OR ALIVE.
 - Please don't make me click on the menus. You can also make 
them work with pure CSS using :hover
 - A light touch of green would make the page much nicer 
(complementary color, all that good fun).

 - Look and feel of packages and forum need to follow.

While I complains like a grumpy old man, I'd like to congrats 
people that makes this happen. This is very good for D. Good job.


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Iain Buclaw via Digitalmars-d
On 10 January 2016 at 22:14, deadalnix via Digitalmars-d <
digitalmars-d@puremagic.com> wrote:

> On Sunday, 10 January 2016 at 17:17:44 UTC, Andrei Alexandrescu wrote:
>
>> On 1/10/16 10:23 AM, anonymous wrote:
>>
>>> On 10.01.2016 16:11, Andrei Alexandrescu wrote:
>>>
 Do you have a PR in place yet?

>>>
>>> Here we go:
>>> https://github.com/D-Programming-Language/dlang.org/pull/1187
>>>
>>
>> ...aand we're live. Congratulations and many thanks to the folks who
>> worked on this! -- Andrei
>>
>
> That's awesome. Now :
>  - I have no idea what the code sample is doing. The code sample is not
> for me or anyone that already knows D, but for newcomer that wonder what
> the hell D is about. If I can't understand it at first glance, then it is
> missing it's goal BY FAR.
>  - Learn barely make the cut on my 15' monitor. That's way too low. If one
> doesn't know D, one doesn't care about news, community or whatever.
>  - Widget are still broken on https.
>  - The download button is small while surrounded by wasted grey area. BIG
> FAT DOWNLOAD WANTED, DEAD OR ALIVE.
>  - Please don't make me click on the menus. You can also make them work
> with pure CSS using :hover
>  - A light touch of green would make the page much nicer (complementary
> color, all that good fun).
>  - Look and feel of packages and forum need to follow.
>
> While I complains like a grumpy old man, I'd like to congrats people that
> makes this happen. This is very good for D. Good job.
>

I echo this, and would add a further point that you should have tested all
sub-domains before uploading.  Release archive is not looking well.

http://downloads.dlang.org/


Re: Wait-free thread communication

2016-01-10 Thread Martin Nowak via Digitalmars-d
On 01/08/2016 05:58 PM, Jin wrote:
> Idea: no mutex, no CAS, only one direction queues without any locks.
> 
> My prototype (https://github.com/nin-jin/go.d) is up to 10x faster than
> std.concurrency.send/receive

Yes single-reader single-writer queue are the fastest way for
inter-thread communication.
You might have a look at my
[lock-free](http://code.dlang.org/packages/lock-free) for a correct
implementation.

> Problems:
> 
> For blocking thread i use loop with Thread.sleep - this is bad decision
> IMHO.

Have a look at this exponential backoff implementation for my GC
spinlock PR.
https://github.com/D-Programming-Language/druntime/pull/1447/files#diff-fb5cbe06e1aaf83814ccf5ff08f05519R34

In general you need some sort of configurable or adaptive backoff or
you'll waste too much time context switching.

-Martin


Re: Wait-free thread communication

2016-01-10 Thread Martin Nowak via Digitalmars-d
On 01/09/2016 04:51 PM, Jin wrote:
> I just add atomic fence for push and take:
> 
> this.messages[ this.tail ] = value;
> atomicFence;
> this.tail = ( this.tail + 1 ) % this.size;

Don't do this, memory fences are expensive.

This is what you need for a spsc queue.
https://github.com/MartinNowak/lock-free/commit/233739262c14e00866a60f4a6a86c1b979ac968b


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Martin Nowak via Digitalmars-d
On 01/10/2016 03:05 PM, anonymous wrote:
> On 09.01.2016 22:43, Andrei Alexandrescu wrote:
>> On 1/8/16 5:32 PM, anonymous wrote:
> [...]
>>> 5) Justified Text
> [...]
>> Justified font only looks good in conjunction with hyphenation. I'd say
>> make text justified on browsers that support css hyphenation (all but
>> Chrome I recall?) and left align on the others.
> 
> I.e., revert the change. Done.
> 
> By the way, in Ubuntu I don't see any hyphenation in Firefox. It works
> in Windows, though.

Is there a chance to pre- (ddoc) or post-process (html) our
documentation text?
I can offer a hyphenation tool
(http://code.dlang.org/packages/hyphenate), but wiring it up w/ our
dlang.org build requires some work.



Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread JohnCK via Digitalmars-d

On Sunday, 10 January 2016 at 21:18:46 UTC, Iain Buclaw wrote:
I echo this, and would add a further point that you should have 
tested all sub-domains before uploading.  Release archive is 
not looking well.


http://downloads.dlang.org/


Wow. Man I don't want to be too harsh, but that was pretty lame. 
I mean... put the site on the air without testing?


JohnCK.


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread anonymous via Digitalmars-d

On 10.01.2016 21:50, mate wrote:

I have one issue with icons display on my laptop, although they display
well on my phone:
http://imgur.com/lZWgWI4
http://imgur.com/KZWBiVr

Usually this kind of issues is due to my use of script blocker, but
disabling it and reloading the page does not seem to fix it.

Any idea?


The icons are done using FontAwesome. Do the icons work on their 
examples page?


https://fortawesome.github.io/Font-Awesome/examples/#basic

Also, what browser are you using, and what operating system?


Re: Extending Objective-C from D.

2016-01-10 Thread Guillaume Piolat via Digitalmars-d
On Saturday, 9 January 2016 at 10:09:12 UTC, Jeremie Pelletier 
wrote:
Hello, I'm trying to see if I can write a full Cocoa app in D, 
and I'm having trouble creating D classes when the underlying 
Objective-C interfaces have methods.


It works for the app delegate because it needs to override 
them, but for other classes the compiler says the Objective-C 
methods aren't implemented in the D subclass.




If you are looking to implement/override Obj-C methods in D, I 
have done it here deriving from NSView

https://github.com/p0nce/dplug/blob/master/window/dplug/window/cocoawindow.d#L426

Using the Obj-C runtime, the D object declares a new class 
object, populates it with methods (inverse mapping is done with 
an instance variable containing "this"). Ugly, but works.


Example of a method callback: 
https://github.com/p0nce/dplug/blob/master/window/dplug/window/cocoawindow.d#L499
Do not forget to prepend the callback arguments with id and 
selector.





Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread anonymous via Digitalmars-d

On 10.01.2016 18:02, Saurabh Das wrote:

On the font used, Roboto Slab: I feel that the serif nature of the font
makes it clash with the clean design. A sans serif font would look much
better.


At first I felt so, too, but the font grew on me. I think it works well.


"Your Code Here" widget
-

[...]

I suggest displaying the first 7-9 lines of code in the box and either
making the box scrollable, or making it so that clicking on the box
expands it to show the entire code.


I'd rather just put a hard limit on the length of examples. But 
scrollable/expandable code would be better than a large empty void below 
the download button.



The "Sort lines" example is about the right size. The "Round floating
point numbers" is a bit large.


I agree that "Round floating point numbers" is a tad too long. I think 
it's in an acceptable area, though.


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread mate via Digitalmars-d
The icons are done using FontAwesome. Do the icons work on 
their examples page?


https://fortawesome.github.io/Font-Awesome/examples/#basic


Yes.


Also, what browser are you using, and what operating system?


Firefox 43.0.3, on linux (Fedora).


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread cym13 via Digitalmars-d

On Sunday, 10 January 2016 at 21:46:03 UTC, JohnCK wrote:

On Sunday, 10 January 2016 at 21:18:46 UTC, Iain Buclaw wrote:
I echo this, and would add a further point that you should 
have tested all sub-domains before uploading.  Release archive 
is not looking well.


http://downloads.dlang.org/


Wow. Man I don't want to be too harsh, but that was pretty 
lame. I mean... put the site on the air without testing?


JohnCK.


Note that this url shouldn't even exist: the link on the main 
page for the download section points to 
http://dlang.org/download.html . I believe it is a left-over from 
a previous version.


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Guillaume Piolat via Digitalmars-d

On Sunday, 10 January 2016 at 15:23:53 UTC, anonymous wrote:

On 10.01.2016 16:11, Andrei Alexandrescu wrote:

Do you have a PR in place yet?


Here we go:
https://github.com/D-Programming-Language/dlang.org/pull/1187


This looks gorgeous. Congratulation to our @anonymous contributor!


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread anonymous via Digitalmars-d

On 10.01.2016 19:04, Saurabh Das wrote:

What is the canonical way to report bugs on the website?


Website bugs go into the same bug tracker as compiler and library bugs:

https://issues.dlang.org/

Select "dlang.org" for component.


On mobile, the red "your code here" merges with the code itself.


Yeah, that's not good. I'm not sure what the best fix for this would be. 
Do you have anything in mind?


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread anonymous via Digitalmars-d

On 10.01.2016 23:03, cym13 wrote:

Note that this url shouldn't even exist: the link on the main page for
the download section points to http://dlang.org/download.html . I
believe it is a left-over from a previous version.


downloads.dlang.org is linked from download.html ("Release Archive"). So 
yeah, we dropped the ball on that one.


Re: Anyone using DMD to build 32bit on OS X?

2016-01-10 Thread Guillaume Piolat via Digitalmars-d

On Sunday, 10 January 2016 at 18:06:11 UTC, Jack Stouffer wrote:
Mountain Lion, which was released in 2012, was the last version 
to ship a 32bit version.


But 32-bit programs still work on latest OSX, and are sometimes 
needed.


Re: Anyone using DMD to build 32bit on OS X?

2016-01-10 Thread Guillaume Piolat via Digitalmars-d

On Sunday, 10 January 2016 at 17:12:40 UTC, Jacob Carlborg wrote:
I've implemented native TLS in DMD on OS X for 64bit. Now the 
question is, does it need to work for 32bit as well?


The easiest would be to drop the 32bit support all together. 
Other options would be to continue to use emulate TLS on 32bit 
or implement native TLS for 32bit as well. I would prefer to 
not have to do this for 32bit as well.


As far as I know we haven't released a 32bit binary of DMD for 
a very long time. It would be very rare to find a Mac that 
cannot run 64bit binaries.


Native TLS on OS X would mean that the runtime requirements for 
the binaries produced by DMD on OS X would be OS X 10.7 (Lion) 
or later. Hopefully that should not be a problem since it's 
several years (and versions) old.


I'm using 32-bit support of DMD and I would strongly prefer if it 
wasn't removed. At least staying the same as today.


The problem is that I don't control what bitness users want, 
because of network effects some users still use 32-bit software. 
Every product in this space is Universal Binaries with both 
32-bit and 64-bit arch.


You can drop OSX 10.6, which is not officially supported anyway, 
it would bring compat the same as LDC. No problem as far as I'm 
concerned, very few people are using 10.6 (at least that's what 
they say in polls).


I have a question, does your work solves shared libraries leaking 
after unload, or is it unrelated? :)




Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread rsw0x via Digitalmars-d

On Sunday, 10 January 2016 at 21:58:19 UTC, mate wrote:
The icons are done using FontAwesome. Do the icons work on 
their examples page?


https://fortawesome.github.io/Font-Awesome/examples/#basic


Yes.


Also, what browser are you using, and what operating system?


Firefox 43.0.3, on linux (Fedora).


Your browser is probably blocking maxcdn's connection.
Do you happen to use a host-level adblocker by chance?


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread anonymous via Digitalmars-d

On 10.01.2016 22:18, Iain Buclaw via Digitalmars-d wrote:

I echo this, and would add a further point that you should have tested all
sub-domains before uploading.  Release archive is not looking well.

http://downloads.dlang.org/


Uhm, where can I fix that? downloads.dlang.org isn't part of the of 
dlang.org repository, is it?


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread JohnCK via Digitalmars-d
First of all, the site looks better than the old version. 
Congratulations and now the criticism:


I don't want to hurt anybody's feelings. But look the DMD's Image 
compared to GDC and LDC: http://i.imgur.com/TrnuxcB.jpg


Really looks like a joke. I would say this seems more like 90's 
but I have doubt if it's older than that.


Please let's go change that.

JohnCK.


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread rsw0x via Digitalmars-d

On Sunday, 10 January 2016 at 22:46:34 UTC, JohnCK wrote:
First of all, the site looks better than the old version. 
Congratulations and now the criticism:


I don't want to hurt anybody's feelings. But look the DMD's 
Image compared to GDC and LDC: http://i.imgur.com/TrnuxcB.jpg


Really looks like a joke. I would say this seems more like 90's 
but I have doubt if it's older than that.


Please let's go change that.

JohnCK.


It actually seems sort of fitting ; )


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Iain Buclaw via Digitalmars-d
On 10 January 2016 at 23:46, JohnCK via Digitalmars-d <
digitalmars-d@puremagic.com> wrote:

> First of all, the site looks better than the old version. Congratulations
> and now the criticism:
>
> I don't want to hurt anybody's feelings. But look the DMD's Image compared
> to GDC and LDC: http://i.imgur.com/TrnuxcB.jpg
>
> Really looks like a joke. I would say this seems more like 90's but I have
> doubt if it's older than that.
>
> Please let's go change that.
>
> JohnCK.
>


Don't mock D-man.  He will get you in your dreams.  :-)


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Iain Buclaw via Digitalmars-d
On 10 January 2016 at 23:33, anonymous via Digitalmars-d <
digitalmars-d@puremagic.com> wrote:

> On 10.01.2016 22:18, Iain Buclaw via Digitalmars-d wrote:
>
>> I echo this, and would add a further point that you should have tested all
>> sub-domains before uploading.  Release archive is not looking well.
>>
>> http://downloads.dlang.org/
>>
>
> Uhm, where can I fix that? downloads.dlang.org isn't part of the of
> dlang.org repository, is it?
>


This is on Amazon S3.

Brad, this is your domain.  Can you have a look?  (Not sure if you monitor
your emails :-)


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread lobo via Digitalmars-d

On Sunday, 10 January 2016 at 22:46:34 UTC, JohnCK wrote:
First of all, the site looks better than the old version. 
Congratulations and now the criticism:


I don't want to hurt anybody's feelings. But look the DMD's 
Image compared to GDC and LDC: http://i.imgur.com/TrnuxcB.jpg


Really looks like a joke. I would say this seems more like 90's 
but I have doubt if it's older than that.


Please let's go change that.

JohnCK.


I kinda like it :)

It's better than that inbred bucktoothed gopher thing Go has for 
a mascot...it is all subjective.


bye,
lobo


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Andrei Alexandrescu via Digitalmars-d

On 1/10/16 4:44 PM, Martin Nowak wrote:

On 01/10/2016 03:05 PM, anonymous wrote:

On 09.01.2016 22:43, Andrei Alexandrescu wrote:

On 1/8/16 5:32 PM, anonymous wrote:

[...]

5) Justified Text

[...]

Justified font only looks good in conjunction with hyphenation. I'd say
make text justified on browsers that support css hyphenation (all but
Chrome I recall?) and left align on the others.


I.e., revert the change. Done.

By the way, in Ubuntu I don't see any hyphenation in Firefox. It works
in Windows, though.


Is there a chance to pre- (ddoc) or post-process (html) our
documentation text?
I can offer a hyphenation tool
(http://code.dlang.org/packages/hyphenate), but wiring it up w/ our
dlang.org build requires some work.


Yeah, great tool Martin. I recall it was among the first on the dub 
repo. Would be great to hook it in and have it insert a bunch of 
"­"s. -- Andrei


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Andrei Alexandrescu via Digitalmars-d

On 1/10/16 4:46 PM, JohnCK wrote:

On Sunday, 10 January 2016 at 21:18:46 UTC, Iain Buclaw wrote:

I echo this, and would add a further point that you should have tested
all sub-domains before uploading.  Release archive is not looking well.

http://downloads.dlang.org/


Wow. Man I don't want to be too harsh, but that was pretty lame. I
mean... put the site on the air without testing?


We're either too quick or too slow :o). 
https://github.com/D-Programming-Language/dlang.org/pull/1189


Andrei



Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread anonymous via Digitalmars-d

On 10.01.2016 22:14, deadalnix wrote:

  - Learn barely make the cut on my 15' monitor. That's way too low. If
one doesn't know D, one doesn't care about news, community or whatever.


We can shuffle things around, of course. One alternative:

Learn News
Documentation Community
Packages Contribute

http://i.imgur.com/8mQj0rg.png

This would make Learn the most prominent item.

There is an empty void between Learn and Documentation. It could be 
filled by putting more into Learn. I don't know what to write there, though.


This would sort of split the items in a consumer oriented left column 
and a contributor oriented right column. Which makes me think that I'm 
over-thinking this.



  - Please don't make me click on the menus. You can also make them work
with pure CSS using :hover


I think it was Adam who spoke out against :hover menus, preferring to 
click instead. So we're at 1:1 now, I guess?


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread mate via Digitalmars-d

On Sunday, 10 January 2016 at 22:25:50 UTC, rsw0x wrote:

On Sunday, 10 January 2016 at 21:58:19 UTC, mate wrote:
The icons are done using FontAwesome. Do the icons work on 
their examples page?


https://fortawesome.github.io/Font-Awesome/examples/#basic


Yes.


Also, what browser are you using, and what operating system?


Firefox 43.0.3, on linux (Fedora).


Your browser is probably blocking maxcdn's connection.
Do you happen to use a host-level adblocker by chance?


Yes, you spot it! I had not noticed a separate setting in my 
blocker for web objects such as fonts, and their blocking was 
still active. I changed that setting, and it’s displaying well 
now.


Thank you


Re: extern(C++, ns)

2016-01-10 Thread Manu via Digitalmars-d
On 8 January 2016 at 23:40, Walter Bright via Digitalmars-d
 wrote:
> On 1/7/2016 9:14 PM, Manu via Digitalmars-d wrote:
>>
>> The namespace offers nothing, and introduces problems. We don't want it.
>
>
> The problems you were having were due to two bugs, since corrected, and one
> misunderstanding on how name lookups were done.

Nope.
I've tried the latest nightly against my code. I can confirm the
forward-referencing issues seem to be gone, but I had already worked
very hard to arrange and order my code to avoid that issue, so that
wasn't actually my problem (as I suspected).
This patch allows me to un-obfuscate my code by putting it back in
readable order, but the rest of my issues seem to be un-changed. They
are all name-in-namespace resolution related.
As a quick test, I changed extern(C++, ns), to extern(C++) in the
files where it couldn't find anything, and all the symbols became
visible and everything worked as it should (except obviously I
couldn't link).

Sadly, I don't have any more time I can allocate to this, I'll have to
chip away at it any further after hours. I really hoped I could get
this working over Christmas.
I'll continue to try and reduce the structure of the problem, but I
still just wish you'd remove the namespace scope. Everything would be
fixed instantly, I am certain of this.
This design doesn't give us anything, and you seem to be resisting
making an argument for its existence. We don't need to do this, we
don't need to waste any more time.


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Saurabh Das via Digitalmars-d

On Sunday, 10 January 2016 at 22:11:51 UTC, anonymous wrote:

On 10.01.2016 19:04, Saurabh Das wrote:

What is the canonical way to report bugs on the website?


Website bugs go into the same bug tracker as compiler and 
library bugs:


https://issues.dlang.org/

Select "dlang.org" for component.

OK. I'll report issues there. Will do a thorough review later 
this week.


On mobile, the red "your code here" merges with the code 
itself.


Yeah, that's not good. I'm not sure what the best fix for this 
would be. Do you have anything in mind?


Move the "your code here" to next to the buttons would be a good 
move. Alternatively, fade out the code below and hide the "your 
code here" when the box is in focus.





Re: extern(C++, ns)

2016-01-10 Thread Walter Bright via Digitalmars-d

On 1/10/2016 5:20 PM, Manu via Digitalmars-d wrote:

This design doesn't give us anything, and you seem to be resisting
making an argument for its existence. We don't need to do this, we
don't need to waste any more time.


I appreciate that, but without knowing exactly what your issue is, I can't draw 
any sort of conclusion.


Re: extern(C++, ns)

2016-01-10 Thread Andrei Alexandrescu via Digitalmars-d

On 1/10/16 8:20 PM, Manu via Digitalmars-d wrote:

I'll continue to try and reduce the structure of the problem, but I
still just wish you'd remove the namespace scope. Everything would be
fixed instantly, I am certain of this.


Do you have other examples that should work but don't? Thx! -- Andrei


Writing large data to file

2016-01-10 Thread Domain via Digitalmars-d
I am writing a split-liked tool, and want to write some large 
data (>4GB) to a single file. But this is not possible while 
using std.file.write, at least on windows. And I need dig into 
the source code to find out the reason (Windows API WriteFile 
uses DWORD as the input size). So why not call WriteFile multiple 
times inside write function, or at least return the number of 
bytes has been written, than I can append the left myself.


Re: extern(C++, ns)

2016-01-10 Thread Jason Jeffory via Digitalmars-d

On Friday, 8 January 2016 at 13:50:56 UTC, Walter Bright wrote:

On 1/8/2016 12:11 AM, Jacob Carlborg wrote:

Walter, should "ns.a()" work in the above example?


No:

1. first "ns.a" looks up "ns". Finds it in the current module, 
"main.ns".

2. Looks "a" up in "main.ns". "a" is not there. Error.

"a()" works because:

1. Look up "a" in current module. Doesn't find it.
2. Look up "a" in import "foo".
   1. doesn't find it. Look in imported scope "foo.ns". finds 
it.

3. Look up "a" in import "bar".
   1. doesn't find it. Look in imported scope "bar.ns". Doesn't 
find it.


Found only one "a" in the imports. We have da winnah!

I think name lookup rules are straightforward in D. I explain 
them over and over, for years, and nobody but me understands 
them. I find it very frustrating.


Lol, that either tells you that you've got it wrong or that your 
just too smart!


How bout this, add compiler functionality where one can 
contribute patches to dmd, and then experimentally use them?


If Manu has such capabilities, he could check his "theory" about 
quite easily(his code would just work)... at leas then everyone 
would know what the real issue is.


As much time that has been wasted arguing over this stuff, the 
feature and fix could have been implemented already.


e.g.,
dmd ... -expermental-nsmodule 




Not that it matters, my own personal logic tells me that 
namespace resolution should be consistent with D module name 
resolution. To treat all namespaces sort of coming from a global 
chunk of symbols just seems wrong. The whole point in the first 
place was to get around that. Reverting back to C like scope 
resolution for something that was suppose to get away from it 
doesn't make sense logically.


Basically there are two choices,

D Namespaces are module bound(moduleA.ns2 is different than 
moduleB.ns2) or they are not(moduleA.ns2 is the same as 
moduleB.ns2).


How bout this for a solution?

Create a new namespace keyword, _namspace or inline namespace or 
whatever, it behaves one way and the other behaves the other 
way?? This way, everyone wins Who cares about people that 
"might abuse" something... that's trying to solve a problem that 
doesn't exist yet. If people want to shoot themselves in the 
foot, let them, they will learn, and like everything else, one 
will become deprecated over time, it's nothing new.


It's like trying to prevent people from walking because someone 
once fell in a man-hole. 99.9% of people are good at walking. 
Punish them for the edge case? Maybe the issue is the man hole 
instead?


I imagine it would be easier to write a utility that parses the 
C++ code and does some magic to make it work in D than getting D 
to support something that it already does differently.









Re: extern(C++, ns)

2016-01-10 Thread Manu via Digitalmars-d
On 11 January 2016 at 11:59, Walter Bright via Digitalmars-d
 wrote:
> On 1/10/2016 5:20 PM, Manu via Digitalmars-d wrote:
>>
>> This design doesn't give us anything, and you seem to be resisting
>> making an argument for its existence. We don't need to do this, we
>> don't need to waste any more time.
>
>
> I appreciate that, but without knowing exactly what your issue is, I can't
> draw any sort of conclusion.

I can't say without spending a whole bunch of time trying to work it
out. What I can consistently show is that when I substitute
'extern(C++, ns)' for 'extern(C++)', all problems vanish (subsequent
link errors aside).
It would seem that name resolution is more complex than normal, and it
gets complicated or breaks in edge cases. Then I need to spend time
trying to understand how it is that my case is complex, and trying to
workaround it (or produce sufficient examples).
But the whole dance is pointless. If we could just recognise that the
ns scope only increases complexity, there's no good reason for it, and
there's no opt out.
Just let the symbols be exactly where they're declared like any
regular D code, and if you really want this namespace scoping feature,
can we take that as a separate enhancement request and discuss/design
it? I'd suggest it should be opt-in, since I can't imagine a case
where I would ever want that behaviour.


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Brad Roberts via Digitalmars-d

On 1/10/2016 3:09 PM, Iain Buclaw via Digitalmars-d wrote:

On 10 January 2016 at 23:33, anonymous via Digitalmars-d
mailto:digitalmars-d@puremagic.com>> wrote:

On 10.01.2016 22:18, Iain Buclaw via Digitalmars-d wrote:

I echo this, and would add a further point that you should have
tested all
sub-domains before uploading.  Release archive is not looking well.

http://downloads.dlang.org/


Uhm, where can I fix that? downloads.dlang.org
 isn't part of the of dlang.org
 repository, is it?



This is on Amazon S3.

Brad, this is your domain.  Can you have a look?  (Not sure if you
monitor your emails :-)


These days I just pay for it.  Our very capable release manager manages 
the content of it.


Re: extern(C++, ns)

2016-01-10 Thread Manu via Digitalmars-d
On 11 January 2016 at 12:38, Andrei Alexandrescu via Digitalmars-d
 wrote:
> On 1/10/16 8:20 PM, Manu via Digitalmars-d wrote:
>>
>> I'll continue to try and reduce the structure of the problem, but I
>> still just wish you'd remove the namespace scope. Everything would be
>> fixed instantly, I am certain of this.
>
>
> Do you have other examples that should work but don't? Thx! -- Andrei

I only have the code I'm working on. I just don't have free time
available to me to work on home/side projects the last 6 months >_<
I used some gaps while other staff were on Christmas holidays to make
an effort at this, but that time has passed.

I'll do another pass over my code as I am able, since bugs have been
fixes the situation has changed, and I effectively need to repeat all
the experiments I've done.


Re: extern(C++, ns)

2016-01-10 Thread Walter Bright via Digitalmars-d

On 1/10/2016 6:54 PM, Manu via Digitalmars-d wrote:

It would seem that name resolution is more complex than normal, and it
gets complicated or breaks in edge cases. Then I need to spend time
trying to understand how it is that my case is complex, and trying to
workaround it (or produce sufficient examples).
But the whole dance is pointless. If we could just recognise that the
ns scope only increases complexity, there's no good reason for it, and
there's no opt out.
Just let the symbols be exactly where they're declared like any
regular D code, and if you really want this namespace scoping feature,
can we take that as a separate enhancement request and discuss/design
it? I'd suggest it should be opt-in, since I can't imagine a case
where I would ever want that behaviour.


I'd like to distinguish what's going wrong:

1. a bug in the implementation
2. a bug in the design
3. a bug in your mental model of how it works
4. unawareness of a feature in D designed for the situation

before throwing it all away and rebooting the design. Note that I have been able 
to help you when you've got an example illustrating the issue you're having.




Re: extern(C++, ns)

2016-01-10 Thread Walter Bright via Digitalmars-d

On 1/10/2016 7:05 PM, Manu via Digitalmars-d wrote:

I'll do another pass over my code as I am able, since bugs have been
fixes the situation has changed, and I effectively need to repeat all
the experiments I've done.



Thank you. I also suggest that you come here for help sooner so you don't spend 
so much time beating your head on the wall.


Re: extern(C++, ns)

2016-01-10 Thread Rikki Cattermole via Digitalmars-d

On 11/01/16 4:05 PM, Manu via Digitalmars-d wrote:

On 11 January 2016 at 12:38, Andrei Alexandrescu via Digitalmars-d
 wrote:

On 1/10/16 8:20 PM, Manu via Digitalmars-d wrote:


I'll continue to try and reduce the structure of the problem, but I
still just wish you'd remove the namespace scope. Everything would be
fixed instantly, I am certain of this.



Do you have other examples that should work but don't? Thx! -- Andrei


I only have the code I'm working on. I just don't have free time
available to me to work on home/side projects the last 6 months >_<
I used some gaps while other staff were on Christmas holidays to make
an effort at this, but that time has passed.

I'll do another pass over my code as I am able, since bugs have been
fixes the situation has changed, and I effectively need to repeat all
the experiments I've done.


Would it be possible to send the code to Walter to take a look at and 
maybe have a go with?




[your code here]

2016-01-10 Thread Saurabh Das via Digitalmars-d
The D code part on the front page has only 2 examples currently. 
I thought we should add to that. As per the instructions, I'm 
posting one sample here for approval:


// Find anagrams of words
void main()
{
import std.stdio, std.algorithm;
string[][string] anagram_info;
File("/usr/share/dict/words")
.byLine
.each!(w => anagram_info[w.dup.sort.idup] ~= w.idup);
stdin
.byLine
.map!(l => anagram_info.get(l.sort.idup, []))
.each!writeln;
}


PS: I'm new to writing idiomatic D, so there could be 
improvements to this example. Do point them out :)




Re: Anyone using DMD to build 32bit on OS X?

2016-01-10 Thread Jacob Carlborg via Digitalmars-d

On 2016-01-10 21:58, bitwise wrote:


Awesome!

Is there a way I can have a look at the code? I'd like to start looking
into how this will fit together with shared library support.


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

--
/Jacob Carlborg


Re: Anyone using DMD to build 32bit on OS X?

2016-01-10 Thread Jacob Carlborg via Digitalmars-d

On 2016-01-10 23:15, Guillaume Piolat wrote:


I'm using 32-bit support of DMD and I would strongly prefer if it wasn't
removed. At least staying the same as today.

The problem is that I don't control what bitness users want, because of
network effects some users still use 32-bit software. Every product in
this space is Universal Binaries with both 32-bit and 64-bit arch.


Fair enough.


You can drop OSX 10.6, which is not officially supported anyway, it
would bring compat the same as LDC. No problem as far as I'm concerned,
very few people are using 10.6 (at least that's what they say in polls).


Ok, that would mean 10.7 for 64bit and 10.6 (or whatever the current 
requirements are) for 32bit.



I have a question, does your work solves shared libraries leaking after
unload, or is it unrelated? :)


I doesn't solve the problem but it's a prerequisite for solving dynamic 
libraries. That's why I started working on this :)


--
/Jacob Carlborg


Re: [dlang.org] getting the redesign wrapped up

2016-01-10 Thread Jacob Carlborg via Digitalmars-d

On 2016-01-10 21:23, Andrei Alexandrescu wrote:


You're right, sorry about getting too enthusiastic. Should we undo? --
Andrei


That depends on how many new issues have appeared, how much trouble they 
cause and how much trouble it is do a rollback. It might be easier to 
roll forward.


--
/Jacob Carlborg