Re: DIP 1003: remove `body` as a keyword

2016-12-10 Thread Rory McGuire via Digitalmars-d-announce
On Sat, Dec 10, 2016 at 4:43 PM, Basile B. via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote: > On Saturday, 10 December 2016 at 13:49:09 UTC, Basile B. wrote: > >> On Monday, 28 November 2016 at 02:17:20 UTC, Dicebot wrote: >> >>> On 11/24/2016 05:29 PM, WM.H wrote: >>>

Re: Bug tracking system broken

2016-12-10 Thread Ali Çehreli via Digitalmars-d
On 12/10/2016 10:28 PM, rumbu wrote: > Now I feel very dumb. You shouldn't be. You made a human error on an interface that was designed for "human" interaction. The interface failed. :) For the record, I'm not picking on that page specifically. Interfaces are a pet peeve of mine. (I

Re: Getters/setters generator

2016-12-10 Thread Mike Parker via Digitalmars-d-announce
On Sunday, 11 December 2016 at 03:15:55 UTC, Mike Bierlee wrote: I was under the impression that you could only access methods as if they were fields using the @property attribute. After carefully reading the documentation I see this is not the case (UFCS does this). Still there are some

[Issue 16964] New: Wrong label alignment in asm statement

2016-12-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16964 Issue ID: 16964 Summary: Wrong label alignment in asm statement Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: major

Re: Bug tracking system broken

2016-12-10 Thread rumbu via Digitalmars-d
Now I feel very dumb. I clicked on "D Programming Language", not on "D".

[Issue 16963] Wrong label name resolution in asm statement

2016-12-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16963 Răzvan Ștefănescu changed: What|Removed |Added See Also|

[Issue 474] in ASM block last line can't be a label

2016-12-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=474 Răzvan Ștefănescu changed: What|Removed |Added See Also|

[Issue 16963] New: Wrong label name resolution in asm statement

2016-12-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16963 Issue ID: 16963 Summary: Wrong label name resolution in asm statement Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: major

Re: CTFE Status

2016-12-10 Thread Stefan Koch via Digitalmars-d
On Saturday, 10 December 2016 at 18:51:32 UTC, Stefan Koch wrote: On Saturday, 10 December 2016 at 07:24:10 UTC, Stefan Koch wrote: FunctionPointers and plain function calls are currently in progress! Also I made further performance improvements to the Bytecode-generator. As of now it needs

Re: Getters/setters generator

2016-12-10 Thread Mike Bierlee via Digitalmars-d-announce
On Sunday, 11 December 2016 at 02:17:18 UTC, Mike Parker wrote: On Saturday, 10 December 2016 at 20:25:05 UTC, Mike Bierlee wrote: On Friday, 9 December 2016 at 10:27:05 UTC, Eugene Wissner wrote: It would generate 2 methods "num": one to set num_ and one to get its value. It would be great

[Issue 16794] .deb not working on Ubuntu 16.10 because of default PIE linking

2016-12-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16794 --- Comment #12 from Jonathan M Davis --- Okay. I take back what I just said about master. Either I had my machine in a funky state (I kept jumping between branches and might have screwed something up), or updating

[Issue 16794] .deb not working on Ubuntu 16.10 because of default PIE linking

2016-12-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16794 --- Comment #11 from Jonathan M Davis --- Well, there are multiple issues here. The primary one (and really what the focus of this bug report is given title) is that we need a solution that works for the package that we

Re: faster "stringification"

2016-12-10 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 11 December 2016 at 02:09:41 UTC, Orut wrote: D nub here. I have a Python script that I'd like to implement in D. For certain parts, the D equivalent was slower than Python's. For example, Python code: #dummy code s = ["abc", "fjkd", "L", "qwa", "r", "uw", "tiro", "bc", "sg",

Re: faster "stringification"

2016-12-10 Thread Stefan Koch via Digitalmars-d-learn
On Sunday, 11 December 2016 at 02:09:41 UTC, Orut wrote: D nub here. I have a Python script that I'd like to implement in D. For certain parts, the D equivalent was slower than Python's. For example, Python code: #dummy code s = ["abc", "fjkd", "L", "qwa", "r", "uw", "tiro", "bc", "sg",

rdmd completely broken (no -c, no relative path, no -d=, etc)

2016-12-10 Thread Timothee Cour via Digitalmars-d
rdmd seems completely broken: see https://issues.dlang.org/show_bug.cgi?id=16962

[Issue 16962] rdmd --build-only --force -c main.d fails: ./main: No such file or directory

2016-12-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16962 --- Comment #3 from Timothee Cour --- also broken: rdmd --build-only --force -od=/tmp/bar/ main.d std.file.FileException@std/file.d(679): =/tmp/bar/main: No such file or directory => rdmd doesn't seem to understand the new

Re: Getters/setters generator

2016-12-10 Thread Mike Parker via Digitalmars-d-announce
On Saturday, 10 December 2016 at 20:25:05 UTC, Mike Bierlee wrote: On Friday, 9 December 2016 at 10:27:05 UTC, Eugene Wissner wrote: It would generate 2 methods "num": one to set num_ and one to get its value. It would be great if you could generate @properties instead. I like the more

[Issue 16962] rdmd --build-only --force -c main.d fails: ./main: No such file or directory

2016-12-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16962 --- Comment #2 from Timothee Cour --- as well as: rdmd --build-only --force -lib -odtemp/ -o- main.d object.Exception@rdmd.d(95): Option -o- currently not supported by rdmd --

faster "stringification"

2016-12-10 Thread Orut via Digitalmars-d-learn
D nub here. I have a Python script that I'd like to implement in D. For certain parts, the D equivalent was slower than Python's. For example, Python code: #dummy code s = ["abc", "fjkd", "L", "qwa", "r", "uw", "tiro", "bc", "sg", "k", "jds", "yd"]; for i in range(1000): # a lot of

[Issue 16962] rdmd --build-only --force -c main.d fails: ./main: No such file or directory

2016-12-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16962 Timothee Cour changed: What|Removed |Added CC|

[Issue 16962] New: rdmd --build-only --force -c main.d fails: ./main: No such file or directory

2016-12-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16962 Issue ID: 16962 Summary: rdmd --build-only --force -c main.d fails: ./main: No such file or directory Product: D Version: D2 Hardware: x86 OS: All

Re: Bug tracking system broken

2016-12-10 Thread Ali Çehreli via Digitalmars-d
On 12/10/2016 03:16 PM, rumbu wrote: > "First, you must pick a product on which to enter an issue:" (nothing > below) That got me too: You need to click "D". Thanks to the person who changed that page presumably after we had that wave of spams, but please make the entire line link to the D

Re: Hosting vibe.d on OpenShift

2016-12-10 Thread Gerald via Digitalmars-d-learn
On Saturday, 10 December 2016 at 17:54:58 UTC, aberba wrote: On Thursday, 8 December 2016 at 20:37:23 UTC, Tiberiu Gal wrote: On Thursday, 8 December 2016 at 14:03:35 UTC, aberba wrote: I would like to try vibe.d with mongoDB on OpenShit. I managed to do that on Heroku. Do I need a buildpack

Bug tracking system broken

2016-12-10 Thread rumbu via Digitalmars-d
The bug tracking system must be broken. If I try to post something: "First, you must pick a product on which to enter an issue:" (nothing below) If I try to browse: "Select a product category to browse:" (nothing below) http://imgur.com/a/QogEo

Re: From r/linux: Which language should i use/learn ?

2016-12-10 Thread Chris Wright via Digitalmars-d
It's always a bit weird when people talk about "resources" as a unification of memory, files, sockets, etc. My programs exist to fill memory and then push bits of memory around. At least 99% of my "resource" usage is heap objects. If it gets slightly harder to deal with memory but utterly

Re: Getters/setters generator

2016-12-10 Thread Mike Bierlee via Digitalmars-d-announce
On Friday, 9 December 2016 at 10:27:05 UTC, Eugene Wissner wrote: It would generate 2 methods "num": one to set num_ and one to get its value. It would be great if you could generate @properties instead. I like the more natural way of accessing those instead of getters/setters.

Re: mkdir; remove; under Windows throw Exception

2016-12-10 Thread unDEFER via Digitalmars-d-learn
On Saturday, 10 December 2016 at 18:30:53 UTC, Adam D. Ruppe wrote: On Saturday, 10 December 2016 at 18:09:43 UTC, unDEFER wrote: I know, but why it works in Linux by Linux documentation? Coincidence. That detail is undefined in the D documentation which means the implementation is free to

Re: [Semi-OT] I don't want to leave this language!

2016-12-10 Thread Igor Shirkalin via Digitalmars-d-learn
On Monday, 5 December 2016 at 20:25:00 UTC, Ilya Yaroshenko wrote: Hi e-y-e, The main problem with D for production is its runtime. GC, DRuntime, Phobos is big constraint for real world software production. The almost only thing I do is real world software production (basically math and

Re: CTFE Status

2016-12-10 Thread Stefan Koch via Digitalmars-d
On Saturday, 10 December 2016 at 07:24:10 UTC, Stefan Koch wrote: FunctionPointers and plain function calls are currently in progress! Also I made further performance improvements to the Bytecode-generator. As of now it needs around 50 nano-seconds per generated instruction. Generation +

Re: How about a bounty for a new windows installer using inno setup ?

2016-12-10 Thread Bob Arnson via Digitalmars-d
On Thursday, 8 December 2016 at 02:06:30 UTC, Brad Anderson wrote: On Monday, 5 December 2016 at 19:33:33 UTC, Jim Hewes wrote: On 12/5/2016 3:19 AM, Kjartan F. Kvamme wrote: On Monday, 5 December 2016 at 09:24:59 UTC, Basile B. wrote: How about a bounty for a new windows installer using inno

Re: mkdir; remove; under Windows throw Exception

2016-12-10 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 10 December 2016 at 18:09:43 UTC, unDEFER wrote: I know, but why it works in Linux by Linux documentation? Coincidence. That detail is undefined in the D documentation which means the implementation is free to do whatever is easier for it in a platform-specific manner.

Re: From r/linux: Which language should i use/learn ?

2016-12-10 Thread Basile B. via Digitalmars-d
On Saturday, 10 December 2016 at 16:59:31 UTC, bachmeier wrote: On Saturday, 10 December 2016 at 16:16:54 UTC, Basile B. wrote: On Saturday, 10 December 2016 at 16:09:53 UTC, Basile B. wrote: So I've proposed D

Re: mkdir; remove; under Windows throw Exception

2016-12-10 Thread unDEFER via Digitalmars-d-learn
On Saturday, 10 December 2016 at 14:10:15 UTC, ag0aep6g wrote: On 12/10/2016 04:39 AM, unDEFER wrote: man remove: remove - remove a file or directory That's documentation for C, not for D. I know, but why it works in Linux by Linux documentation?

Re: Separate IP parts

2016-12-10 Thread aberba via Digitalmars-d-learn
On Saturday, 10 December 2016 at 13:25:13 UTC, Nicholas Wilson wrote: On Saturday, 10 December 2016 at 13:21:40 UTC, notna wrote: On Saturday, 10 December 2016 at 08:03:00 UTC, biozic wrote: [...] Well, you know, that's one of the not so great things about Dlang... you cannot even trust

Re: [OT] Is there anybody from D-community in Tel Aviv?

2016-12-10 Thread aberba via Digitalmars-d
On Saturday, 10 December 2016 at 13:29:20 UTC, Suliman wrote: On Saturday, 10 December 2016 at 08:10:46 UTC, Shachar Shemesh wrote: On 10/12/16 09:25, Suliman wrote: I plan to visit Tel Aviv from 31 December to 6-th of January of next year. Is there anybody who take part in D-community there?

Re: Hosting vibe.d on OpenShift

2016-12-10 Thread aberba via Digitalmars-d-learn
On Thursday, 8 December 2016 at 20:37:23 UTC, Tiberiu Gal wrote: On Thursday, 8 December 2016 at 14:03:35 UTC, aberba wrote: I would like to try vibe.d with mongoDB on OpenShit. I managed to do that on Heroku. Do I need a buildpack like vibe.d? Any help will be really appreciated. I've

Re: Tutorial: Form upload in vibe.d

2016-12-10 Thread aberba via Digitalmars-d-announce
On Thursday, 8 December 2016 at 20:48:52 UTC, NVolcz wrote: On Tuesday, 6 December 2016 at 22:28:04 UTC, aberba wrote: [...] Love the article! Please keep writing tutorials like this :-D. Feedback: 1. The upload function is (kind of) vulnerable against path traversal:

Re: From r/linux: Which language should i use/learn ?

2016-12-10 Thread bachmeier via Digitalmars-d
On Saturday, 10 December 2016 at 16:16:54 UTC, Basile B. wrote: On Saturday, 10 December 2016 at 16:09:53 UTC, Basile B. wrote: So I've proposed D https://www.reddit.com/r/linux/comments/5hiva7/which_language_should_i_uselearn/db0mvy1/ And I've hit a Rust user. The punch is

Re: Getters/setters generator

2016-12-10 Thread Iakh via Digitalmars-d-announce
On Friday, 9 December 2016 at 16:30:55 UTC, Eugene Wissner wrote: On Friday, 9 December 2016 at 12:37:58 UTC, Iakh wrote: Is there possibility to remove affixes in generated accessor names? No, there is no way to manipulate the accessor names. What affixes do you mean? You can remove

Re: From r/linux: Which language should i use/learn ?

2016-12-10 Thread Basile B. via Digitalmars-d
On Saturday, 10 December 2016 at 16:09:53 UTC, Basile B. wrote: So I've proposed D https://www.reddit.com/r/linux/comments/5hiva7/which_language_should_i_uselearn/db0mvy1/ And I've hit a Rust user. The punch is

From r/linux: Which language should i use/learn ?

2016-12-10 Thread Basile B. via Digitalmars-d
So I've proposed D https://www.reddit.com/r/linux/comments/5hiva7/which_language_should_i_uselearn/db0mvy1/ And I've hit a Rust user. The punch is https://www.reddit.com/r/rust/comments/5h0s2n/what_made_rust_more_popular_than_d/dawqu9i/ Fell free to contribute on reddit

Re: DConf 2017: Bigger, Badder, and Berliner! Call for Submissions now open

2016-12-10 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 12/10/16 10:56 AM, Andrei Alexandrescu wrote: On 11/25/16 9:10 PM, Andy Smith wrote: I see this was pulled but no feedback as to whether it looked okay? Doesn't seem to have made its way into the Dconf 2017 site. Seriously I have no idea how my PR looks as I've not idea how to run ddoc. All

Re: DConf 2017: Bigger, Badder, and Berliner! Call for Submissions now open

2016-12-10 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 11/25/16 9:10 PM, Andy Smith wrote: I see this was pulled but no feedback as to whether it looked okay? Doesn't seem to have made its way into the Dconf 2017 site. Seriously I have no idea how my PR looks as I've not idea how to run ddoc. All I know is that the 2017 site as it stands could

[Issue 16747] [Reg 2.072] Cannot have stack allocated classes in @safe code

2016-12-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16747 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu

Re: Installing ldc breaks gdc

2016-12-10 Thread Eduard Staniloiu via Digitalmars-d
On Friday, 9 December 2016 at 17:34:35 UTC, Daniel Kozak wrote: On Friday, 9 December 2016 at 17:34:35 UTC, Daniel Kozak wrote: No thats all wrong, dmd a gdc could not use same include directory that is not possible. GDC use /usr/lib/gcc/x86_64-linux-gnu/5/include/d/ Yes and no.. as you

Re: DIP 1003: remove `body` as a keyword

2016-12-10 Thread Basile B. via Digitalmars-d-announce
On Saturday, 10 December 2016 at 13:49:09 UTC, Basile B. wrote: On Monday, 28 November 2016 at 02:17:20 UTC, Dicebot wrote: On 11/24/2016 05:29 PM, WM.H wrote: On Saturday, 19 November 2016 at 21:16:15 UTC, Dicebot wrote: DIP 1003 is merged to the queue and open for public informal feedback.

Re: mkdir; remove; under Windows throw Exception

2016-12-10 Thread ag0aep6g via Digitalmars-d-learn
On 12/10/2016 04:39 AM, unDEFER wrote: man remove: remove - remove a file or directory That's documentation for C, not for D. The function which removes only files named unlink. The D must guarantee the same behaviour of remove on all OSes. D has no obligation to follow C in function

Re: DIP 1003: remove `body` as a keyword

2016-12-10 Thread Basile B. via Digitalmars-d-announce
On Monday, 28 November 2016 at 02:17:20 UTC, Dicebot wrote: On 11/24/2016 05:29 PM, WM.H wrote: On Saturday, 19 November 2016 at 21:16:15 UTC, Dicebot wrote: DIP 1003 is merged to the queue and open for public informal feedback. PR: https://github.com/dlang/DIPs/pull/48 Initial merged

Re: [OT] Is there anybody from D-community in Tel Aviv?

2016-12-10 Thread Suliman via Digitalmars-d
On Saturday, 10 December 2016 at 08:10:46 UTC, Shachar Shemesh wrote: On 10/12/16 09:25, Suliman wrote: I plan to visit Tel Aviv from 31 December to 6-th of January of next year. Is there anybody who take part in D-community there? There are about 30 D programmers in the Weka.io offices in

Re: Separate IP parts

2016-12-10 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 10 December 2016 at 13:21:40 UTC, notna wrote: On Saturday, 10 December 2016 at 08:03:00 UTC, biozic wrote: [...] Well, you know, that's one of the not so great things about Dlang... you cannot even trust the provided examples, if there are any: [...] Those statements

Re: Separate IP parts

2016-12-10 Thread notna via Digitalmars-d-learn
On Saturday, 10 December 2016 at 08:03:00 UTC, biozic wrote: This would do the same. I wouldn't say it's a trick. import std.format : formattedRead; import std.stdio : writefln; string ipAddr = "192.168.1.54"; int a, b, c, d; formattedRead(ipAddr, "%d.%d.%d.%d", , , , );

Re: ETA: std.experimental.allocator -> std.allocator

2016-12-10 Thread Jacob Carlborg via Digitalmars-d
On 2016-12-10 05:18, Seb wrote: Hi all, tl;dr: I would like to start having GC-free methods and data structures in Phobos, which depends on std.allocator being stable (i.e not in experimental). Q1: So I would like to know what's missing/blocking this? I think it needs to be CTFE compatible. I

Re: CTFE Status

2016-12-10 Thread Basile B. via Digitalmars-d
On Saturday, 10 December 2016 at 11:03:11 UTC, Stefan Koch wrote: This was not found by the compilers testsuite! Have you already thought to use fuzz testing ? I'm sure it would find some weird failure cases. The other day I've found that `enum a=null+null;` triggers a CTFE ICE. It's on the

Re: CTFE Status

2016-12-10 Thread Stefan Koch via Digitalmars-d
On Monday, 31 October 2016 at 13:29:01 UTC, Stefan Koch wrote: Hi Guys, since I got a few complaints about giving minor status updates in the announce group, I am opening this thread. I will start with giving an overview of what works and what does not work. Currently the only basic type

Re: function is not callable using argument types ()

2016-12-10 Thread Stefan Koch via Digitalmars-d-learn
On Saturday, 10 December 2016 at 08:41:56 UTC, Suliman wrote: import std.stdio; import std.concurrency; void main() { void sp(int i) { receive((int i) { writeln("i: ", i); }); } auto r = new Generator!int( { foreach(i; 1

function is not callable using argument types ()

2016-12-10 Thread Suliman via Digitalmars-d-learn
import std.stdio; import std.concurrency; void main() { void sp(int i) { receive((int i) { writeln("i: ", i); }); } auto r = new Generator!int( { foreach(i; 1 .. 10) yield(i); });

Re: Is this a bug?

2016-12-10 Thread bauss (wtf happend to my name took some old cached title LOL??) via Digitalmars-d
On Saturday, 10 December 2016 at 08:25:49 UTC, Timon Gehr wrote: On 10.12.2016 09:09, Is it possible to store different generic This is intended (but surprising, and IMHO bad) behaviour, as D follows C integral promotion rules. (C# does not.) Mixed signed/unsigned operations first convert

Re: Is this a bug?

2016-12-10 Thread Timon Gehr via Digitalmars-d
On 10.12.2016 09:24, Is it possible to store different generic types? wrote: On Saturday, 10 December 2016 at 08:21:17 UTC, Stefan Koch wrote: On Saturday, 10 December 2016 at 08:16:48 UTC, Is it possible to store different generic types? wrote: On Saturday, 10 December 2016 at 08:09:00 UTC,

Re: Is this a bug?

2016-12-10 Thread Is it possible to store different generic types? via Digitalmars-d
On Saturday, 10 December 2016 at 08:23:06 UTC, Ali Çehreli wrote: On 12/10/2016 12:16 AM, Is it possible to store different generic types? wrote: > Okay the issue seem to be that D casts the left-hand argument to the > same type as the right-hand argument. Seems to be but not true. It's more

Re: Is this a bug?

2016-12-10 Thread Timon Gehr via Digitalmars-d
On 10.12.2016 09:09, Is it possible to store different generic types? wrote: I'm pretty sure the following code should work, but it doesn't. ``` bool intersect(ptrdiff_t targetX, ptrdiff_t targetY, size_t targetWidth, size_t targetHeight, ptrdiff_t x, ptrdiff_t y, size_t width, size_t height) {

Re: Is this a bug?

2016-12-10 Thread Is it possible to store different generic types? via Digitalmars-d
On Saturday, 10 December 2016 at 08:21:17 UTC, Stefan Koch wrote: On Saturday, 10 December 2016 at 08:16:48 UTC, Is it possible to store different generic types? wrote: On Saturday, 10 December 2016 at 08:09:00 UTC, Is it possible to store different generic types? wrote: [...] Okay the issue

Re: Is this a bug?

2016-12-10 Thread Ali Çehreli via Digitalmars-d
On 12/10/2016 12:16 AM, Is it possible to store different generic types? wrote: > Okay the issue seem to be that D casts the left-hand argument to the > same type as the right-hand argument. Seems to be but not true. It's more like "anything that touches an unsigned type turns unsigned". :)

Re: Is this a bug?

2016-12-10 Thread Stefan Koch via Digitalmars-d
On Saturday, 10 December 2016 at 08:16:48 UTC, Is it possible to store different generic types? wrote: On Saturday, 10 December 2016 at 08:09:00 UTC, Is it possible to store different generic types? wrote: [...] Okay the issue seem to be that D casts the left-hand argument to the same type as

Re: Is this a bug?

2016-12-10 Thread Is it possible to store different generic types? via Digitalmars-d
On Saturday, 10 December 2016 at 08:09:00 UTC, Is it possible to store different generic types? wrote: I'm pretty sure the following code should work, but it doesn't. ``` bool intersect(ptrdiff_t targetX, ptrdiff_t targetY, size_t targetWidth, size_t targetHeight, ptrdiff_t x, ptrdiff_t y,

Re: [OT] Is there anybody from D-community in Tel Aviv?

2016-12-10 Thread Shachar Shemesh via Digitalmars-d
On 10/12/16 09:25, Suliman wrote: I plan to visit Tel Aviv from 31 December to 6-th of January of next year. Is there anybody who take part in D-community there? There are about 30 D programmers in the Weka.io offices in Tel Aviv. We'll gladly offer you coffee and conversation, if you want to

Is this a bug?

2016-12-10 Thread Is it possible to store different generic types? via Digitalmars-d
I'm pretty sure the following code should work, but it doesn't. ``` bool intersect(ptrdiff_t targetX, ptrdiff_t targetY, size_t targetWidth, size_t targetHeight, ptrdiff_t x, ptrdiff_t y, size_t width, size_t height) { return targetX < x + width && x < targetX + targetWidth &&

Re: Separate IP parts

2016-12-10 Thread biozic via Digitalmars-d-learn
On Saturday, 10 December 2016 at 03:51:34 UTC, brocolis wrote: How do I separate IP parts with dlang? I found this very cool trick, with C++: http://stackoverflow.com/a/5328190 std::string ip ="192.168.1.54"; std::stringstream s(ip); int a,b,c,d; //to store the 4 ints char ch; //to

Re: staticIota is easy

2016-12-10 Thread Stefan Koch via Digitalmars-d-learn
On Saturday, 10 December 2016 at 01:48:24 UTC, Ali Çehreli wrote: On 12/09/2016 05:34 PM, Stefan Koch wrote: On Friday, 9 December 2016 at 18:52:59 UTC, Ali Çehreli wrote: I thought I needed something like staticIota in a unittest to effect static foreach over a number range and I found one in