[Issue 15803] std.file should support sub-second file time precision on POSIX

2016-03-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15803 --- Comment #1 from Vladimir Panteleev --- Setting timestamps is already done with full resolution (toTimeVal + utimes). --

[Issue 15807] Array!bool insertBack is broken

2016-03-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15807 --- Comment #1 from Dragos Carp --- Fixed with https://github.com/D-Programming-Language/phobos/pull/4091 --

Re: the most D-ish GUI library

2016-03-18 Thread Saša Janiška via Digitalmars-d
Vadim Lopatin writes: > Some of such widgets are easy to implement. > Switch - just need to add new style for button to theme. You already did it, right? > Switch, Stack, Notebook, HeaderBar - new styles for TabHeader, > TabHost, TabWidget Can be implemented in one

Re: Why is this not a warning?

2016-03-18 Thread tsbockman via Digitalmars-d
On Thursday, 17 March 2016 at 06:55:34 UTC, Shachar Shemesh wrote: On 16/03/16 23:50, tsbockman wrote: On Wednesday, 16 March 2016 at 16:40:49 UTC, Shachar Shemesh wrote: ... People who are marginally familiar with integer promotion will not be surprised to know that the program prints

Re: Stack Overflow: Developer Survey Results - 2016

2016-03-18 Thread Adam D. Ruppe via Digitalmars-d
I doubt this is a wholly representative sample because I'm guessing a lot of people don't bother answering Stack Overflow surveys. I know I didn't, and I go to the site almost daily. But lol, if the average student has 3.4 years experience, perhaps I should revise my numbers. On job

Re: D could catch this wave: web assembly

2016-03-18 Thread Adi via Digitalmars-d
On Thursday, 18 June 2015 at 08:05:48 UTC, John Colvin wrote: This appears to have involvement from all major browser vendors, which provides hope it might actually catch on properly. An llvm backend will be created which will compile to "wasm", hopefully LDC and/or SDC could glue to this.

ketmar's debugging terminal console...

2016-03-18 Thread Laeeth Isharc via Digitalmars-d
On Friday, 3 October 2014 at 14:42:23 UTC, ketmar wrote: anyway, here it is: http://repo.or.cz/w/iv.d.git/blob_plain/HEAD:/cmdcon.d please note that this is not very well tested. i'm keeping it just for nostalgic reasons. ah, and you can ignore the license. consider that code as public

Re: D could catch this wave: web assembly

2016-03-18 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 15 March 2016 at 13:01:31 UTC, CraigDillabaugh wrote: Maybe you can provide the students with fresh vegetables then :o) GSoC == Google Summer of Cultivation?

Stack Overflow: Developer Survey Results - 2016

2016-03-18 Thread Darkfeign via Digitalmars-d
http://stackoverflow.com/research/developer-survey-2016 Developer survey results are in from Stack Overflow. Particularly interested to see is Rust topping the 'Most Loved' category, with Go just below at #5. Interested in hearing other peoples' thoughts on the results and what you found most

Re: size_t index=-1;

2016-03-18 Thread Marc Schütz via Digitalmars-d-learn
On Thursday, 17 March 2016 at 17:09:46 UTC, Steven Schveighoffer wrote: On 3/16/16 6:37 PM, Mathias Lang wrote: On Wednesday, 16 March 2016 at 21:49:05 UTC, Steven Schveighoffer wrote: No, please don't. Assigning a signed value to an unsigned (and vice versa) is very useful, and there is no

Re: Females in the community.

2016-03-18 Thread Ali Çehreli via Digitalmars-d
On 03/17/2016 09:17 AM, Karabuta wrote: > Are there any female programmers using D? :) StackOverflow has just published their developer survey. There are close to 6% female coders who answered their survey: http://stackoverflow.com/research/developer-survey-2016#developer-profile-gender

Re: Why is this not a warning?

2016-03-18 Thread Shachar Shemesh via Digitalmars-d
On 16/03/16 23:50, tsbockman wrote: On Wednesday, 16 March 2016 at 16:40:49 UTC, Shachar Shemesh wrote: ... People who are marginally familiar with integer promotion will not be surprised to know that the program prints "256". What is surprising to me is that this produced neither error nor

Re: Obtaining argument names in (variadic) functions

2016-03-18 Thread Edwin van Leeuwen via Digitalmars-d-learn
On Thursday, 17 March 2016 at 13:53:00 UTC, JR wrote: Interesting, any idea if it is possible to do assignment within template.. Either: printVars!(int abc=5,string def="58")(); or something like printVars!("abc","def",ghi)(5,"58"); What would the use-cases for those be? I don't think the

Re: size_t index=-1;

2016-03-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/16/16 6:37 PM, Mathias Lang wrote: On Wednesday, 16 March 2016 at 21:49:05 UTC, Steven Schveighoffer wrote: No, please don't. Assigning a signed value to an unsigned (and vice versa) is very useful, and there is no good reason to break this. I'm not talking about removing it completely.

Re: the most D-ish GUI library

2016-03-18 Thread Kagamin via Digitalmars-d
On Tuesday, 15 March 2016 at 09:35:07 UTC, Luis wrote: Suddenly I have interest on DWT. I thought that was a simple copy of SWT, not being native... Swing is custom-drawn like dlangui, Qt, GTK and WPF. SWT is a relatively thin wrapper over system controls like wxWidgets, IUP and DFL.

Re: size_t index=-1;

2016-03-18 Thread Mathias Lang via Digitalmars-d-learn
On Wednesday, 16 March 2016 at 18:40:56 UTC, Laeeth Isharc wrote: should it be a compiler warning to assign a negative literal to an unsigned without a cast ? yes it should. https://issues.dlang.org/show_bug.cgi?id=3468

immutable array in constructor

2016-03-18 Thread Jeff Thompson via Digitalmars-d-learn
In the following code, I explicitly declare array as immutable. But it compiles with the error shown below in the comment. The array object is declared immutable, so how can the compiler say it is a mutable object? In summary, how to pass an immutable array to an immutable constructor? class

Re: Solution to "statement is not reachable" depending on template variables?

2016-03-18 Thread Johan Engelen via Digitalmars-d-learn
On Wednesday, 16 March 2016 at 11:22:02 UTC, rikki cattermole wrote: Change those static if's to just plain old ifs. But then this wouldn't compile, would it? ``` static if(__traits(compiles, __traits(getMember, a, "b"))) { return a.b; } ``` (real code, I am not making this up) Imagine

Whitch can replace std::bind/boost::bind ?

2016-03-18 Thread Dsby via Digitalmars-d-learn
foreach (i ; 0..4) { auto th = new Thread(delegate(){listRun(i);});//this is erro _thread[i]= th; th.start(); } void listRun(int i) { writeln("i = ", i); // the value is not(0,1,2,3), it all is 2. } I want to know how to use it like std::bind.

Re: State of interfacing with c++

2016-03-18 Thread jmh530 via Digitalmars-d
On Friday, 18 March 2016 at 19:21:08 UTC, ZombineDev wrote: I'm sorry, what I said about rt_init() [1] is wrong. It does a lot of stuff and it's not just enabling the garbage collector. This means you have to be more careful if you decide to not call it. Here's what it does: If it is

[Issue 15807] New: Array!bool insertBack is broken

2016-03-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15807 Issue ID: 15807 Summary: Array!bool insertBack is broken Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression Priority:

Re: Up-to-date DIPs list

2016-03-18 Thread Mike Parker via Digitalmars-d
On Thursday, 17 March 2016 at 10:11:14 UTC, Martin Tschierschke wrote: Isn't the forum full of hints and best practice tips which should be available easier? Keeping it in the way it is in the moment, makes it difficult to find the treasures inside. There's a search box at the top of the

Re: Idea: std.build instead of dub and make-like tools

2016-03-18 Thread Jacob Carlborg via Digitalmars-d
On 17/03/16 07:13, H. S. Teoh via Digitalmars-d wrote: Personally, I also find makefiles have a tendency to become unmaintable messes. I have yet to find one non-trivial project whose makefiles *aren't* unmaintainable messes. The dmd toolchain tries to, but fails (esp. with the nasty

Will D support WebAssembly?

2016-03-18 Thread Dsby via Digitalmars-d
Chrome Canary、Firefox Nightly and Microsoft Edge can use WebAssembly。 WebAssembly : https://en.wikipedia.org/wiki/WebAssembly

Re: Why is this not a warning?

2016-03-18 Thread tsbockman via Digitalmars-d
On Thursday, 17 March 2016 at 09:59:41 UTC, Dominikus Dittes Scherkl wrote: Or you can use an improved opCmp implementation in the compiler, that only add additional runtime cost, if someone is stupid enough to compare signed with unsigned values - but yield the correct result: For the

[Issue 15372] DMD emits wrong mangling for extern(C++) free function templates

2016-03-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15372 Daniel Kozak changed: What|Removed |Added URL|

Re: Why is this not a warning?

2016-03-18 Thread tsbockman via Digitalmars-d
On Wednesday, 16 March 2016 at 18:39:36 UTC, Mathias Lang wrote: Sadly, to solve that without imposing much pain on the users, you need a more decent VRP than we currently have... Lionello Lunesu did a lot of work both on improving VRP, and on bug 259:

Re: string and char[] in Phobos

2016-03-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, March 18, 2016 08:24:24 Puming via Digitalmars-d-learn wrote: > Hi, > > I saw from the forum that functions with string like arguments > better use `in char[]` instead of `string` type, because then it > can accept both string and char[] types. > > But recently when actually using D, I

Re: Females in the community.

2016-03-18 Thread Jonathan M Davis via Digitalmars-d
On Thursday, 17 March 2016 at 18:06:32 UTC, Gerald Jansen wrote: On Thursday, 17 March 2016 at 16:33:45 UTC, DennisQuaid wrote: Here's about "Compilers/Programming Language" so most people here are bearded guys. Actually this extreme gender imbalance is something that struct me ever since I

Re: size_t index=-1;

2016-03-18 Thread tsbockman via Digitalmars-d-learn
On Friday, 18 March 2016 at 14:51:34 UTC, Steven Schveighoffer wrote: Note, I have made these mistakes myself, and I understand what you are asking for and why you are asking for it. But these are bugs. The user is telling the compiler to do one thing, and expecting it to do something else.

Re: size_t index=-1;

2016-03-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, March 18, 2016 23:48:32 tsbockman via Digitalmars-d-learn wrote: > I'm basically saying, "because information is lost when casting > between signed and unsigned, all such casts should be explicit". See. Here's the fundamental disagreement. _No_ information is lost when converting

Re: State of interfacing with c++

2016-03-18 Thread ZombineDev via Digitalmars-d
On Friday, 18 March 2016 at 13:45:18 UTC, Jonas Drewsen wrote: For a hack week at work I am thinking about creating a module in D that can be used with our existing application which is written in C++. Can anyone shed some light on the current status of interfacing with C++? In particular:

Re: Potential GSoC project - GC improvements

2016-03-18 Thread Craig Dillabaugh via Digitalmars-d
On Tuesday, 15 March 2016 at 01:34:07 UTC, Jeremy DeHaan wrote: I haven't had power for a couple of days, but it looks like the discussion has gone along pretty ok. After reading everything, I think I'm inclined to agree with Adam and the main focus of my proposal will be a precise GC (or as

Re: static ctors in shared libs

2016-03-18 Thread Johannes Pfau via Digitalmars-d
Am Fri, 18 Mar 2016 14:35:41 + schrieb Marc Schütz : > On Thursday, 17 March 2016 at 20:54:57 UTC, Johannes Pfau wrote: > > It's been some time since I looked at that code, but IIRC TLS > > ctors for newly loaded libraries are not run in old threads. > > There's nothing we

Re: Compile fails, don't know why

2016-03-18 Thread Nafees via Digitalmars-d
On Friday, 18 March 2016 at 10:07:18 UTC, Nafees wrote: I tried to create a separate module for storing classes in, this is the new module module qlib.classes; [...] Plus, the code works if the class is in the same module, and I did add the path to the QLib.classes module in the compiler.

Re: size_t index=-1;

2016-03-18 Thread Anonymouse via Digitalmars-d-learn
On Wednesday, 16 March 2016 at 21:49:05 UTC, Steven Schveighoffer wrote: No, please don't. Assigning a signed value to an unsigned (and vice versa) is very useful, and there is no good reason to break this. -Steve I agree, but implicitly allowing for comparisons between the two allows for

[Issue 15782] [Reg 2.071-devel] something about the const/non-const types in TypeTuples changed

2016-03-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15782 --- Comment #6 from Martin Nowak --- (In reply to John Colvin from comment #5) > Apologies for not noticing the changes, I didn't notice the bug in the old > implementation. No problem, it took me 20 minutes to find the change (b/c

size_t index=-1;

2016-03-18 Thread Laeeth Isharc via Digitalmars-d-learn
should it be a compiler warning to assign a negative literal to an unsigned without a cast ?

Re: the most D-ish GUI library

2016-03-18 Thread Saša Janiška via Digitalmars-d
Gary Willoughby writes: > Sometimes the widgets don't look 100% native. You can take a look at > the example if you want. I did and it must say it looks pretty good. ;) At the end, the look is not all in all...how is tkd in regard to memory management etc.? Sincerely, Gour --

Idea: std.build instead of dub and make-like tools

2016-03-18 Thread Piotrek via Digitalmars-d
Hi, What do you think about concentrating D build system around a hypothetical "std.build" module instead of investing in dub or other custom tools? Also instead of custom build file format like JSON/SDL/XML/YAML we could simply use a d source file, e.g "build.d". All specification would

Re: Obtaining argument names in (variadic) functions

2016-03-18 Thread JR via Digitalmars-d-learn
On Wednesday, 16 March 2016 at 20:43:09 UTC, jkpl wrote: I try to anticipate the reason why you want this. [...] I use something *kinda* sort of similar in my toy project to print all fields of a struct, for debugging purposes when stuff goes wrong. Getting the names of the member variables

[Issue 15793] Change !is error to warning

2016-03-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15793 Sobirari Muhomori changed: What|Removed |Added Keywords||spec

Re: the most D-ish GUI library

2016-03-18 Thread Karabuta via Digitalmars-d
On Wednesday, 16 March 2016 at 09:44:22 UTC, Vadim Lopatin wrote: On Tuesday, 15 March 2016 at 22:26:15 UTC, Karabuta wrote: DlangUI has a nice API design but still need serious design and art work to catch up with Gtk 3.18 - 2.0 in terms of UI look and feel. I also find that it just have

[Issue 15006] Compiling trivial program produces 400,000+ byte object file

2016-03-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15006 Temtaime changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: RFC: Units of measurement for D (Phobos?)

2016-03-18 Thread David Nadlinger via Digitalmars-d
On Thursday, 17 March 2016 at 12:51:28 UTC, Nordlöw wrote: I believe `isConvertableTo` is a more Phobos-compliant naming, right? I went for canConvert since it is a bit shorter than isConvertible and there is precedent for it in Phobos as well (e.g. find/canFind). It's a matter of taste,

Re: immutable array in constructor

2016-03-18 Thread Rene Zwanenburg via Digitalmars-d-learn
On Thursday, 17 March 2016 at 10:11:43 UTC, Jeff Thompson wrote: This is a simplified example from a larger class I have where I need an immutable constructor. This is because I need to construct an object an pass it to other functions which take an immutable object. So, how to keep an

[Issue 15657] [internal] StructLiteralExp.sinst comparison in constfolding needs to be removed

2016-03-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15657 yebblies changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: State of interfacing with c++

2016-03-18 Thread tsbockman via Digitalmars-d
On Friday, 18 March 2016 at 14:11:46 UTC, Jakob Ovrum wrote: I'd update the section on exceptions but I'm really tired of fighting the dlang.org makefile. http://forum.dlang.org/post/aupwqmkicdjzwxdkk...@forum.dlang.org If you'll write an update for the C++ exceptions section as plain text,

Re: Idea: std.build instead of dub and make-like tools

2016-03-18 Thread Atila Neves via Digitalmars-d
On Thursday, 17 March 2016 at 05:15:25 UTC, Piotrek wrote: On Wednesday, 16 March 2016 at 16:36:47 UTC, Dicebot wrote: NB: this is orthogonal to development of dub. Most important functionality of dub is dependency management, acting as a build tool is secondary to that (and can be adjusted to

Re: RFC: Units of measurement for D (Phobos?)

2016-03-18 Thread Nordlöw via Digitalmars-d
On Thursday, 17 March 2016 at 12:55:39 Ping, David Nadlinger! 

Compile fails, don't know why

2016-03-18 Thread Nafees via Digitalmars-d
I tried to create a separate module for storing classes in, this is the new module module qlib.classes; //QLib.Classes class tstrlist{ private: string[] list; uint taken; public: string read(uint index){ return list[index]; } void

Re: size_t index=-1;

2016-03-18 Thread tsbockman via Digitalmars-d-learn
On Friday, 18 March 2016 at 05:20:35 UTC, Ola Fosheim Grøstaf wrote: Only providing modular arithmetics is a significant language design flaw, but as long as all integers are defined to be modular then there is no fundamental semantic difference either. `ulong.max` and `-1L` are fundamentally