Re: [dlang.org] new forum design - preview

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

On 1/15/16 1:35 AM, Tofu Ninja wrote:

My criticism is why are people spending more time redesigning the look
of the website again... we haven't even had this one that long. There
are better ways to improve the website than re-skinning it. Nothing is
really changing, just the colors and layout.


It's a good thing to do now. The latest major change was done a year 
ago. -- Andrei


Re: Google Summer of Code 2016

2016-01-15 Thread Marc Schütz via Digitalmars-d
On Friday, 15 January 2016 at 12:36:32 UTC, Andrei Alexandrescu 
wrote:

On 1/15/16 6:58 AM, Craig Dillabaugh wrote:

On Friday, 15 January 2016 at 10:02:14 UTC, Marc Schütz wrote:
* A flexible serialization framework in Phobos. std.csv could 
be
changed to use it, and vibe.d as well as various 
serialization related
libraries (e.g. Protocol Buffers, capnproto) would also 
benefit from

standardization here.


What about Orange?  What is preventing it from becoming part 
of Phobos?


https://github.com/jacob-carlborg/orange


I recall there has been one (or two?) unsuccessful attempts. -- 
Andrei


Right, but it needs someone to take another stab at it. Part of 
the job is to gather all the requirements and look at the 
previous discussions as well as existing solutions.


c style casts

2016-01-15 Thread Warwick via Digitalmars-d-learn
I though C style casts were not supported? But when I accidentaly 
did


int i;
if (uint(i) < length) 

it compiled and worked fine. Whys that?


Re: [dlang.org] new forum design - preview

2016-01-15 Thread John Colvin via Digitalmars-d
On Wednesday, 13 January 2016 at 06:01:41 UTC, Vladimir Panteleev 
wrote:

http://beta.forum.dlang.org/

https://github.com/CyberShadow/DFeed/pull/51


I tried using this a bit and it's ... frustrating. I'll try and 
describe the thought process of a visit:



I load beta.forum.dlang.org, fullscreen, at 1680x1050.

All text looks very slightly out-of-focus and the bold text is 
far too tightly packed.
I notice that there are lines of text that are truncated (post 
titles), despite having loads of whitespace free on the page. 
This is instantly irritating.


I click on a post and it is loaded in horizontal split mode.

The right panel of the split view extends significantly lower 
than the left panel. The navigation column extends down further 
still.


There is some wasted vertical space above the footer and a *lot* 
wasted below it.


In the actual post window, I now have a line length below 60 
characters, which is way too small for me, I prefer closer to 80 
for reading (also I don't want code to start getting wrapped 
below 80). Nested quotations in replies end up with very 
restricted line lengths.


I click the "Toggle navigation" button.

With a line-length of 82 and less wasted vertical space around 
the footer, I'm much happier. However, now I've lost the left 
navigation column and the header bar.



A few summary points/suggestions:

The horizontal split layout looks horribly cramped in the default 
view, which is very irritating to look at, given the large white 
spaces either side of the content.


Users can always resize the window to make line lengths smaller, 
but if you've capped them too low they can't do anything to make 
them longer.


Having the "toggle navigation" button is nice for focus (less 
clutter, on demand), please keep it, but don't use it as an 
excuse for the design to be rubbish without it. I like to 
*option* to hide all the navigation, but I shouldn't have to just 
to get reasonable line lengths.


Re: Google Summer of Code 2016

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

On 1/15/16 6:58 AM, Craig Dillabaugh wrote:

On Friday, 15 January 2016 at 10:02:14 UTC, Marc Schütz wrote:

On Friday, 15 January 2016 at 03:33:23 UTC, Andrei Alexandrescu wrote:

A few quick ideas:

* Bringing a parser generator library into phobos, either based on
pegged or independent

* SQL parser, binder, validator

* Anything building on the strengths on D: introspection,
compile-time stuff, DSL, etc.

* Improving the GC

* Theoretical work - core language semantics, proving immutable
provides guarantees etc.


* A flexible serialization framework in Phobos. std.csv could be
changed to use it, and vibe.d as well as various serialization related
libraries (e.g. Protocol Buffers, capnproto) would also benefit from
standardization here.


What about Orange?  What is preventing it from becoming part of Phobos?

https://github.com/jacob-carlborg/orange


I recall there has been one (or two?) unsuccessful attempts. -- Andrei



Re: c style casts

2016-01-15 Thread Ilya Yaroshenko via Digitalmars-d-learn

On Friday, 15 January 2016 at 10:16:41 UTC, Warwick wrote:
I though C style casts were not supported? But when I 
accidentaly did


int i;
if (uint(i) < length) 

it compiled and worked fine. Whys that?


This is not a cast. You call constructor `uint(int x)`.
In the same time `uint(somethingTypeOfLong)` would not work, but 
cast(long). --Ilya


Re: [dlang.org] new forum design - preview

2016-01-15 Thread tn via Digitalmars-d

On Thursday, 14 January 2016 at 19:46:33 UTC, anonymous wrote:

On 14.01.2016 16:29, tn wrote:
I don't use my browser in full screen mode, but the useless 
white
margins are still there. With the horizontal-split mode the 
line length
of the message is less than 60 characters. Compared to that, I 
would be

happy with 80 or 90 you suggest.


This is an issue with the horizontal split mode, right? In the 
other modes you should get more than 80 characters on a line.


Yes.


Besides, especially the margin that is on the left side of the
navigation bar looks ugly, like it was rendered improperly.


Would a border help? http://i.imgur.com/XoPddxr.png

Or how about making the whole area gray? 
http://i.imgur.com/AXrmKU4.png


As tsbockman said, both look definitely better.



Re: New D tool releases

2016-01-15 Thread Andrei Alexandrescu via Digitalmars-d-announce

On 01/15/2016 12:52 AM, Vladimir Panteleev wrote:


What will be gained by doing so?

Can we add them as submodules and then just add them to the makefiles /
build scripts? I think this would have been a better way to include
DustMite too.


That would work, too! -- Andrei


Re: Google Summer of Code 2016

2016-01-15 Thread Marc Schütz via Digitalmars-d
On Friday, 15 January 2016 at 03:33:23 UTC, Andrei Alexandrescu 
wrote:

A few quick ideas:

* Bringing a parser generator library into phobos, either based 
on pegged or independent


* SQL parser, binder, validator

* Anything building on the strengths on D: introspection, 
compile-time stuff, DSL, etc.


* Improving the GC

* Theoretical work - core language semantics, proving immutable 
provides guarantees etc.


* A flexible serialization framework in Phobos. std.csv could be 
changed to use it, and vibe.d as well as various serialization 
related libraries (e.g. Protocol Buffers, capnproto) would also 
benefit from standardization here.


Re: Google Summer of Code 2016

2016-01-15 Thread Craig Dillabaugh via Digitalmars-d

On Friday, 15 January 2016 at 10:02:14 UTC, Marc Schütz wrote:
On Friday, 15 January 2016 at 03:33:23 UTC, Andrei Alexandrescu 
wrote:

A few quick ideas:

* Bringing a parser generator library into phobos, either 
based on pegged or independent


* SQL parser, binder, validator

* Anything building on the strengths on D: introspection, 
compile-time stuff, DSL, etc.


* Improving the GC

* Theoretical work - core language semantics, proving 
immutable provides guarantees etc.


* A flexible serialization framework in Phobos. std.csv could 
be changed to use it, and vibe.d as well as various 
serialization related libraries (e.g. Protocol Buffers, 
capnproto) would also benefit from standardization here.


What about Orange?  What is preventing it from becoming part of 
Phobos?


https://github.com/jacob-carlborg/orange




Re: DIP83

2016-01-15 Thread Márcio Martins via Digitalmars-d

On Thursday, 14 January 2016 at 14:28:05 UTC, deadalnix wrote:

Ok I'll bite: it doesn't matter.

This DIP is additive. The problem with D is not that we don't 
have stuff in there, is most of the stuff in there are half 
backed. Adding more half baked things in there only makes 
things worse.


We don't have line number in stack traces, what does a better 
assert error message (that one can configure by code) will do  
? Worse, how is that consistent with the position that 
"Segfault are good enough with a debugger" and null by default 
reference types ?


There is no point in discussing the doorbell when the house has 
no window.


True that. I think it's great to keep evolving the language and 
making it better, on the other hand, if D is to get serious 
adoption, then everything, especially the basics like 
debuggability, quality of codegen and compiler bugs will need to 
be solid. D as a language is already powerful enough to thrash 
the competition, this is why we love it. But the reason it's 
experiencing slow adoption, is because of tooling and general 
implementation quality, and the lower threshold of tolerance from 
the general population.


Re: Rust's website is really good

2016-01-15 Thread Andrea Fontana via Digitalmars-d

On Friday, 15 January 2016 at 11:35:52 UTC, Saurabh Das wrote:
I saw it via Reddit. Since the dlang.org website has been under 
discussion on this forum, I thought I would bring it up:


https://www.rust-lang.org/faq.html
https://www.rust-lang.org/

I admire the clean, modern look, simple colours and focus on 
what's important. The content is very good and "full". 
Arguably, this is better than even Python's website. I think 
they've taken the "run code here" idea from dlang.org though :)


The redesigned dlang.org website by "anonymous" is a huge step 
forward, so much praise and honour to her/him for doing that.


I agree. I said: I think the homepage should be clean, with few 
text and a big button to download.


I think on dlang homepage (both proposed and old) there are too 
much things ("informations") that disorient visitors. And they 
scare them. You should not to confuse them  with a lot of 
informations.


Re: DIP83

2016-01-15 Thread deadalnix via Digitalmars-d

On Friday, 15 January 2016 at 11:11:41 UTC, Tofu Ninja wrote:

On Thursday, 14 January 2016 at 14:28:05 UTC, deadalnix wrote:

We don't have line number in stack traces


Huh? We dont have line numbers in stack traces? I have line 
numbers, I am using latest dmd, or are you talking about one of 
the other compilers?


Well I don't, both on OSX and linux, using the latest release. On 
linux I can do the addr2line dance, but on OSX I can't even do 
that as it require information that are gone once the program 
terminate.




Re: DIP83

2016-01-15 Thread Atila Neves via Digitalmars-d
On Thursday, 14 January 2016 at 19:51:37 UTC, Jacob Carlborg 
wrote:

On 2016-01-14 15:28, deadalnix wrote:

There is no point in discussing the doorbell when the house 
has no window.


+1. And AST macros would solve the problem (and a lot of other 
problems).


I used to think we didn't need AST macros until I hit the 
problems this DIP tries to address. After 2 years or so, I think 
you've finally convinced me Jacob ;)


Atila


Re: DIP83

2016-01-15 Thread Tofu Ninja via Digitalmars-d

On Thursday, 14 January 2016 at 14:28:05 UTC, deadalnix wrote:

We don't have line number in stack traces


Huh? We dont have line numbers in stack traces? I have line 
numbers, I am using latest dmd, or are you talking about one of 
the other compilers?


Rust's website is really good

2016-01-15 Thread Saurabh Das via Digitalmars-d
I saw it via Reddit. Since the dlang.org website has been under 
discussion on this forum, I thought I would bring it up:


https://www.rust-lang.org/faq.html
https://www.rust-lang.org/

I admire the clean, modern look, simple colours and focus on 
what's important. The content is very good and "full". Arguably, 
this is better than even Python's website. I think they've taken 
the "run code here" idea from dlang.org though :)


The redesigned dlang.org website by "anonymous" is a huge step 
forward, so much praise and honour to her/him for doing that.




Re: Google Summer of Code 2016

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

On 01/15/2016 08:11 AM, Marc Schütz wrote:

On Friday, 15 January 2016 at 12:36:32 UTC, Andrei Alexandrescu wrote:

On 1/15/16 6:58 AM, Craig Dillabaugh wrote:

On Friday, 15 January 2016 at 10:02:14 UTC, Marc Schütz wrote:

* A flexible serialization framework in Phobos. std.csv could be
changed to use it, and vibe.d as well as various serialization related
libraries (e.g. Protocol Buffers, capnproto) would also benefit from
standardization here.


What about Orange?  What is preventing it from becoming part of Phobos?

https://github.com/jacob-carlborg/orange


I recall there has been one (or two?) unsuccessful attempts. -- Andrei


Right, but it needs someone to take another stab at it. Part of the job
is to gather all the requirements and look at the previous discussions
as well as existing solutions.


It would be terrific if Jacob wanted to mentor a student to work on a 
Phobos package starting from Orange. -- Andrei


Re: [dlang.org] new forum design - preview

2016-01-15 Thread Vladimir Panteleev via Digitalmars-d

On Friday, 15 January 2016 at 11:45:53 UTC, John Colvin wrote:
The right panel of the split view extends significantly lower 
than the left panel. The navigation column extends down further 
still.


There is some wasted vertical space above the footer and a 
*lot* wasted below it.


Thanks for the feedback, above looks like just a bug though.


Re: Google Summer of Code 2016

2016-01-15 Thread Tavi via Digitalmars-d
On Thursday, 14 January 2016 at 18:56:21 UTC, Craig Dillabaugh 
wrote:
Deadline is getting closer, any new project ideas are welcome. 
Starting to get some contact from students now.



FlatBuffers for DLang - http://google.github.io/flatbuffers/




Re: DIP83

2016-01-15 Thread Tofu Ninja via Digitalmars-d

On Friday, 15 January 2016 at 13:20:18 UTC, deadalnix wrote:
Well I don't, both on OSX and linux, using the latest release. 
On linux I can do the addr2line dance, but on OSX I can't even 
do that as it require information that are gone once the 
program terminate.


Hmmm, I'm on windows so maybe that's it, pretty odd tho.


Re: Google Summer of Code 2016

2016-01-15 Thread Craig Dillabaugh via Digitalmars-d
On Friday, 15 January 2016 at 13:43:07 UTC, Andrei Alexandrescu 
wrote:

On 01/15/2016 08:11 AM, Marc Schütz wrote:
On Friday, 15 January 2016 at 12:36:32 UTC, Andrei 
Alexandrescu wrote:

On 1/15/16 6:58 AM, Craig Dillabaugh wrote:
On Friday, 15 January 2016 at 10:02:14 UTC, Marc Schütz 
wrote:

[...]


What about Orange?  What is preventing it from becoming part 
of Phobos?


https://github.com/jacob-carlborg/orange


I recall there has been one (or two?) unsuccessful attempts. 
-- Andrei


Right, but it needs someone to take another stab at it. Part 
of the job
is to gather all the requirements and look at the previous 
discussions

as well as existing solutions.


It would be terrific if Jacob wanted to mentor a student to 
work on a Phobos package starting from Orange. -- Andrei


Agreed ... Jacob?


Re: DIP83

2016-01-15 Thread Yazan D via Digitalmars-d
On Fri, 15 Jan 2016 13:20:18 +, deadalnix wrote:

> 
> Well I don't, both on OSX and linux, using the latest release. On linux
> I can do the addr2line dance, but on OSX I can't even do that as it
> require information that are gone once the program terminate.


Are you compiling with debug symbols on (-g)? You should get stacktraces 
on linux.


Voldemort Type Construction Error

2016-01-15 Thread Nordlöw via Digitalmars-d-learn

I've made progress at the helper findingSplitter at

https://github.com/nordlow/justd/blob/master/substitution.d#L122

I need this for implementing a new Phobos lazy `substitute()` (or 
replace).


I've done most logic (AFAICT in my head) but I can't make the 
call to Result() work as it fails as


substitution.d(187,18): Error: struct 
substitution.findingSplitter!("a == b", string, string, string, 
string).findingSplitter.Result cannot deduce function from 
argument types !()(string, string, string, string), candidates 
are:
substitution.d(126,12):substitution.findingSplitter!("a 
== b", string, string, string, string).findingSplitter.Result()
substitution.d(194,32): Error: template instance 
substitution.findingSplitter!("a == b", string, string, string, 
string) error instantiating
substitution.d(196,12): Error: undefined identifier 'equal', did 
you mean alias 'Unqual'?
/home/per/Work/justd/traits_ex.d(64,13): Warning: statement is 
not reachable


What have I missed?


Re: [dlang.org] new forum design - preview

2016-01-15 Thread Random D user via Digitalmars-d
On Friday, 15 January 2016 at 05:56:37 UTC, Vladimir Panteleev 
wrote:

- A specific list of things that can be improved


I too like the current soft dark theme of the forum (and website).

Would it be possible to have optional dark theme in the forum 
settings?


I wish the main website would have a dark alternative too, 
because I might have language/phobos docs open all day on my 
second monitor.


The forum theme also has grey text on grey background (almost the 
same gray) in few places which makes it hard to read.


While neutral gray is fine as background for black text in a 
darker theme, I don't really like its usage as part of visual 
elements in the current light theme. IMO big neutral gray boxes 
make the site look really boring (like a rainy day). And even the 
red seems a bit like sun burnt and used.


Re: c style casts

2016-01-15 Thread Jacob Carlborg via Digitalmars-d-learn

On 2016-01-15 11:16, Warwick wrote:

I though C style casts were not supported? But when I accidentaly did

int i;
if (uint(i) < length) 

it compiled and worked fine. Whys that?


Wouldn't a C style cast be:

int i;
if ((uint)i < length)

?

--
/Jacob Carlborg


Re: [dlang.org] new forum design - preview

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

On 2016-01-15 10:16, Vladimir Panteleev wrote:


I added a new widget at the top of the basic view mode's post list:

http://beta.forum.dlang.org/thread/op.xz6shob04sdys0@nicolass-macbook-pro.local


Why does the text get smaller when width of the window gets smaller 
(when it gets small enough).


--
/Jacob Carlborg


Re: Voldemort Type Construction Error

2016-01-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, January 15, 2016 14:04:50 Nordlöw via Digitalmars-d-learn wrote:
> I've made progress at the helper findingSplitter at
>
> https://github.com/nordlow/justd/blob/master/substitution.d#L122
>
> I need this for implementing a new Phobos lazy `substitute()` (or
> replace).
>
> I've done most logic (AFAICT in my head) but I can't make the
> call to Result() work as it fails as
>
> substitution.d(187,18): Error: struct
> substitution.findingSplitter!("a == b", string, string, string,
> string).findingSplitter.Result cannot deduce function from
> argument types !()(string, string, string, string), candidates
> are:
> substitution.d(126,12):substitution.findingSplitter!("a
> == b", string, string, string, string).findingSplitter.Result()
> substitution.d(194,32): Error: template instance
> substitution.findingSplitter!("a == b", string, string, string,
> string) error instantiating
> substitution.d(196,12): Error: undefined identifier 'equal', did
> you mean alias 'Unqual'?
> /home/per/Work/justd/traits_ex.d(64,13): Warning: statement is
> not reachable
>
> What have I missed?

Well, the last error is caused by not import equal in that code (since the
imports that would import it are local imports elsewhere in the module).

As for the main error, you have parens on the declaration of Result.

static struct Result()

I don't know why you put them there, since Result is already effectively
templated by being inside of a templated function, and having it requires
that Result than have !() as a template argument when you're constructing
it. So, I'd say that you should just remove the parens - or if you have a
good reason that I can't think of which makes it make sense to put the
parens on Result, then you'll need to use !() when constructing it.

In any case, having the parens there but not using !() when constructing the
Result is what gives you the error you're seeing. If you remove the parens,
you get something more like

substitution.d(159): Error: template instance hasSlicing!R template 
'hasSlicing' is not defined
substitution.d(160): Error: template instance hasLength!R template 'hasLength' 
is not defined
substitution.d(176): Error: static assert  "Handle R without slicing"
substitution.d(195):instantiated from here: findingSplitter!("a == b", 
string, string, string, string)

Adding the appropriate imports results in something along the lines of

substitution.d(177): Error: static assert  "Handle R without slicing"
substitution.d(196):instantiated from here: findingSplitter!("a == b", 
string, string, string, string)

Beyond that, I'd have to figure out exactly what you're up to, but it looks
like that static assert is probably there to indicate that code needs to be
added as opposed to there being another bug that needs fixing.

In any case, that should at least help you make progress.

- Jonathan M Davis




[Issue 15304] [REG 2.068.0] Error about SortedRange not being nothrow in debug mode

2016-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15304

Jack Stouffer  changed:

   What|Removed |Added

  Component|phobos  |dmd

--


Re: Voldemort Type Construction Error

2016-01-15 Thread Anon via Digitalmars-d-learn

On Friday, 15 January 2016 at 14:04:50 UTC, Nordlöw wrote:

What have I missed?


In line 126, `static struct Result()` is a template. Either drop 
the parens there, or change the call on line 187 to 
`Result!()(haystack, needles)`.


Re: New D tool releases

2016-01-15 Thread Andrei Alexandrescu via Digitalmars-d-announce

On 01/15/2016 08:24 AM, Suliman wrote:

On Friday, 15 January 2016 at 13:00:14 UTC, Andrei Alexandrescu wrote:

On 01/15/2016 12:52 AM, Vladimir Panteleev wrote:


What will be gained by doing so?

Can we add them as submodules and then just add them to the makefiles /
build scripts? I think this would have been a better way to include
DustMite too.


That would work, too! -- Andrei


Do you have any plans to include all this stuff to DMD distrib?


I have had for a good while and shared them too. The difficulty is in 
the details. -- Andrei




[Issue 15535] Emit error on "goto default" in final switch

2016-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15535

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

https://github.com/D-Programming-Language/dmd/commit/3e245ec352f97705e7fe383f9b6a350c14d29148
fix Issue 15535 - Disallow "goto default" in final switches.

https://github.com/D-Programming-Language/dmd/commit/8968b7bf8a3be265d348e3d5477ec5485938ad02
Merge pull request #5343 from JohanEngelen/fail15535

fix Issue 15535 - Disallow "goto default" in final switches.

--


DCD 0.7.5 released

2016-01-15 Thread Basile B. via Digitalmars-d-announce

just a "hot" fix since previous announce.

https://github.com/Hackerpilot/DCD/releases/tag/v0.7.5


Re: Google Summer of Code 2016

2016-01-15 Thread Craig Dillabaugh via Digitalmars-d

On Friday, 15 January 2016 at 15:11:39 UTC, Tavi wrote:
On Thursday, 14 January 2016 at 18:56:21 UTC, Craig Dillabaugh 
wrote:
Deadline is getting closer, any new project ideas are welcome. 
Starting to get some contact from students now.



FlatBuffers for DLang - http://google.github.io/flatbuffers/


Are you volunteering as a potential mentor :o)


Why does buildHeap sift both down and up?

2016-01-15 Thread Andrei Alexandrescu via Digitalmars-d
I was looking through the heap primitives in std.algorithm.sorting and 
was surprised that buildHeap() at 
https://github.com/D-Programming-Language/phobos/blob/master/std/algorithm/sorting.d#L1289 
uses percolate(). In turn, percolate() has two stages, one that sifts 
up, the other that sifts down.


In fact all you need to do is sift down and stop as soon as the heap 
property is preserved. I created 
https://github.com/D-Programming-Language/phobos/pull/3933 which as far 
as I understand is correct and also faster.


Could experts please illuminate me?


Thanks,

Andrei


Re: DUB & Win-10 SDK / link lib not found

2016-01-15 Thread Robert M. Münch via Digitalmars-d-learn

On 2016-01-15 00:36:57 +, Mike Parker said:

Did you install DMD manually? In that case, you will usually need to 
edit sc.ini to point to the proper VC and Win SDK directories. The DMD 
installer should detect your installation and configure it for you.


I use Digger, hence this might be the cause. And, if one changes the VS 
installation after installing DMD, the manual changes are necessary as 
well. It's just that you need to remember it.


--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster



Re: std.experimental.yesnogc

2016-01-15 Thread Chris via Digitalmars-d
On Thursday, 14 January 2016 at 00:35:53 UTC, Andrei Alexandrescu 
wrote:
Hey folks, I want to push things forward with artifacts 
dedicated to avoiding the GC, and of course my main worry is 
finding the right name.


An obvious choice is std.experimental.nogc but we know from 
Marketing 101 that expressing something as a positive is better 
than a negative. Another possibility is std.experimental.rc, 
but that's imprecise because the artifacts in there will 
contain a variety of things in addition to reference 
counting-related artifacts.


Ideas?


Andrei


Will there also be an article about how to integrate the new 
memory model(s) into existing code? Something along the lines of 
"How to make existing code GC free". It'd be great to have a 
guide that shows how to do it properly.


core.sys.posix.sys.ioctl

2016-01-15 Thread sanjayss via Digitalmars-d-learn
Is there any reason that this module is not complete for 
platforms other than Linux -- the ioctl() system call is common 
across all Unix-like OSes, so it doesn't make sense that this is 
only partially supported. (I am using the latest DMD).


Re: core.sys.posix.sys.ioctl

2016-01-15 Thread Adam D. Ruppe via Digitalmars-d-learn

On Friday, 15 January 2016 at 18:32:22 UTC, sanjayss wrote:
Is there any reason that this module is not complete for 
platforms other than Linux


Nobody has written it up, except the parts they use.


Re: DUB & Win-10 SDK / link lib not found

2016-01-15 Thread Josh Phillips via Digitalmars-d-learn
I also ran into this issue because I upgraded VS and removed the 
old version. A quick re-install with the dmd .exe fixed it.


Re: [dlang.org] new forum design - preview

2016-01-15 Thread anonymous via Digitalmars-d

On 14.01.2016 23:03, tsbockman wrote:

On Thursday, 14 January 2016 at 19:46:33 UTC, anonymous wrote:

Would a border help? http://i.imgur.com/XoPddxr.png

Or how about making the whole area gray? http://i.imgur.com/AXrmKU4.png


Either of those would be an improvement.


I went with the border. It's easier to implement and less likely to be 
controversial. http://beta.forum.dlang.org does not show it yet. I guess 
Vladimir needs to push a button for that.


Re: Google Summer of Code 2016

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

On 2016-01-15 13:36, Andrei Alexandrescu wrote:


I recall there has been one (or two?) unsuccessful attempts. -- Andrei


Yes, twice. It mainly needs to be rangified.

--
/Jacob Carlborg


Re: Voldemort Type Construction Error

2016-01-15 Thread Nordlöw via Digitalmars-d-learn

On Friday, 15 January 2016 at 16:51:24 UTC, Anon wrote:

On Friday, 15 January 2016 at 14:04:50 UTC, Nordlöw wrote:

What have I missed?


In line 126, `static struct Result()` is a template. Either 
drop the parens there, or change the call on line 187 to 
`Result!()(haystack, needles)`.


Ahh, annoying mistake.

Why is this allowed?

/Per


Re: DIP83

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

On 2016-01-15 11:21, Atila Neves wrote:


I used to think we didn't need AST macros until I hit the problems this
DIP tries to address. After 2 years or so, I think you've finally
convinced me Jacob ;)


:D

--
/Jacob Carlborg


Re: Google Summer of Code 2016

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

On 2016-01-15 14:56, Craig Dillabaugh wrote:


Agreed ... Jacob?


I could help, but I have no interest in being an official mentor.

--
/Jacob Carlborg


Re: [dlang.org] new forum design - preview

2016-01-15 Thread anonymous via Digitalmars-d

On 14.01.2016 22:58, ddd wrote:

Cant you do a max-width on the container holding the main page? I agree
it should


I guess there should be a "not" in here?


be an entire 2k display but my laptop the sidebar could easily
push the edge of the window.


The container has a max-width. There's still a padding to the left of 
the subnav so that the grey box is aligned with the D logo above.


Re: [dlang.org] new forum design - preview

2016-01-15 Thread anonymous via Digitalmars-d

On 13.01.2016 18:13, Saurabh Das wrote:

+1 for Sans-serif fonts! I find them much easier to read too :)
(anonymous has assured me that this font will grow on me though).


I only said it grew on me :)


The page is too white. The style looks good on the main website, but on
the forum makes it difficult to read.


Does that mean it's bad for reading longer text? We shouldn't use white 
background for large parts of the main site either then.


Re: local import hijacking

2016-01-15 Thread tsbockman via Digitalmars-d

On Friday, 15 January 2016 at 09:05:27 UTC, Johannes Pfau wrote:
I'm not sure why you even think the OP is using GDC. His bug 
report says he's on windows 10. GDC is not supported on windows 
systems and won't work for anything but trivial programs.


And stack traces is one thing GDC has had proper support way 
before

DMD. We have proper stack traces since June 2013:
https://github.com/D-Programming-GDC/GDC/pull/65
https://github.com/D-Programming-GDC/GDC/commit/fbde3698398f85768bcf918a7a777d81fd0ac3ed


Good to know. I was really trying to ask what front-end version 
he's using, though.


Index a parameter tuple with a run-time index

2016-01-15 Thread Nordlöw via Digitalmars-d-learn

How do I index a function parameter tuple with a run-time index?


Re: Google Summer of Code 2016

2016-01-15 Thread Tavi via Digitalmars-d
On Friday, 15 January 2016 at 16:06:00 UTC, Craig Dillabaugh 
wrote:

On Friday, 15 January 2016 at 15:11:39 UTC, Tavi wrote:
On Thursday, 14 January 2016 at 18:56:21 UTC, Craig Dillabaugh 
wrote:
Deadline is getting closer, any new project ideas are 
welcome. Starting to get some contact from students now.



FlatBuffers for DLang - http://google.github.io/flatbuffers/


Are you volunteering as a potential mentor :o)


I haven't started anything seriously in D yet, so I would not be 
qualified for such mentoring.
Being an efficient cross platform serialization library started 
at Google (already supporting C++, Java, C#, Go, Python and 
JavaScript), may be a good candidate for GSOC.


Re: Glad and WGL

2016-01-15 Thread Josh Phillips via Digitalmars-d-learn

On Friday, 15 January 2016 at 07:37:27 UTC, Josh Phillips wrote:
However I (of course) ran into new errors. Gl functions like 
glGetString and glGetIntegerv cause the program to crash. It 
appears that an opengl context is being created so I'm not sure 
whats causing the problem


For anyone else with this issue I finally figured it out. You 
have to call gladLoadGL AFTER you set the glContext and before 
you call any gl code.


Re: Today was a good day

2016-01-15 Thread Ivan Kazmenko via Digitalmars-d
On Wednesday, 13 January 2016 at 03:38:45 UTC, Andrei 
Alexandrescu wrote:
I tried a static rng but found out that pure functions call 
sort(). Overall I'm not that worried about attacks on sort().


So, sort() is still Introsort (O(n log n) worst case), but topN() 
can show quadratic performance?  Can a similar approach - fall 
back to just sorting in O(n log n) if we recurse too deep - be 
applied to topN() so that it is linear for sane inputs but O(n 
log n) in the worst case?




Re: Index a parameter tuple with a run-time index

2016-01-15 Thread anonymous via Digitalmars-d-learn

On 15.01.2016 21:42, Nordlöw wrote:

How do I index a function parameter tuple with a run-time index?


With a switch and a static foreach:


void f(A...)(size_t i, A a)
{
import std.stdio: writeln;
switch_: switch (i)
{
foreach (iT, T; A)
{
case iT: writeln(T.stringof); break switch_;
}
default: writeln("??"); break;
}
}

void main()
{
f(0, "foo", 42); /* string */
f(1, "foo", 42); /* int */
f(2, "foo", 42); /* ?? */
}



Re: local import hijacking

2016-01-15 Thread tsbockman via Digitalmars-d

On Friday, 15 January 2016 at 08:12:03 UTC, Russel Winder wrote:
"several versions behind" might be a better way if putting 
this. The release cycles of DMD (basically unconstrained),

LDC (basically unconstrained), and GDC (heavily constrained),
mean that "out of date" is a bad marketing phrase.


I wasn't trying to market D; I was simply offering my advice to 
the OP.


I think D is a fantastic language, but I'm not going to downplay 
what I perceive to be its shortcomings.


I find this the wrong view of progress, yet one that remains 
embedded in far too many organizations. It comes in two parts:


1. If a product has changed at all in the last six months, 
other than trivial bug fixes, it isn't stable enough to use in 
production.


2. Once we have stuff out in production, nothing may be changed 
until end of life.


Clearly the opposite extreme of "we must use the very latest of 
every early-access version we can get out hands on" is equally 
dangerous in production. There is a middle ground. Keep 
everything as up to date with formally released versions as 
possible, taking on a continuous change and evolution strategy.


In this mindset D is certainly stable enough for production, it 
is not beta software. DMD is the playground compiler, GDC the 
conservative but solid one, and LDC the core production tool.


That is not my mindset.

I consider D beta-quality because whenever I program in D, I 
encounter bugs (both new and old) in the compiler and/or standard 
library on almost a daily basis. This has not been my experience 
with other languages that have more money behind them, like Java 
(never hit a bug in my life, that I'm aware of), C# (once?), or 
C++ (so byzantine that I'm not sure I would notice - that's why I 
prefer D :-) ).


None of the bugs I've hit recently has been too difficult to 
diagnose and work around, which is why I no longer consider D 
alpha-quality. I, personally, would be comfortable using D in 
production - but that's because I have a high tolerance for the 
kinds of minor issues beta software brings with it; not everyone 
does.


And to be clear - I think GDC is awesome. But I also think that 
someone with a low tolerance for issues like the one the OP 
complained about will be happier using DMD or LDC, as I find the 
newer front-ends noticeably less buggy in day-to-day use.


Horses for courses.


Re: Premake officially gains D support

2016-01-15 Thread Dibyendu Majumdar via Digitalmars-d

On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote:
Perhaps of interest, I have been maintaining D support in 
Premake for

years (as an extension).
It was finally merged into mainline... so Premake now officially
supports D out-of-the-box. Huzzah!


Curious to know if anyone here uses Premake, or cares...?


Hi - Thanks for this; I currently use CMake for C/C++ projects, 
but due to lack of support for D in CMake, planning to migrate to 
premake.


Regards
Dibyendu


Re: core.sys.posix.sys.ioctl

2016-01-15 Thread sanjayss via Digitalmars-d-learn

On Friday, 15 January 2016 at 18:34:14 UTC, Adam D. Ruppe wrote:

On Friday, 15 January 2016 at 18:32:22 UTC, sanjayss wrote:
Is there any reason that this module is not complete for 
platforms other than Linux


Nobody has written it up, except the parts they use.


Is the contribution process straightforward. Since I am mucking 
around in this area on OSX, I could attempt creating a more 
complete ioctl module for OSX...unless ofcourse someone else has 
already tried it and there are too many gotchas or there already 
have been too many discussions on the right way to do this and 
there is no consensus (I don't want to get into too much of these 
types of discussions -- not enough time).


Re: Index a parameter tuple with a run-time index

2016-01-15 Thread Meta via Digitalmars-d-learn

On Friday, 15 January 2016 at 20:48:39 UTC, anonymous wrote:

On 15.01.2016 21:42, Nordlöw wrote:
How do I index a function parameter tuple with a run-time 
index?


With a switch and a static foreach:


void f(A...)(size_t i, A a)
{
import std.stdio: writeln;
switch_: switch (i)
{
foreach (iT, T; A)
{
case iT: writeln(T.stringof); break switch_;
}
default: writeln("??"); break;
}
}

void main()
{
f(0, "foo", 42); /* string */
f(1, "foo", 42); /* int */
f(2, "foo", 42); /* ?? */
}



And of course I'm proven wrong as soon as I post :) Sometimes I 
forget how powerful D's  code generation abilities are.


Re: Index a parameter tuple with a run-time index

2016-01-15 Thread Meta via Digitalmars-d-learn

On Friday, 15 January 2016 at 20:42:47 UTC, Nordlöw wrote:

How do I index a function parameter tuple with a run-time index?


I believe it's impossible because a parameter tuple is not a 
runtime entity. If it was an expression tuple (a compile-time 
tuple of only values, no types or symbols) and all of the values 
had a common base type, you could put it in an array and index 
that.


Re: core.sys.posix.sys.ioctl

2016-01-15 Thread Adam D. Ruppe via Digitalmars-d-learn

On Friday, 15 January 2016 at 21:21:26 UTC, sanjayss wrote:

Is the contribution process straightforward.


For this, yes. Should be able to just fork druntime and edit the 
ioctl.d that exists to flesh it out to be more complete.


Make sure it matches the original C names, values, etc., and 
there should be no real friction in getting it in (just remember 
to use spaces rather than tabs lol)


Re: Index a parameter tuple with a run-time index

2016-01-15 Thread Justin Whear via Digitalmars-d-learn
On Fri, 15 Jan 2016 20:52:46 +, Meta wrote:

> And of course I'm proven wrong as soon as I post :) Sometimes I forget
> how powerful D's  code generation abilities are.

Username doesn't check out, :(


Re: Index a parameter tuple with a run-time index

2016-01-15 Thread Meta via Digitalmars-d-learn

On Friday, 15 January 2016 at 21:47:21 UTC, Justin Whear wrote:

On Fri, 15 Jan 2016 20:52:46 +, Meta wrote:

And of course I'm proven wrong as soon as I post :) Sometimes 
I forget how powerful D's  code generation abilities are.


Username doesn't check out, :(


Huh?


Re: Variable below zero but if statement doesn't grab?

2016-01-15 Thread Basile B. via Digitalmars-d-learn

On Tuesday, 5 January 2016 at 23:52:05 UTC, Basile B. wrote:

On Monday, 28 December 2015 at 18:02:53 UTC, jkpl wrote:

On Monday, 28 December 2015 at 15:50:06 UTC, Basile B. wrote:

On Monday, 28 December 2015 at 15:07:08 UTC, jkpl wrote:

On Sunday, 27 December 2015 at 16:00:34 UTC, jkpl wrote:

On Sunday, 27 December 2015 at 15:53:55 UTC, TheDGuy wrote:

Any idea what i am doing wrong?
https://www.youtube.com/watch?v=j_VCa-5VeP8


You could post the code also, personnaly I'm always almost 
at 2 meters from my screen, with zoom, so I can't read the 
code...


I work more or less lying on a futon. Desks are so cheesy...


Anarchism is comfy...


when I'm tired with the conformism I just let my head go on 
the pillow and I sleep...

(snoring)

Even if I dont't think that you have won:
https://youtu.be/Uj_7kTwRMKE?t=2m35s


https://www.youtube.com/watch?v=YgSPaXgAdzE

I'm a loser baby, so why don't you leave me ?
You luv losers ? And you don't leave them ?
Nurse syndrom.


to the MI6:

It's a english daddy boy who tought me what is a papirosn

https://en.wikipedia.org/wiki/Belomorkanal

TIP to englishmen: you should learn how to behave in France.


[Issue 15569] New: Implicit fall-through does not cause an error

2016-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15569

  Issue ID: 15569
   Summary: Implicit fall-through does not cause an error
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: regression
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: j...@kedrahos.com

Created attachment 1574
  --> https://issues.dlang.org/attachment.cgi?id=1574=edit
Example code

Example code attached.

C-Style implicit fall-through should be an error. The attached file compiles
successfully (it shouldn't) and behaves exactly like C/C++ with implicit
fall-through.

Known versions affected: DMD 2.069

It even compiles and runs on the interactive compiler at dlang.org.

--


[Issue 15569] Implicit fall-through does not cause an error

2016-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15569

Jake Drahos  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Jake Drahos  ---
Found issue 14411, which is a duplicate.

*** This issue has been marked as a duplicate of issue 14411 ***

--


[Issue 14411] switch statement: docs/behavior differ

2016-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14411

Jake Drahos  changed:

   What|Removed |Added

 CC||j...@kedrahos.com

--- Comment #5 from Jake Drahos  ---
*** Issue 15569 has been marked as a duplicate of this issue. ***

--


Re: Google Summer of Code 2016

2016-01-15 Thread Craig Dillabaugh via Digitalmars-d

On Friday, 15 January 2016 at 20:20:29 UTC, Jacob Carlborg wrote:

On 2016-01-15 13:36, Andrei Alexandrescu wrote:

I recall there has been one (or two?) unsuccessful attempts. 
-- Andrei


Yes, twice. It mainly needs to be rangified.


How much work do you think that would involve? Would it be enough 
to qualify as a project (I am guessing something in the range of 
150-300 hours of total work, including getting up to speed, 
design, implementation, testing, would be suitable).


Re: Google Summer of Code 2016

2016-01-15 Thread Craig Dillabaugh via Digitalmars-d

On Friday, 15 January 2016 at 20:46:59 UTC, Tavi wrote:
On Friday, 15 January 2016 at 16:06:00 UTC, Craig Dillabaugh 
wrote:

On Friday, 15 January 2016 at 15:11:39 UTC, Tavi wrote:
On Thursday, 14 January 2016 at 18:56:21 UTC, Craig 
Dillabaugh wrote:
Deadline is getting closer, any new project ideas are 
welcome. Starting to get some contact from students now.



FlatBuffers for DLang - http://google.github.io/flatbuffers/


Are you volunteering as a potential mentor :o)


I haven't started anything seriously in D yet, so I would not 
be qualified for such mentoring.
Being an efficient cross platform serialization library started 
at Google (already supporting C++, Java, C#, Go, Python and 
JavaScript), may be a good candidate for GSOC.


Thanks then for the suggestion.  It is my policy to always ask if 
someone wants to mentor!


Re: So... let's document dmd

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

On Saturday, 16 January 2016 at 05:11:57 UTC, Joakim wrote:
The ddmd lexer is already on dub, just have to add the parser 
next:


http://code.dlang.org/packages/ddmd


You missed the main point of my question.


Adam D. Ruppe's Minigui using example

2016-01-15 Thread Andre Polykanine via Digitalmars-d-learn

Hi everyone,
I would like to use Minigui 
(https://github.com/adamdruppe/arsd/blob/master/minigui.d) and 
test it for accessibility.
Does anyone have an actual example of, say, a simple form with a 
set of radio buttons or check boxes to start with?

Thanks in advance!


Re: dmd installation question

2016-01-15 Thread Brad Anderson via Digitalmars-d
On Saturday, 16 January 2016 at 01:16:22 UTC, Dibyendu Majumdar 
wrote:

Hi

I have downloaded and installed DMD on a Windows 10 64-bit 
machine. When I try to build my app in Visual Studio - I am 
getting an error:


Error: cannot find source code for runtime library file 
'object.d'
   dmd might not be correctly installed. Run 'dmd -man' for 
installation instructions.

   config file: C:\D\dmd2\windows\bin\sc.ini
Specify path to file 'object.d' with -I switch

Upon investigating it appears that the sc.ini file is not 
readable by the user.


If I log in as Administrator then the build works.

What am I doing wrong?

Regards


Probably this:

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

I'm going to try to get around to fixing that and making an 
installer for LDC this weekend.


Re: Adam D. Ruppe's Minigui using example

2016-01-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 16 January 2016 at 01:27:32 UTC, Andre Polykanine 
wrote:
Does anyone have an actual example of, say, a simple form with 
a set of radio buttons or check boxes to start with?

Thanks in advance!


Sort of. I still haven't used it in a real world program so it 
isn't complete but here's one of my test programs:


---
import arsd.minigui;

void main() {
auto window = new MainWindow();

auto exitAction = new Action("E");
exitAction.triggered ~= { window.close(); };

window.statusTip = "D ROX!";

auto button = new Checkbox("Uses D!", window);
button.isChecked = true;

auto hlayout = new HorizontalLayout(window);
auto gb = new Fieldset("Type", hlayout);
auto gb2 = new Fieldset("cool", hlayout);

auto boxlol1 = new Radiobox("Test", gb);
auto boxlol2 = new Radiobox("Test2", gb2);

auto boxlol3 = new Radiobox("Test", gb);
auto boxlol4 = new Radiobox("Test2", gb2);

auto group = new MutuallyExclusiveGroup();
group.addMember(new Radiobox("Heavyweight", gb));

auto btn = group.addMember(new Radiobox("Small library", 
gb));

btn.isChecked = true;
btn.statusTip = "205 KB exe on Windows";

//auto spinner = new Spinner(window);
ComboboxBase cb = new DropDownSelection(window);
cb.addOption("test");
cb.addOption("cool");
cb.setSelection(1);

//cb.addEventListener("changed", (Event ev) {
//auto bm = new MessageBox("changed " ~ 
cb.options[cb.selection]);

//});

// FIXME: adding this to gb2 instead of window causes wtf 
stuff

cb = new ComboBox(window);
cb.addOption("test");
cb.addOption("cool");
cb.setSelection(1);


cb = new FreeEntrySelection(window);
cb.addOption("test");
cb.addOption("cool");
cb.setSelection(1);

auto lineEdit = new LineEdit(window);

auto menu = new MenuBar();
auto fileMenu = new Menu("");
auto exitButton = fileMenu.addItem(new 
MenuItem(exitAction));


menu.addItem(fileMenu);

window.loop();
}
---


On Windows, it uses the native controls, so it should work 
reasonably well, though on Linux it does its own thing and is far 
from complete.




BTW simplewindow doesn't seem to compile on newest dmd because of 
the new core.sys.windows.windows so I'll have to update that if 
you're on the newest release...




Re: So... let's document dmd

2016-01-15 Thread Joakim via Digitalmars-d

On Friday, 15 January 2016 at 23:58:32 UTC, Jack Stouffer wrote:
On Friday, 15 January 2016 at 04:53:16 UTC, Andrei Alexandrescu 
wrote:

https://github.com/D-Programming-Language/dlang.org/pull/1196
https://github.com/D-Programming-Language/dmd/pull/5352

Destroy!!

Andrei


Since dmd is now in D, is there any reason to not allow people 
to import from it while using dmd? Wouldn't it make anyone's 
life who wanted to parse D code easier by just doing


import ddmd.parser; (or what ever it is)

and use the actual parser?


The ddmd lexer is already on dub, just have to add the parser 
next:


http://code.dlang.org/packages/ddmd


Fuck the brits

2016-01-15 Thread Basile B. via Digitalmars-d-learn

On Friday, 15 January 2016 at 22:16:09 UTC, Basile B. wrote:

On Tuesday, 5 January 2016 at 23:52:05 UTC, Basile B. wrote:

On Monday, 28 December 2015 at 18:02:53 UTC, jkpl wrote:

On Monday, 28 December 2015 at 15:50:06 UTC, Basile B. wrote:

On Monday, 28 December 2015 at 15:07:08 UTC, jkpl wrote:

On Sunday, 27 December 2015 at 16:00:34 UTC, jkpl wrote:

On Sunday, 27 December 2015 at 15:53:55 UTC, TheDGuy wrote:

Any idea what i am doing wrong?
https://www.youtube.com/watch?v=j_VCa-5VeP8


You could post the code also, personnaly I'm always almost 
at 2 meters from my screen, with zoom, so I can't read the 
code...


I work more or less lying on a futon. Desks are so cheesy...


Anarchism is comfy...


when I'm tired with the conformism I just let my head go on 
the pillow and I sleep...

(snoring)

Even if I dont't think that you have won:
https://youtu.be/Uj_7kTwRMKE?t=2m35s


https://www.youtube.com/watch?v=YgSPaXgAdzE

I'm a loser baby, so why don't you leave me ?
You luv losers ? And you don't leave them ?
Nurse syndrom.


to the MI6:

It's a english daddy boy who tought me what is a papirosn

https://en.wikipedia.org/wiki/Belomorkanal

TIP to englishmen: you should learn how to behave in France.


Like the whole world can see today, you have took an anwesome 
decision in 1948. Well managed. very clever I'd say...


Re: local import hijacking

2016-01-15 Thread tsbockman via Digitalmars-d

On Saturday, 16 January 2016 at 00:03:31 UTC, Meta wrote:
And the build is failing on DAutoTest with nasty assert errors. 
It built fine for me locally, anyone know what might be the 
problem?


Error - file 'dimport.d' contains windows line endings at line 1
...
*** [checkwhitespace] Error 1



Re: DIP83

2016-01-15 Thread rsw0x via Digitalmars-d

On Friday, 15 January 2016 at 11:58:19 UTC, Márcio Martins wrote:

On Thursday, 14 January 2016 at 14:28:05 UTC, deadalnix wrote:

[...]


True that. I think it's great to keep evolving the language and 
making it better, on the other hand, if D is to get serious 
adoption, then everything, especially the basics like 
debuggability, quality of codegen and compiler bugs will need 
to be solid. D as a language is already powerful enough to 
thrash the competition, this is why we love it. But the reason 
it's experiencing slow adoption, is because of tooling and 
general implementation quality, and the lower threshold of 
tolerance from the general population.


I think what he was pointing out is that many D features are 
currently barely functioning or not working and adding more 
features is just a waste of time.


Re: [dlang.org] new forum design - preview

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

On Friday, 15 January 2016 at 20:33:32 UTC, anonymous wrote:

On 13.01.2016 18:13, Saurabh Das wrote:

+1 for Sans-serif fonts! I find them much easier to read too :)
(anonymous has assured me that this font will grow on me 
though).


I only said it grew on me :)

The page is too white. The style looks good on the main 
website, but on

the forum makes it difficult to read.


Does that mean it's bad for reading longer text? We shouldn't 
use white background for large parts of the main site either 
then.


I just saw the beta forum on my mobile for the first time and its 
actually looking very good. Have there been some changes? It's 
easily readable now. I'll check it on PC later in the day.


I also noticed that the content of posts of the forum are in a 
different font than the restof the website. I prefer the font 
used for the contents - much neater IMO.


It wasn't the white BG that was difficult to read, it was the 
grey regions where the text didn't stand out.


SD



Re: local import hijacking

2016-01-15 Thread Meta via Digitalmars-d

On Friday, 15 January 2016 at 23:57:51 UTC, Meta wrote:
On Thursday, 14 January 2016 at 20:37:54 UTC, Andrei 
Alexandrescu wrote:

On 01/14/2016 02:10 PM, Joakim wrote:
Wow, can't believe his PR has been sitting unreviewed for 5 
months:


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


I notice Kenji has been absent for a while, could anyone take 
over that PR? -- Andrei


We're live! Please review: 
https://github.com/D-Programming-Language/dmd/pull/5353


And the build is failing on DAutoTest with nasty assert errors. 
It built fine for me locally, anyone know what might be the 
problem?


Re: local import hijacking

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

On 01/15/2016 06:57 PM, Meta wrote:

On Thursday, 14 January 2016 at 20:37:54 UTC, Andrei Alexandrescu wrote:

On 01/14/2016 02:10 PM, Joakim wrote:

Wow, can't believe his PR has been sitting unreviewed for 5 months:

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


I notice Kenji has been absent for a while, could anyone take over
that PR? -- Andrei


We're live! Please review:
https://github.com/D-Programming-Language/dmd/pull/5353


Thanks! "All checks have failed" -- Andrei


Re: So... let's document dmd

2016-01-15 Thread tsbockman via Digitalmars-d

On Saturday, 16 January 2016 at 05:29:03 UTC, Jack Stouffer wrote:

On Saturday, 16 January 2016 at 05:11:57 UTC, Joakim wrote:
The ddmd lexer is already on dub, just have to add the parser 
next:


http://code.dlang.org/packages/ddmd


You missed the main point of my question.


I'm confused as to your point as well. Perhaps you could rephrase?


Re: So... let's document dmd

2016-01-15 Thread Joakim via Digitalmars-d

On Saturday, 16 January 2016 at 05:36:23 UTC, tsbockman wrote:
On Saturday, 16 January 2016 at 05:29:03 UTC, Jack Stouffer 
wrote:

On Saturday, 16 January 2016 at 05:11:57 UTC, Joakim wrote:
The ddmd lexer is already on dub, just have to add the parser 
next:


http://code.dlang.org/packages/ddmd


You missed the main point of my question.


I'm confused as to your point as well. Perhaps you could 
rephrase?


I think he's trying to emphasize that he'd like it to come with 
dmd.  There was talk of putting the lexer/parser into phobos, but 
I believe dub was chosen as a staging ground for people to play 
with it first.  So if you want to use the lexer/parser, use it 
from dub for now, then push for its inclusion into phobos later.


Re: local import hijacking

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

On Friday, 15 January 2016 at 08:15:50 UTC, Iain Buclaw wrote:
On 15 Jan 2016 9:12 am, "Russel Winder via Digitalmars-d" < 
digitalmars-d@puremagic.com> wrote:


In this mindset D is certainly stable enough for production, 
it is not beta software. DMD is the playground compiler, GDC 
the conservative but solid one, and LDC the core production 
tool.


--
Russel.



Thanks for putting it so eloquently, Russell.

Iain.


The difficulty is that gdc includes a lot of long-standing bugs 
that are fixed upstream.


Re: local import hijacking

2016-01-15 Thread Meta via Digitalmars-d

On Saturday, 16 January 2016 at 00:07:59 UTC, tsbockman wrote:

On Saturday, 16 January 2016 at 00:03:31 UTC, Meta wrote:
And the build is failing on DAutoTest with nasty assert 
errors. It built fine for me locally, anyone know what might 
be the problem?


Error - file 'dimport.d' contains windows line endings at line 1
...
*** [checkwhitespace] Error 1


I'm talking about this: 
https://travis-ci.org/D-Programming-Language/dmd/jobs/102725760#L342


dmd installation question

2016-01-15 Thread Dibyendu Majumdar via Digitalmars-d

Hi

I have downloaded and installed DMD on a Windows 10 64-bit 
machine. When I try to build my app in Visual Studio - I am 
getting an error:


Error: cannot find source code for runtime library file 'object.d'
   dmd might not be correctly installed. Run 'dmd -man' for 
installation instructions.

   config file: C:\D\dmd2\windows\bin\sc.ini
Specify path to file 'object.d' with -I switch

Upon investigating it appears that the sc.ini file is not 
readable by the user.


If I log in as Administrator then the build works.

What am I doing wrong?

Regards


Re: dmd installation question

2016-01-15 Thread Dibyendu Majumdar via Digitalmars-d
On Saturday, 16 January 2016 at 01:16:22 UTC, Dibyendu Majumdar 
wrote:
I have downloaded and installed DMD on a Windows 10 64-bit 
machine. When I try to build my app in Visual Studio - I am 
getting an error:


Error: cannot find source code for runtime library file 
'object.d'
   dmd might not be correctly installed. Run 'dmd -man' for 
installation instructions.

   config file: C:\D\dmd2\windows\bin\sc.ini
Specify path to file 'object.d' with -I switch



I used the Installer by the way.


Re: [dlang.org] new forum design - preview

2016-01-15 Thread Vladimir Panteleev via Digitalmars-d

On Friday, 15 January 2016 at 15:25:42 UTC, Jacob Carlborg wrote:

On 2016-01-15 10:16, Vladimir Panteleev wrote:

I added a new widget at the top of the basic view mode's post 
list:


http://beta.forum.dlang.org/thread/op.xz6shob04sdys0@nicolass-macbook-pro.local


Why does the text get smaller when width of the window gets 
smaller (when it gets small enough).


To accommodate small screens. Without this the font size on 
phones and tablets is too large to be useful.


Re: Beta D 2.070.0-b1

2016-01-15 Thread Adam D. Ruppe via Digitalmars-d-announce
Has anyone built a Windows program with the beta? I tried and got 
undefined identifier HWND, but have been unable to minimize the 
test case and it might be just my install not being clean.


Re: [dlang.org] new forum design - preview

2016-01-15 Thread Kapps via Digitalmars-d
On Wednesday, 13 January 2016 at 06:01:41 UTC, Vladimir Panteleev 
wrote:

http://beta.forum.dlang.org/

https://github.com/CyberShadow/DFeed/pull/51


The bold fonts, such as unread threads are way too wide, I find 
it distracting and hard to read.


I'm not sold on red links everywhere. It goes against what most 
sites do with making red links be things that stand out, and it's 
seriously distracting. I get that it's the theme, but it's just 
too much red.


There's too little usable space. On my 27" 5k iMac, it's a huge 
amount of white space. The argument is that people don't want to 
look at huge lines, but generally these high resolution monitors 
are zoomed in or have DPI scaling. If you're using a 40" 4k 
monitor, you're probably not having your browser full screen.


Re: [dlang.org] new forum design - preview

2016-01-15 Thread Vladimir Panteleev via Digitalmars-d

On Saturday, 16 January 2016 at 06:27:03 UTC, Kapps wrote:
There's too little usable space. On my 27" 5k iMac, it's a huge 
amount of white space. The argument is that people don't want 
to look at huge lines, but generally these high resolution 
monitors are zoomed in or have DPI scaling. If you're using a 
40" 4k monitor, you're probably not having your browser full 
screen.


The maximum page width should be proportional to the text size.



Re: Voldemort Type Construction Error

2016-01-15 Thread Kapps via Digitalmars-d-learn

On Friday, 15 January 2016 at 20:04:47 UTC, Nordlöw wrote:

On Friday, 15 January 2016 at 16:51:24 UTC, Anon wrote:

On Friday, 15 January 2016 at 14:04:50 UTC, Nordlöw wrote:

What have I missed?


In line 126, `static struct Result()` is a template. Either 
drop the parens there, or change the call on line 187 to 
`Result!()(haystack, needles)`.


Ahh, annoying mistake.

Why is this allowed?

/Per


At least for functions, making them templates provides some 
benefits like inferring attributes. Not sure if it behaves the 
same way on structs by making all functions within it templates.




Re: So... let's document dmd

2016-01-15 Thread Jack Stouffer via Digitalmars-d
On Friday, 15 January 2016 at 04:53:16 UTC, Andrei Alexandrescu 
wrote:

https://github.com/D-Programming-Language/dlang.org/pull/1196
https://github.com/D-Programming-Language/dmd/pull/5352

Destroy!!

Andrei


Since dmd is now in D, is there any reason to not allow people to 
import from it while using dmd? Wouldn't it make anyone's life 
who wanted to parse D code easier by just doing


import ddmd.parser; (or what ever it is)

and use the actual parser?


Re: local import hijacking

2016-01-15 Thread Meta via Digitalmars-d
On Thursday, 14 January 2016 at 20:37:54 UTC, Andrei Alexandrescu 
wrote:

On 01/14/2016 02:10 PM, Joakim wrote:
Wow, can't believe his PR has been sitting unreviewed for 5 
months:


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


I notice Kenji has been absent for a while, could anyone take 
over that PR? -- Andrei


We're live! Please review: 
https://github.com/D-Programming-Language/dmd/pull/5353


DCD and dfmt bugfix releases

2016-01-15 Thread Brian Schott via Digitalmars-d-announce

DCD 0.7.5: https://github.com/Hackerpilot/DCD/releases/tag/v0.7.5

If you're on DCD 0.7.4, upgrade to 0.7.5 to avoid a crash.


dfmt 0.4.4: github.com/Hackerpilot/dfmt/releases/tag/v0.4.4

The new dfmt release fixes some spacing and alignment bugs.


Re: dmd installation question

2016-01-15 Thread Brad Anderson via Digitalmars-d

On Saturday, 16 January 2016 at 02:07:13 UTC, Brad Anderson wrote:
On Saturday, 16 January 2016 at 01:16:22 UTC, Dibyendu Majumdar 
wrote:

[...]


Probably this:

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

I'm going to try to get around to fixing that and making an 
installer for LDC this weekend.


Reading more carefully it may not be the same bug.


Re: DIP83

2016-01-15 Thread rsw0x via Digitalmars-d

On Friday, 15 January 2016 at 13:20:18 UTC, deadalnix wrote:

On Friday, 15 January 2016 at 11:11:41 UTC, Tofu Ninja wrote:

On Thursday, 14 January 2016 at 14:28:05 UTC, deadalnix wrote:

We don't have line number in stack traces


Huh? We dont have line numbers in stack traces? I have line 
numbers, I am using latest dmd, or are you talking about one 
of the other compilers?


Well I don't, both on OSX and linux, using the latest release. 
On linux I can do the addr2line dance, but on OSX I can't even 
do that as it require information that are gone once the 
program terminate.


dmd generates stack traces on linux now
I think it was either ldc or gdc that did before.


Re: [dlang.org] new forum design - preview

2016-01-15 Thread tsbockman via Digitalmars-d
On Friday, 15 January 2016 at 09:16:15 UTC, Vladimir Panteleev 
wrote:
I added a new widget at the top of the basic view mode's post 
list:


http://beta.forum.dlang.org/thread/op.xz6shob04sdys0@nicolass-macbook-pro.local


Cool. I like the "Thread overview" tree thing.


Re: [dlang.org] new forum design - preview

2016-01-15 Thread Vladimir Panteleev via Digitalmars-d

On Saturday, 16 January 2016 at 06:27:03 UTC, Kapps wrote:
The bold fonts, such as unread threads are way too wide, I find 
it distracting and hard to read.


I'm not sold on red links everywhere. It goes against what most 
sites do with making red links be things that stand out, and 
it's seriously distracting. I get that it's the theme, but it's 
just too much red.


Would be great if you could open up your browser's web developer 
console and mess with the styles (or just grab the source) and 
post some screenshots of what you think would look better.


Re: [dlang.org] new forum design - preview

2016-01-15 Thread Vladimir Panteleev via Digitalmars-d

On Thursday, 14 January 2016 at 22:40:36 UTC, Zardoz wrote:
On Wednesday, 13 January 2016 at 06:01:41 UTC, Vladimir 
Panteleev wrote:

http://beta.forum.dlang.org/

https://github.com/CyberShadow/DFeed/pull/51


I like the new layout, but I like the actual color scheme.


Any chance you could make a mock-up of what that could look like?


Re: So... let's document dmd

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

On Saturday, 16 January 2016 at 05:36:23 UTC, tsbockman wrote:
On Saturday, 16 January 2016 at 05:29:03 UTC, Jack Stouffer 
wrote:

On Saturday, 16 January 2016 at 05:11:57 UTC, Joakim wrote:
The ddmd lexer is already on dub, just have to add the parser 
next:


http://code.dlang.org/packages/ddmd


You missed the main point of my question.


I'm confused as to your point as well. Perhaps you could 
rephrase?


dmd is now in D; theoretically that should allow for other 
projects to import from it like a normal D project. So why not 
make all of the ddmd modules available from any code that is 
complied with it, i.e. just like Phobos?


The parser was just an example, there are any number of things 
that one could use from the code base.


Re: New D tool releases

2016-01-15 Thread Basile B. via Digitalmars-d-announce

On Friday, 15 January 2016 at 07:17:42 UTC, Brian Schott wrote:

On Friday, 15 January 2016 at 06:27:23 UTC, Basile B. wrote:

By chance it' has happend again while the console was opened:


The announce newsgroup is not a bug tracker, but this is: 
https://github.com/Hackerpilot/DCD/issues


Sorry my intention was just to get the attention of other users 
since I'm not sure if it comes from dmd 2.070-b1. Also I won't be 
able to file a good issue before several days, anyway maybe it'll 
be enough.


Re: local import hijacking

2016-01-15 Thread Johannes Pfau via Digitalmars-d
Am Thu, 14 Jan 2016 21:36:01 +
schrieb tsbockman :

> On Thursday, 14 January 2016 at 14:56:39 UTC, Byron Heads wrote:
> > std.net.curl.CurlException@std\net\curl.d(4033): Couldn't 
> > resolve host name on handle 2188398
> > 
> > 0x00405F65
> > 0x00405F10
> > 0x0040275B
> > 0x0040259E
> > 0x0040202B
> > 0x00402035
> > 0x004257A7
> > 0x004256A8
> > 0x0041B7FF
> > 0x769F337A in BaseThreadInitThunk
> > 0x77429882 in RtlInitializeExceptionChain
> > 0x77429855 in RtlInitializeExceptionChain
> >
> > This was a 4 hour debug which made it worse as I was adding 
> > more trace calls to figure out what was going on.  My boss is 
> > now on the fence, to many compiler bugs with D, he asked me to 
> > switch to Java if I have to deal to many more issues like 
> > this.. (https://issues.dlang.org/show_bug.cgi?id=15457  another 
> > issue we had)
> >
> > And this awesome stack trace helped me so much to track this 
> > issue down...  
> 
> What compiler are you using?
> 
> The useless stack traces got fixed in a fairly recent version of 
> DMD - as have many, many other issues which are still present in 
> GDC, whose front end is several versions out-of-date.


I'm not sure why you even think the OP is using GDC. His bug report
says he's on windows 10. GDC is not supported on windows systems and
won't work for anything but trivial programs.

And stack traces is one thing GDC has had proper support way before
DMD. We have proper stack traces since June 2013:
https://github.com/D-Programming-GDC/GDC/pull/65
https://github.com/D-Programming-GDC/GDC/commit/fbde3698398f85768bcf918a7a777d81fd0ac3ed



Re: local import hijacking

2016-01-15 Thread Iain Buclaw via Digitalmars-d
On 15 Jan 2016 9:12 am, "Russel Winder via Digitalmars-d" <
digitalmars-d@puremagic.com> wrote:
>
> In this mindset D is certainly stable enough for production, it is not
> beta software. DMD is the playground compiler, GDC the conservative but
> solid one, and LDC the core production tool.
>
> --
> Russel.
>

Thanks for putting it so eloquently, Russell.

Iain.


  1   2   >