Re: how to propagate computed type during CTFE?

2018-02-22 Thread Simen Kjærås via Digitalmars-d
On Friday, 23 February 2018 at 00:54:34 UTC, Timothee Cour wrote: in example below, how do I propagate RET (or even `typeof(a)`) to the result value of `inferType`? does this need a language change to allow this? No can do. Consider what would happen if you added put(1); inside fun - what

Re: NNTP client configuration

2018-02-22 Thread Seb via Digitalmars-d
On Friday, 23 February 2018 at 05:09:23 UTC, Nick Sabalausky (Abscissa) wrote: On 02/21/2018 01:21 AM, Manu wrote: Incidentally... I was kinda hoping it'd be back in the states this year, since I'm actually in the states now... but I'm still holding out to see if I can get to Germany. I've

Re: NNTP client configuration

2018-02-22 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 02/21/2018 01:21 AM, Manu wrote: Incidentally... I was kinda hoping it'd be back in the states this year, since I'm actually in the states now... but I'm still holding out to see if I can get to Germany. I've had fingers crossed for another San Fransico DConf, too. I'm at the other end of

Re: Beta 2.079.0

2018-02-22 Thread psychoticRabbit via Digitalmars-d-announce
On Friday, 23 February 2018 at 03:26:11 UTC, Seb wrote: On Friday, 23 February 2018 at 03:20:22 UTC, psychoticRabbit wrote: compared to the current change in beta. FWIW the change is almost gone from the beta: https://github.com/dlang/dmd/pull/7939 I'm glad common sense seems to be winning

[Issue 18501] randomShuffle and partialShuffle should return their input argument

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18501 Basile B. changed: What|Removed |Added Keywords||pull --- Comment #1 from

[Issue 17596] dmd d 2.073.2 and 2.074.1 interim generated dmd segfaults on FreeBSD 12-CURRENT

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17596 --- Comment #19 from Cy Schubert --- That probably makes sense. I can restrict FreeBSD 10 and 11 to an old release of dmd. At least it addresses the issue going forward. I'll rework the port the next time I visit it. I'm hoping to

[Issue 18501] New: randomShuffle and partialShuffle should return their input argument

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18501 Issue ID: 18501 Summary: randomShuffle and partialShuffle should return their input argument Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 18492] DLang STL links are broken

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18492 Seb changed: What|Removed |Added Keywords||pull CC|

Re: Game and GC

2018-02-22 Thread Norm via Digitalmars-d-learn
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: Hi, I'm new to language and games. Many people say that GC is bad and can slow down your project in some moments. What can happen if I create a game using D without worrying with memory management? (using full GC) Have a look at

Re: Beta 2.079.0

2018-02-22 Thread Seb via Digitalmars-d-announce
On Friday, 23 February 2018 at 03:20:22 UTC, psychoticRabbit wrote: compared to the current change in beta. FWIW the change is almost gone from the beta: https://github.com/dlang/dmd/pull/7939

Re: Beta 2.079.0

2018-02-22 Thread psychoticRabbit via Digitalmars-d-announce
On Friday, 23 February 2018 at 02:31:34 UTC, Jonathan M Davis wrote: We deprecate stuff when we need to, but every time we deprecate something, it breaks code (even if it's not immediate breakage), so the benefits that come from a deprecation need to be worth the breakage that it causes. Every

[Issue 18408] [Home]

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18408 Seb changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: how to propagate computed type during CTFE?

2018-02-22 Thread rikki cattermole via Digitalmars-d
On 23/02/2018 1:54 PM, Timothee Cour wrote: in example below, how do I propagate RET (or even `typeof(a)`) to the result value of `inferType`? does this need a language change to allow this? ``` template inference(alias emitter) { auto inference(){ auto inferType(){

[Issue 18468] cannot use `synchronized {}` in @safe code

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18468 Seb changed: What|Removed |Added Severity|enhancement |major --

Re: Game and GC

2018-02-22 Thread Mike Franklin via Digitalmars-d-learn
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: Hi, I'm new to language and games. Many people say that GC is bad and can slow down your project in some moments. What can happen if I create a game using D without worrying with memory management? (using full GC) Don't let the GC

Re: Game and GC

2018-02-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: What can happen if I create a game using D without worrying with memory management? (using full GC) It depends what kind of game it is and how sloppy your code is in general. Every game I have written in D i don't think about it,

Re: Beta 2.079.0

2018-02-22 Thread psychoticRabbit via Digitalmars-d-announce
On Friday, 23 February 2018 at 02:31:34 UTC, Jonathan M Davis wrote: We deprecate stuff when we need to, but every time we deprecate something, it breaks code (even if it's not immediate breakage), so the benefits that come from a deprecation need to be worth the breakage that it causes.

Re: Beta 2.079.0

2018-02-22 Thread psychoticRabbit via Digitalmars-d-announce
On Friday, 23 February 2018 at 01:53:45 UTC, Martin Nowak wrote: On Friday, 23 February 2018 at 01:16:24 UTC, Jonathan M Davis wrote: I can sympathize with wanting to avoid bikeshedding, but almost no one who has posted thinks that this is a good idea. This was meant for the discussion of a

Re: Game and GC

2018-02-22 Thread Leonardo via Digitalmars-d-learn
On Friday, 23 February 2018 at 02:16:38 UTC, Jonathan M Davis wrote: The GC won't slow down your code in general (in fact, it will probably speed it up in comparison to reference counting), but whenever the GC does a collection, that means that it stops all threads that it manages. So, you

Re: Beta 2.079.0

2018-02-22 Thread Jonathan M Davis via Digitalmars-d-announce
On Friday, February 23, 2018 02:20:41 psychotyicRabbit via Digitalmars-d- announce wrote: > Also, D is pretty good a depracating stuff, so why not deprecate > the current way of imports, and gradually move to something (that > resolves issues): > > e.g. > > import std.stdio, std.whatever[this,

Re: Game and GC

2018-02-22 Thread Leonardo via Digitalmars-d-learn
On Friday, 23 February 2018 at 02:02:12 UTC, StickYourLeftFootIn wrote: On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: Hi, I'm new to language and games. Many people say that GC is bad and can slow down your project in some moments. What can happen if I create a game using D

Re: Beta 2.079.0

2018-02-22 Thread psychotyicRabbit via Digitalmars-d-announce
On Friday, 23 February 2018 at 01:57:37 UTC, Martin Nowak wrote: On Thursday, 22 February 2018 at 11:15:35 UTC, psychoticRabbit wrote: import std.rabbit [food, water], std.house, std.family [carer]; What about the million lines of existing code using import std.stdio : writeln, writefln; I

Re: Game and GC

2018-02-22 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, February 23, 2018 01:54:07 Leonardo via Digitalmars-d-learn wrote: > Hi, I'm new to language and games. > Many people say that GC is bad and can slow down your project in > some moments. > What can happen if I create a game using D without worrying with > memory management? > (using

[Issue 17596] dmd d 2.073.2 and 2.074.1 interim generated dmd segfaults on FreeBSD 12-CURRENT

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17596 Walter Bright changed: What|Removed |Added Severity|major |blocker ---

Re: Game and GC

2018-02-22 Thread StickYourLeftFootIn via Digitalmars-d-learn
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: Hi, I'm new to language and games. Many people say that GC is bad and can slow down your project in some moments. What can happen if I create a game using D without worrying with memory management? (using full GC) What do you

Re: Beta 2.079.0

2018-02-22 Thread Martin Nowak via Digitalmars-d-announce
On Thursday, 22 February 2018 at 11:15:35 UTC, psychoticRabbit wrote: import std.rabbit [food, water], std.house, std.family [carer]; What about the million lines of existing code using import std.stdio : writeln, writefln;

Game and GC

2018-02-22 Thread Leonardo via Digitalmars-d-learn
Hi, I'm new to language and games. Many people say that GC is bad and can slow down your project in some moments. What can happen if I create a game using D without worrying with memory management? (using full GC)

Re: Beta 2.079.0

2018-02-22 Thread Martin Nowak via Digitalmars-d-announce
On Friday, 23 February 2018 at 01:16:24 UTC, Jonathan M Davis wrote: I can sympathize with wanting to avoid bikeshedding, but almost no one who has posted thinks that this is a good idea. This was meant for the discussion of a new syntax for selective imports like `import mod : { sym1, sym2

Re: Beta 2.079.0

2018-02-22 Thread Joakim via Digitalmars-d-announce
On Friday, 23 February 2018 at 00:05:59 UTC, Martin Nowak wrote: - practical examples of this usage are hardly confusing import std.stdio : writeln, std.algorithm : find; I agree that that's not so bad, though it's more likely to look like this: import std.stdio : writeln, stdin, stderr,

Re: Beta 2.079.0

2018-02-22 Thread Seb via Digitalmars-d-announce
On Friday, 23 February 2018 at 01:34:54 UTC, Rubn wrote: On Friday, 23 February 2018 at 00:05:59 UTC, Martin Nowak wrote: - each imported module should be on it's own line That's your opinion, my opinion is that importing 6 symbols from 6 different modules for a tiny cli tool sucks and

Re: any svg d-man art out there?

2018-02-22 Thread Seb via Digitalmars-d
On Friday, 23 February 2018 at 01:38:34 UTC, Adam D. Ruppe wrote: On Thursday, 22 February 2018 at 23:54:48 UTC, Adam D. Ruppe wrote: any of those in svg format? There is an svg one in here!! https://github.com/dlang-community/d-mans Yes, d-mans is an collective effort at collecting all

Re: any svg d-man art out there?

2018-02-22 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 22 February 2018 at 23:54:48 UTC, Adam D. Ruppe wrote: any of those in svg format? There is an svg one in here!! https://github.com/dlang-community/d-mans

Re: Beta 2.079.0

2018-02-22 Thread Rubn via Digitalmars-d-announce
On Friday, 23 February 2018 at 00:05:59 UTC, Martin Nowak wrote: - each imported module should be on it's own line That's your opinion, my opinion is that importing 6 symbols from 6 different modules for a tiny cli tool sucks and bloats code example. So the alternative is to not use

Re: Beta 2.079.0

2018-02-22 Thread psychoticRabbit via Digitalmars-d-announce
On Friday, 23 February 2018 at 01:17:26 UTC, psychoticRabbit wrote: On Friday, 23 February 2018 at 01:02:59 UTC, Martin Nowak wrote: Interesting, you have a good example? yeah..phobos. I learn most about the various phobos libraries, and their usefulness, from looking at the various

Re: Beta 2.079.0

2018-02-22 Thread psychoticRabbit via Digitalmars-d-announce
On Friday, 23 February 2018 at 01:02:59 UTC, Martin Nowak wrote: Interesting, you have a good example? yeah..phobos. I learn most about the various phobos libraries, and their usefulness, from looking at the various imports that phobos modules use. If they just used import *; I'd have

Re: Beta 2.079.0

2018-02-22 Thread Jonathan M Davis via Digitalmars-d-announce
On Friday, February 23, 2018 00:05:59 Martin Nowak via Digitalmars-d- announce wrote: > The main use-case for craming multiple imports into a line is not > libraries but scripting, examples, and maybe unit tests. > And indeed the changelog entry could have been a bit clearer and > easier to grasp.

Re: Learning D Programming

2018-02-22 Thread psychoticRabbit via Digitalmars-d
On Thursday, 22 February 2018 at 14:29:23 UTC, Ali wrote: this account, seem to be going around programming forums asking the same question https://discuss.ocaml.org/t/ocaml-is-helpful-for-me/1603 not sure what this mean, but .. not a good sign A company that 'supposedly' provides

Re: Beta 2.079.0

2018-02-22 Thread Martin Nowak via Digitalmars-d-announce
On Friday, 23 February 2018 at 00:41:58 UTC, psychoticRabbit wrote: On Friday, 23 February 2018 at 00:05:59 UTC, Martin Nowak wrote: Isn't that an argument? Of course it is :). I tried to list the arguments I found in the thread and replied to them, trying to lead a proper discussion. -

Re: Annotation of functions

2018-02-22 Thread psychoticRabbit via Digitalmars-d
On Thursday, 22 February 2018 at 14:50:37 UTC, Seb wrote: On Wednesday, 21 February 2018 at 01:58:17 UTC, psychoticRabbit wrote: On Tuesday, 20 February 2018 at 15:26:12 UTC, Adam D. Ruppe wrote: dmd -X spits out the json file with a list of functions and classes and other stuff. Then you

[Issue 18500] New: Be able to overwrite object.Object.toString with inout

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18500 Issue ID: 18500 Summary: Be able to overwrite object.Object.toString with inout Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

how to propagate computed type during CTFE?

2018-02-22 Thread Timothee Cour via Digitalmars-d
in example below, how do I propagate RET (or even `typeof(a)`) to the result value of `inferType`? does this need a language change to allow this? ``` template inference(alias emitter) { auto inference(){ auto inferType(){ emitter!((a){ enum RET=typeof(a).stringof; // type

[Issue 7879] format of class with not const toString()

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7879 Seb changed: What|Removed |Added CC||greensunn...@gmail.com ---

Re: Beta 2.079.0

2018-02-22 Thread Martin Nowak via Digitalmars-d-announce
On Friday, 23 February 2018 at 00:05:59 UTC, Martin Nowak wrote: On the other side please note that: Forgot one important point: - practially unqualified modules are extremely rare, so the tiny ambiguous grammar case is hardly relevant.

Re: Beta 2.079.0

2018-02-22 Thread psychoticRabbit via Digitalmars-d-announce
On Friday, 23 February 2018 at 00:47:10 UTC, psychoticRabbit wrote: On Friday, 23 February 2018 at 00:14:21 UTC, Walter Bright wrote: On 2/22/2018 1:56 PM, H. S. Teoh wrote: I'm a little disappointed that a change like this got in, whereas something that's actually helpful, like DIP 1009, is

Re: Beta 2.079.0

2018-02-22 Thread psychoticRabbit via Digitalmars-d-announce
On Friday, 23 February 2018 at 00:14:21 UTC, Walter Bright wrote: On 2/22/2018 1:56 PM, H. S. Teoh wrote: I'm a little disappointed that a change like this got in, whereas something that's actually helpful, like DIP 1009, is sitting in limbo. It's always true that trivia attracts far more

[Issue 14439] aa's keys, values not usable in @safe context

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14439 Seb changed: What|Removed |Added Keywords|pull| CC|

Re: Beta 2.079.0

2018-02-22 Thread psychoticRabbit via Digitalmars-d-announce
On Friday, 23 February 2018 at 00:05:59 UTC, Martin Nowak wrote: Unfortunately it's a bit hard to find arguments in the discussion below, would have been cool if there were a few well argumented comments instead dozens of +1s. Go back and read all of this thread, properly. - this grammar

Re: Beta 2.079.0

2018-02-22 Thread Walter Bright via Digitalmars-d-announce
On 2/22/2018 1:56 PM, H. S. Teoh wrote: I'm a little disappointed that a change like this got in, whereas something that's actually helpful, like DIP 1009, is sitting in limbo. It's always true that trivia attracts far more attention and far more emotion than issues that require effort to

Re: Beta 2.079.0

2018-02-22 Thread Martin Nowak via Digitalmars-d-announce
On Tuesday, 20 February 2018 at 08:43:50 UTC, Martin Nowak wrote: Regarding the sheer amount of discussion I want to note that this was primarily seen as a regularization of the existing grammar. import mod1, mod2 : sym1, sym2; Certainly other languages have decided on a clearer syntax for

any svg d-man art out there?

2018-02-22 Thread Adam D. Ruppe via Digitalmars-d
You know, D-man, like https://dlang.org/images/d5.gif any of those in svg format?

Re: How to use strip or stripRight on char[len] ? Thanks.

2018-02-22 Thread FrankLike via Digitalmars-d-learn
On Thursday, 22 February 2018 at 18:02:11 UTC, Adam D. Ruppe wrote: You don't strip that at all, the function writes a zero-terminated string to the buffer. Thank you very much ! I forgot it.

Re: D for microservices

2018-02-22 Thread aberba via Digitalmars-d
On Thursday, 22 February 2018 at 08:54:04 UTC, Joakim wrote: On Monday, 23 October 2017 at 18:18:28 UTC, Jacob Carlborg wrote: [...] Yuxuan Shui has ported druntime to Musl over the last couple months: https://github.com/dlang/druntime/pulls?q=is%3Apr+author%3Ayshui+is%3Aclosed With his

Re: Beta 2.079.0

2018-02-22 Thread H. S. Teoh via Digitalmars-d-announce
On Thu, Feb 22, 2018 at 09:42:13PM +, Zoadian via Digitalmars-d-announce wrote: > On Thursday, 22 February 2018 at 10:42:33 UTC, Jonathan M Davis wrote: > > On Thursday, February 22, 2018 10:30:44 psychoticRabboit via [...] > > > what about something like this then? > > > > > > import

Re: Function overloading between modules

2018-02-22 Thread ketmar via Digitalmars-d-learn
JN wrote: same idea? absolutely the same. non-qualified imports (be it template, or function) won't take part in overload resoultion.

Re: Why std_data_json is not default in phobos

2018-02-22 Thread aberba via Digitalmars-d
On Thursday, 22 February 2018 at 07:56:12 UTC, Jonathan M Davis wrote: On Thursday, February 22, 2018 07:24:30 aberba via Digitalmars-d wrote: [...] I did use Java in previous jobs, but I don't curently use it. In recent years, I've done far more with C++ and D, and my current job mostly

Re: Beta 2.079.0

2018-02-22 Thread Zoadian via Digitalmars-d-announce
On Thursday, 22 February 2018 at 10:42:33 UTC, Jonathan M Davis wrote: On Thursday, February 22, 2018 10:30:44 psychoticRabboit via Digitalmars-d- announce wrote: On Thursday, 22 February 2018 at 09:42:47 UTC, Atila Neves wrote: > I'm going to a) never write these imports and b) pretend this >

Re: Function overloading between modules

2018-02-22 Thread JN via Digitalmars-d-learn
On Thursday, 22 February 2018 at 21:19:12 UTC, ketmar wrote: yes. this is done so unqualified won't silently "steal" your functions. this can cause some unexpected (and hard to find) bugs. if you want it to work, you can either do qualified import import bar : foo; or manuall

Re: Beta 2.079.0

2018-02-22 Thread Walter Bright via Digitalmars-d-announce
On 2/22/2018 2:20 AM, Temtaime wrote: Fuck selective imports. Use of such words is not appreciated here. Please use professional demeanor.

Re: Function overloading between modules

2018-02-22 Thread ketmar via Digitalmars-d-learn
JN wrote: Is this expected behaviour? bar.d --- void foo(string s) { } app.d --- import std.stdio; import bar; void foo(int x) { } void main() { foo("hi"); }; === Error: function app.foo (int x) is not callable using argument types (string) yes. this is done so unqualified won't

Function overloading between modules

2018-02-22 Thread JN via Digitalmars-d-learn
Is this expected behaviour? bar.d --- void foo(string s) { } app.d --- import std.stdio; import bar; void foo(int x) { } void main() { foo("hi"); }; === Error: function app.foo (int x) is not callable using argument types (string)

Re: Beta 2.079.0

2018-02-22 Thread Kagamin via Digitalmars-d-announce
auto result = foo(), bar(); Does this compile? In variable declaration statement comma already has meaning as separator of declarators. Does it apply to enums too? This is difficult to parse.

[Issue 8295] Struct member destructor can not be called from shared struct instance

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8295 --- Comment #14 from anonymous4 --- (In reply to Marco Leise from comment #13) > No it is not fine, because if we agree that top level qualifiers are free to > change after a copy, and it seems sensible to say that the

Re: Typedef.toString?

2018-02-22 Thread Meta via Digitalmars-d
On Thursday, 22 February 2018 at 19:56:13 UTC, Denis F wrote: Hello! After replacing native type by std.typecons.Typedef I am faced with fact what all typeDefValue.to!string was silently changed its output to output of Typedef struct itself. It was too hard find all this inclusions. Maybe

Re: Official Dub package for DWT

2018-02-22 Thread Jacob Carlborg via Digitalmars-d-announce
On 2018-02-22 20:26, Jesse Phillips wrote: This is awesome. I don't use GUI too much with my D programs, but I've had one lingering with DFL for a while now. It took a little bit to get familiar with this framework again, but I think the conversion has been totally worth it (even seems to

[Issue 18499] New: std.regex cannot handle (?i:)

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18499 Issue ID: 18499 Summary: std.regex cannot handle (?i:) Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1

Re: array/Array: "hard" bounds checking

2018-02-22 Thread TheFlyingFiddle via Digitalmars-d-learn
On Thursday, 22 February 2018 at 12:50:43 UTC, ag0aep6g wrote: On 02/22/2018 10:39 AM, bauss wrote: On Thursday, 22 February 2018 at 05:22:19 UTC, TheFlyingFiddle wrote: Eg: uint a = 3; int b = -1; assert(a > b); //No idea what should happen here. This is what happens: assert(cast(int)a

Typedef.toString?

2018-02-22 Thread Denis F via Digitalmars-d
Hello! After replacing native type by std.typecons.Typedef I am faced with fact what all typeDefValue.to!string was silently changed its output to output of Typedef struct itself. It was too hard find all this inclusions. Maybe it is need to implement simple toString method inside of

[Issue 13957] 64 bit C ABI not followed for passing structs with floating+integer types

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13957 Walter Bright changed: What|Removed |Added Keywords||betterC, C++

Re: PackedAliasSeq?

2018-02-22 Thread Seb via Digitalmars-d
On Thursday, 22 February 2018 at 19:26:54 UTC, Andrei Alexandrescu wrote: After coding https://github.com/dlang/phobos/pull/6192 with AliasSeq, the experience has been quite pleasurable. However, in places the AliasSeq tends to expand too eagerly, leading to a need to "keep it together" e.g.

Re: Official Dub package for DWT

2018-02-22 Thread Jesse Phillips via Digitalmars-d-announce
On Sunday, 11 February 2018 at 11:04:52 UTC, JN wrote: [1] https://tldrlegal.com/license/eclipse-public-license-1.0-%28epl-1.0%29 This doesn't really explain much. It's confusing. It's similar to GPL. So if I release an app using DWT, I need to release the sourcecode for my app? Or do I

PackedAliasSeq?

2018-02-22 Thread Andrei Alexandrescu via Digitalmars-d
After coding https://github.com/dlang/phobos/pull/6192 with AliasSeq, the experience has been quite pleasurable. However, in places the AliasSeq tends to expand too eagerly, leading to a need to "keep it together" e.g. when you need to pass two of those to a template. I worked around the

[Issue 18498] New: File buffer overrun when using lexer-as-library

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18498 Issue ID: 18498 Summary: File buffer overrun when using lexer-as-library Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

Re: Official Dub package for DWT

2018-02-22 Thread Jesse Phillips via Digitalmars-d-announce
On Wednesday, 7 February 2018 at 21:33:22 UTC, Jacob Carlborg wrote: This has been long overdue but I would like to announce that I've just released an official Dub package for the DWT library [1]. For a usage example, please see the GitHub page [2]. This is awesome. I don't use GUI too much

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-22 Thread H. S. Teoh via Digitalmars-d
On Thu, Feb 22, 2018 at 09:24:05AM +, Russel Winder via Digitalmars-d wrote: > On Wed, 2018-02-21 at 09:30 -0800, H. S. Teoh via Digitalmars-d wrote: [...] > Dub, Cargo, and to a great extent Maven, give you tools to specify > declaratively the project and nothing else. All actions are

Re: what are guidelines for when to split a module into a package?

2018-02-22 Thread H. S. Teoh via Digitalmars-d
On Thu, Feb 22, 2018 at 03:53:59PM +0100, Timon Gehr via Digitalmars-d wrote: > On 22.02.2018 08:13, Timothee Cour wrote: > > Advantages of splitting: > > ... > > * easier to edit (no need to scroll much to see entirety of module > > we're editing) > > I don't think this particular point is true.

Re: How to use strip or stripRight on char[len] ? Thanks.

2018-02-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 22 February 2018 at 17:44:53 UTC, FrankLike wrote: SHGetSpecialFolderPath(NULL,cast(char*)Path.ptr,CSIDL_DESKTOP,0); You don't strip that at all, the function writes a zero-terminated string to the buffer. So either: use the pointer as-is to other C functions, or call the

Re: Tuts/Aritcles: Incrementasl C++-to-D conversion?

2018-02-22 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Feb 22, 2018 at 10:43:24AM +0200, ketmar via Digitalmars-d-learn wrote: > Nick Sabalausky (Abscissa) wrote: > > > Are there any tutorials or articles out there for "getting started > > with converting a C++ codebase to D one module at a time?" Or at the > > very least: tips, tricks,

[Issue 13957] 64 bit C ABI not followed for passing structs with floating+integer types

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13957 Andrei Alexandrescu changed: What|Removed |Added CC||and...@erdani.com

Re: How to use strip or stripRight on char[len] ? Thanks.

2018-02-22 Thread FrankLike via Digitalmars-d-learn
On Thursday, 22 February 2018 at 16:59:40 UTC, Adam D. Ruppe wrote: On Thursday, 22 February 2018 at 16:55:14 UTC, FrankLike wrote: char[100] abc ="aabc"; auto abcaa = ((abc).dup).stripRight; try: auto abcaa = stripRight(abc[]) Now,I want to get the result: char[100] Path;

Re: Beta 2.079.0

2018-02-22 Thread H. S. Teoh via Digitalmars-d-announce
On Thu, Feb 22, 2018 at 02:06:20AM +, psychoticRabbit via Digitalmars-d-announce wrote: > On Wednesday, 21 February 2018 at 16:58:22 UTC, H. S. Teoh wrote: > > On Wed, Feb 21, 2018 at 02:46:56PM +, psychoticRabbit via > > Digitalmars-d-announce wrote: [...] > > > Syntax is EVERYTHING. It

Re: How to use strip or stripRight on char[len] ? Thanks.

2018-02-22 Thread FrankLike via Digitalmars-d-learn
On Thursday, 22 February 2018 at 17:08:14 UTC, FrankLike wrote: On Thursday, 22 February 2018 at 16:59:40 UTC, Adam D. Ruppe wrote: On Thursday, 22 February 2018 at 16:55:14 UTC, FrankLike wrote: It is simply that these functions require a slice so it can resize it and you can't resize a

Re: How to use strip or stripRight on char[len] ? Thanks.

2018-02-22 Thread FrankLike via Digitalmars-d-learn
On Thursday, 22 February 2018 at 16:59:40 UTC, Adam D. Ruppe wrote: On Thursday, 22 February 2018 at 16:55:14 UTC, FrankLike wrote: It is simply that these functions require a slice so it can resize it and you can't resize a static array. char[100] abc ="aabc"; string aa =

Re: Beta 2.079.0

2018-02-22 Thread Patrick Schluter via Digitalmars-d-announce
On Thursday, 22 February 2018 at 08:52:21 UTC, Timothee Cour wrote: you should also mention an important point: current syntax disallows importing a simple module foo (with no package), eg: import std.stdio:write,foo; // there's no way to specify a module `foo` import std.stdio:write & foo;

Re: How to use strip or stripRight on char[len] ? Thanks.

2018-02-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 22 February 2018 at 16:55:14 UTC, FrankLike wrote: char[100] abc ="aabc"; auto abcaa = ((abc).dup).stripRight; try: auto abcaa = stripRight(abc[]) just make sure you do NOT return that abcaa from the function or store it in an object. It still refers to the static array

How to use strip or stripRight on char[len] ? Thanks.

2018-02-22 Thread FrankLike via Digitalmars-d-learn
Hi,everyone, How to use strip or stripRight on char[len]? For example: string abcs ="aabc"; auto abcsaa = abcs.stripRight; writeln(abcsaa); writeln("---abcsaa--stripRight ok "); char[100] abc ="aabc"; auto abcaa = ((abc).dup).stripRight; writeln(abcaa); writeln("stripRight

Re: Negative index range violation

2018-02-22 Thread SrMordred via Digitalmars-d-learn
On Thursday, 22 February 2018 at 02:41:30 UTC, Steven Schveighoffer wrote: Hah! I never thought of doing a slice with negative indexes ;) Maybe is my past of python: arr[-3:] to get the last 3 elements for eg. :)

[Issue 18497] New: windows uninstaller has an annoying really delete pop-up

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18497 Issue ID: 18497 Summary: windows uninstaller has an annoying really delete pop-up Product: D Version: D2 Hardware: All OS: Windows Status: NEW

[Issue 18267] array comparison broken in 2.078.3

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18267 John Colvin changed: What|Removed |Added Keywords||industry

Re: Beta 2.079.0

2018-02-22 Thread David Gileadi via Digitalmars-d-announce
On 2/22/18 3:30 AM, psychoticRabboit wrote: On Thursday, 22 February 2018 at 09:42:47 UTC, Atila Neves wrote: I'm going to a) never write these imports and b) pretend this feature doesn't exist. Atila what about something like this then? import std.stdio; std.conv: to, from;

[Issue 18495] Integral promotion for a ~ operator

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18495 --- Comment #3 from Steven Schveighoffer --- Although this bug is invalid, there legitimately is a problem with the spec: https://issues.dlang.org/show_bug.cgi?id=18496 --

[Issue 18496] New: Complement expressions now actually int promote

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18496 Issue ID: 18496 Summary: Complement expressions now actually int promote Product: D Version: D2 Hardware: All URL: http://https://dlang.org/spec/expression.html#compleme

Re: Negative index range violation

2018-02-22 Thread Timon Gehr via Digitalmars-d-learn
On 22.02.2018 01:26, Adam D. Ruppe wrote: On Thursday, 22 February 2018 at 00:13:43 UTC, SrMordred wrote: string x = "123"; auto c = x.ptr; c++; writeln(c[-1]); // 1 That's only happening because pointers bypass range checks. writeln(c[-1..0]); //BOOM Range violation But with a slice

[Issue 18495] Integral promotion for a ~ operator

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18495 Steven Schveighoffer changed: What|Removed |Added Status|NEW |RESOLVED

Re: Understanding the AST...

2018-02-22 Thread joe via Digitalmars-d-learn
On Thursday, 22 February 2018 at 14:53:11 UTC, Seb wrote: On Tuesday, 6 February 2018 at 12:03:06 UTC, joe wrote: Hello everybody! Last week end I found this post ( https://dlang.org/blog/2017/08/01/a-dub-case-study-compiling-dmd-as-a-library/ ) on the Blog and thought to myself awesome.

[Issue 18495] Integral promotion for a ~ operator

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18495 --- Comment #1 from Kirill --- Of course if I do add "-transition=intpromote" as advised by the compiler, it just gives an error: "cannot implicitly convert expression `~cast(int)d1` of type `int` to `ubyte`. Fixing this requires

[Issue 18495] New: Integral promotion for a ~ operator

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18495 Issue ID: 18495 Summary: Integral promotion for a ~ operator Product: D Version: D2 Hardware: x86 OS: All Status: NEW Severity: minor Priority: P1

[Issue 18491] std.experimental.logger default values after variadic template parameters

2018-02-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18491 --- Comment #1 from Robert Schadek --- https://github.com/dlang/phobos/pull/6208 --

Re: Annotation of functions

2018-02-22 Thread Seb via Digitalmars-d
On Wednesday, 21 February 2018 at 01:58:17 UTC, psychoticRabbit wrote: On Tuesday, 20 February 2018 at 15:26:12 UTC, Adam D. Ruppe wrote: dmd -X spits out the json file with a list of functions and classes and other stuff. Then you can just filter that. 'dmd -X' looks like the perfect

Re: what are guidelines for when to split a module into a package?

2018-02-22 Thread Timon Gehr via Digitalmars-d
On 22.02.2018 08:13, Timothee Cour wrote: Advantages of splitting: ... * easier to edit (no need to scroll much to see entirety of module we're editing) I don't think this particular point is true. Splitting can actually make editing slightly harder. Scrolling is an inefficient way to find

Re: Understanding the AST...

2018-02-22 Thread Seb via Digitalmars-d-learn
On Tuesday, 6 February 2018 at 12:03:06 UTC, joe wrote: Hello everybody! Last week end I found this post ( https://dlang.org/blog/2017/08/01/a-dub-case-study-compiling-dmd-as-a-library/ ) on the Blog and thought to myself awesome. [...] BTW I know it's not as powerful as DMD (and not the

  1   2   >