[Issue 14639] Assigning init value to struct uses stack, causing segfault

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14639 Walter Bright changed: What|Removed |Added CC|

Re: DConf 2017 Hackathon report

2017-05-10 Thread Atila Neves via Digitalmars-d
On Tuesday, 9 May 2017 at 04:35:40 UTC, Ali Çehreli wrote: Please list what we've achieved during the hackathon, including what is started but is likely to be finished in the coming days or months. For me: - Finished updating "Programming in D" to 2.074.0 (the HTML is now up to date but I

Re: Jonathan Blow's presentation

2017-05-10 Thread Ethan Watson via Digitalmars-d
On Tuesday, 9 May 2017 at 23:47:46 UTC, Era Scarecrow wrote: Nope, uncompressed. Seems some games they decided the small amount of time spent decompressing audio and textures was too high, which is why some of the games are 50Gb in size, because it's more important to have larger textures than

[Issue 14639] Assigning init value to struct uses stack, causing segfault

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14639 --- Comment #2 from Walter Bright --- https://github.com/dlang/dmd/pull/6766 --

Re: Static foreach pull request

2017-05-10 Thread Stefan Koch via Digitalmars-d
On Wednesday, 10 May 2017 at 09:42:53 UTC, Timon Gehr wrote: On 09.05.2017 23:56, Timon Gehr wrote: core.exception.AssertError@ddmd/blockexit.d(90): Assertion failure ... Thanks! (It's a known issue though:

Re: Fantastic exchange from DConf

2017-05-10 Thread Ali Çehreli via Digitalmars-d
On 05/09/2017 10:26 PM, H. S. Teoh via Digitalmars-d wrote: > On Wed, May 10, 2017 at 01:32:33AM +, Jack Stouffer via Digitalmars-d wrote: >> On Wednesday, 10 May 2017 at 00:30:42 UTC, H. S. Teoh wrote: >>>strncpy(tmp, desc->data1, bufsz); >>>if (fwrite(tmp,

Re: Static foreach pull request

2017-05-10 Thread Timon Gehr via Digitalmars-d
On 09.05.2017 23:56, Timon Gehr wrote: core.exception.AssertError@ddmd/blockexit.d(90): Assertion failure ... Thanks! (It's a known issue though: https://github.com/tgehr/dmd/blob/static-foreach/test_staticforeach.d#L330.) Actually, yours is a different case with the same

Re: Fantastic exchange from DConf

2017-05-10 Thread Dmitry Olshansky via Digitalmars-d
On 5/10/17 8:28 AM, H. S. Teoh via Digitalmars-d wrote: C++'s fundamental paradigm has always been "Premature-optimization oriented programming". C++ promotes POOP. LOL!! Perhaps I'm just being cynical, but my current unfounded hypothesis is that the majority of C/C++ programmers don't use a

dmd: can't build on Arch Linux or latest Ubuntu

2017-05-10 Thread Atila Neves via Digitalmars-d
I can't build dmd on Arch Linux anymore. I'm told it's because of a binutils update. Annoying. So I went "I know, I'll just use a container". I tried Ubuntu Zesty in docker. That doesn't build dmd off the bat either, it fails with PIC errors. I'm using Trusty, and that works. But... it's a

Re: DConf 2017 Hackathon report

2017-05-10 Thread Stefan Koch via Digitalmars-d
On Wednesday, 10 May 2017 at 10:55:09 UTC, Atila Neves wrote: I felt like a wizard afterwards for modifying the compiler, which is a nice bonus. Nice, I usually feel confused after modifying the compiler. Now if only I could get the autotester to be green... Just think about how much

Re: Fantastic exchange from DConf

2017-05-10 Thread Atila Neves via Digitalmars-d
On Wednesday, 10 May 2017 at 06:28:31 UTC, H. S. Teoh wrote: On Tue, May 09, 2017 at 09:19:08PM -0400, Nick Sabalausky (Abscissa) via Digitalmars-d wrote: On 05/09/2017 08:30 PM, H. S. Teoh via Digitalmars-d wrote: > > In this sense I agree with Walter that warnings are > basically useless,

Re: Mir Algorithm v0.5.8: Interpolation, Timeseries and 17 new functions

2017-05-10 Thread 9il via Digitalmars-d-announce
On Tuesday, 9 May 2017 at 20:35:18 UTC, jmh530 wrote: On Tuesday, 9 May 2017 at 17:35:18 UTC, 9il wrote: [...] Ah, I see the issue. I may just focus on generalizing the time dimension to coordinates for now. [...] I have fixed small parts. I have invited you to the Mir Github team.

Re: Fantastic exchange from DConf

2017-05-10 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, May 09, 2017 07:13:31 Walter Bright via Digitalmars-d wrote: > On 5/8/2017 1:55 PM, John Carter wrote: > > On Saturday, 6 May 2017 at 06:26:29 UTC, Joakim wrote: > >> Walter: I believe memory safety will kill C. > > > > C/C++ has been granted an extension of life by the likes of

Re: Looking for an equivalent to C++ std::getline in D

2017-05-10 Thread Ali Çehreli via Digitalmars-d-learn
On 05/09/2017 01:17 AM, k-five wrote: > On Monday, 8 May 2017 at 21:37:17 UTC, Ali Çehreli wrote: >> On 05/06/2017 02:24 AM, Stanislav Blinov wrote: >> > > It may D has this philosophy as Perl has: There's more than one way to > do it D certainly

concepts v0.0.6: use a run-time interface to specify a compile-time one

2017-05-10 Thread Atila Neves via Digitalmars-d-announce
http://code.dlang.org/packages/concepts concepts is a dub package and library that allows one to declare that a struct conforms to a "compile-time interface" such as `isInputRange`. The difference between this and a simple `static assert(isInputRange!MyType)` is that when the static assert

[Issue 17389] New: std.traits.hasNested fails for class with member of same type

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17389 Issue ID: 17389 Summary: std.traits.hasNested fails for class with member of same type Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW

The cost of doing compile time introspection

2017-05-10 Thread Moritz Maxeiner via Digitalmars-d
So, after being asked to support dynamic loading in llvm-d[1] at DConf 2017 I essentially had the following two options: - have two separate declarations of the bindings, one with the function signatures (linking) and one with function pointers (loading) - Have one declaration and derive the

Re: DIP 1007 Preliminary Review Round 1

2017-05-10 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 04/25/2017 08:33 AM, Steven Schveighoffer wrote: In the general case, one year is too long. A couple compiler releases should be sufficient. * When the @future attribute is added, would one add it on a dummy symbol or would one provide the implementation as well? dummy symbol. Think of

[Issue 16746] Please output Makefile-style depfiles for ninja and make

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16746 --- Comment #13 from Vladimir Panteleev --- (In reply to Matthias Klumpp from comment #12) > Sounds really good, but AFAIK this is still in the far future... > GDC supports writing depfiles properly, and having this feature

Re: Processing a gzipped csv-file by line-by-line

2017-05-10 Thread Seb via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 23:19:15 UTC, H. S. Teoh wrote: Also, if you need to parse lots of CSV data very fast, you might be interested in this: https://github.com/quickfur/fastcsv T Or asdf: https://github.com/tamediadigital/asdf

Re: Processing a gzipped csv-file by line-by-line

2017-05-10 Thread Jesse Phillips via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 22:20:52 UTC, Nordlöw wrote: What's fastest way to on-the-fly-decompress and process a gzipped csv-fil line by line? Is it possible to combine http://dlang.org/phobos/std_zlib.html with some stream variant of File(path).byLineFast ? You can't really parse a

Re: DIP 1007 Preliminary Review Round 1

2017-05-10 Thread Steven Schveighoffer via Digitalmars-d
On 5/10/17 11:15 AM, Dicebot wrote: On Tuesday, 25 April 2017 at 12:33:44 UTC, Steven Schveighoffer wrote: Actually, that brings up a problem with this, what is the mechanism to say "maybe override"? Let's say you have: // in imported library class Base { void foo() @future; } // in user

Re: alloca without runtime?

2017-05-10 Thread 岩倉 澪 via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 20:25:45 UTC, aberba wrote: On Thursday, 4 May 2017 at 14:54:58 UTC, 岩倉 澪 wrote: On Thursday, 4 May 2017 at 12:50:02 UTC, Kagamin wrote: You can try ldc and llvm intrinsics http://llvm.org/docs/LangRef.html#alloca-instruction

Re: Processing a gzipped csv-file by line-by-line

2017-05-10 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 22:20:52 UTC, Nordlöw wrote: What's fastest way to on-the-fly-decompress and process a gzipped csv-fil line by line? Is it possible to combine http://dlang.org/phobos/std_zlib.html with some stream variant of File(path).byLineFast ? I suggest you take a look

Re: "I made a game using Rust"

2017-05-10 Thread H. S. Teoh via Digitalmars-d
On Wed, May 10, 2017 at 07:52:53PM -0400, Steven Schveighoffer via Digitalmars-d wrote: [...] > I'll reiterate here: if the compiler's sanity is suspect, there's nothing > much for it to do except crash. hard. And tell you where to look. [...] OTOH, it's not very nice from a user's POV. It

Re: Processing a gzipped csv-file by line-by-line

2017-05-10 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, May 10, 2017 at 11:17:44PM +, Nicholas Wilson via Digitalmars-d-learn wrote: > On Wednesday, 10 May 2017 at 22:20:52 UTC, Nordlöw wrote: > > What's fastest way to on-the-fly-decompress and process a gzipped > > csv-fil line by line? > > > > Is it possible to combine > > > >

Re: Kafka site needs to be updated with D modules

2017-05-10 Thread Ali Çehreli via Digitalmars-d
Ping... On 04/28/2017 11:36 AM, Ali Çehreli wrote: There are three D modules that I could identify that provide Kafka bindings[1] by searching for "kafka" on the code registry: http://code.dlang.org/ Could people in the know please update the Kafka site with necessary information like what

[Issue 16588] uniq's BidirectionalRange behavior is inconsistent with its InputRange behavior

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16588 greensunn...@gmail.com changed: What|Removed |Added CC||greensunn...@gmail.com --

Re: DIP 1007 Preliminary Review Round 1

2017-05-10 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
This is what FQNs are for. At least, it was before FQNs were broken, first by an incomplete "package.d" system and second by a goofy half-baked change to import rules. FQNs need fixed. This DIP is just a questionable workaround for our borked FQNs that that smacks of C++-style "no breakage at

NetBSD amd64: which way is the best for supporting 80 bits real/double?

2017-05-10 Thread Nikolay via Digitalmars-d
I am porting LDC to NetBSD amd64, and I ask advice how to handle real type. NetBSD has limited support for this type. This type exists, but standard library does not provide full set of math functions for it (e.g. sinus, cosinus, and etc). Currently I just forward all function calls to 64 bits

Re: "I made a game using Rust"

2017-05-10 Thread rikki cattermole via Digitalmars-d
On 10/05/2017 7:20 PM, zetashift wrote: On Wednesday, 10 May 2017 at 12:52:34 UTC, JN wrote: I wonder, would it be possible for D in the current state to achieve the same? I imagine iOS isn't possible yet and Android is just getting there? Reading this thread while going through the online D

[Issue 16746] Please output Makefile-style depfiles for ninja and make

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16746 --- Comment #11 from Vladimir Panteleev --- (In reply to Matthias Klumpp from comment #10) > Because the wrapper is not available everywhere, and going through a wrapper > in order to fix a missing thing in dmd is just a

[Issue 17391] SECURITY: XSS through DDOC comments

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17391 --- Comment #7 from Cédric Picard --- (In reply to Vladimir Panteleev from comment #5) > (In reply to Cédric Picard from comment #4) > > Not at all, while what you describe is the most common case there are many > > things

[Issue 16588] uniq's BidirectionalRange behavior is inconsistent with its InputRange behavior

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16588 Vladimir Panteleev changed: What|Removed |Added Status|RESOLVED|REOPENED

Re: "I made a game using Rust"

2017-05-10 Thread Steven Schveighoffer via Digitalmars-d
On 5/10/17 10:37 AM, Ethan Watson wrote: On Wednesday, 10 May 2017 at 14:31:28 UTC, Vladimir Panteleev wrote: Internal compiler errors (ICEs) are bugs which are generally treated as high priority. Please report them. See my previous rant on this subject.

[Issue 17264] [REG2.073] uniq fails with const elements

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17264 --- Comment #3 from github-bugzi...@puremagic.com --- Commit pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/113502af744fb82d68e8f51fd73831b628dcc1eb std.algorithm.iteration: Add test for issue 17264 Fixes

Re: "I made a game using Rust"

2017-05-10 Thread evilrat via Digitalmars-d
On Wednesday, 10 May 2017 at 22:13:29 UTC, Lewis wrote: On Wednesday, 10 May 2017 at 12:52:34 UTC, JN wrote: PROS The Rust article mentions build times as a downside. In contrast, that has been one of the upsides of D for me. My build time is ~1.75s for a usual-case rebuild (all the game

Re: Problems with Array Assignment?

2017-05-10 Thread Samwise via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 20:01:16 UTC, Adam D. Ruppe wrote: ... Thanks loads. Thanks to this my next commit is going to have quite a few improvements that clean up the engine code considerably. I appreciate the help.

Re: concepts v0.0.6: use a run-time interface to specify a compile-time one

2017-05-10 Thread Luís Marques via Digitalmars-d-announce
On Wednesday, 10 May 2017 at 10:53:59 UTC, Atila Neves wrote: concepts is a dub package and library that allows one to declare that a struct conforms to a "compile-time interface" such as `isInputRange`. Awesome!

[Issue 16746] Please output Makefile-style depfiles for ninja and make

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16746 --- Comment #12 from Matthias Klumpp --- (In reply to Vladimir Panteleev from comment #11) > (In reply to Matthias Klumpp from comment #10) > > Because the wrapper is not available everywhere, and going through a wrapper > >

[Issue 16588] uniq's BidirectionalRange behavior is inconsistent with its InputRange behavior

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16588 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --

Re: DIP 1007 Preliminary Review Round 1

2017-05-10 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 05/10/2017 09:51 PM, Nick Sabalausky (Abscissa) wrote: This is what FQNs are for. At least, it was before FQNs were broken, first by an incomplete "package.d" system and second by a goofy half-baked change to import rules. FQNs need fixed. This DIP is just a questionable workaround for our

Re: DIP 1007 Preliminary Review Round 1

2017-05-10 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 05/10/2017 11:04 PM, Nick Sabalausky (Abscissa) wrote: On 05/10/2017 09:51 PM, Nick Sabalausky (Abscissa) wrote: This is what FQNs are for. At least, it was before FQNs were broken, first by an incomplete "package.d" system and second by a goofy half-baked change to import rules. FQNs need

Re: Access specifiers and visibility

2017-05-10 Thread Jesse Phillips via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 13:29:40 UTC, Andrew Edwards wrote: On Wednesday, 10 May 2017 at 13:13:46 UTC, Jesse Phillips wrote: On Wednesday, 10 May 2017 at 01:42:47 UTC, Andrew Edwards wrote: Attempting to update a git repo to current D, I encounter the following deprecation messages:

Re: "I made a game using Rust"

2017-05-10 Thread JN via Digitalmars-d
On Wednesday, 10 May 2017 at 18:20:01 UTC, zetashift wrote: On Wednesday, 10 May 2017 at 12:52:34 UTC, JN wrote: I wonder, would it be possible for D in the current state to achieve the same? I imagine iOS isn't possible yet and Android is just getting there? Reading this thread while going

Re: "I made a game using Rust"

2017-05-10 Thread Lewis via Digitalmars-d
On Wednesday, 10 May 2017 at 12:52:34 UTC, JN wrote: I wonder, would it be possible for D in the current state to achieve the same? I imagine iOS isn't possible yet and Android is just getting there? I've been developing a small 2D PC-only game in my free time over the last year or so (10

Processing a gzipped csv-file by line-by-line

2017-05-10 Thread Nordlöw via Digitalmars-d-learn
What's fastest way to on-the-fly-decompress and process a gzipped csv-fil line by line? Is it possible to combine http://dlang.org/phobos/std_zlib.html with some stream variant of File(path).byLineFast ?

Re: Processing a gzipped csv-file by line-by-line

2017-05-10 Thread ketmar via Digitalmars-d-learn
Nordlöw wrote: What's fastest way to on-the-fly-decompress and process a gzipped csv-fil line by line? Is it possible to combine http://dlang.org/phobos/std_zlib.html with some stream variant of File(path).byLineFast ? iv.vfs[0] can do that (transparently decompress gzip files, and

[Issue 16746] Please output Makefile-style depfiles for ninja and make

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16746 --- Comment #10 from Matthias Klumpp --- (In reply to Vladimir Panteleev from comment #9) > (In reply to Matthias Klumpp from comment #8) > > Yes, it doesn't support all command-line flags one would use with ldc, gdc > > or

Re: Fantastic exchange from DConf

2017-05-10 Thread H. S. Teoh via Digitalmars-d
On Wed, May 10, 2017 at 11:16:57AM +, Atila Neves via Digitalmars-d wrote: [...] > The likelihood of a randomly picked C/C++ programmer not even knowing > what a profiler is, much less having used one, is extremely high in my > experience. I worked with a lot of embedded C programmers with >

Re: Thoughts on some code breakage with 2.074

2017-05-10 Thread Ali Çehreli via Digitalmars-d
On 05/10/2017 11:49 AM, Jonathan M Davis via Digitalmars-d wrote: > On Wednesday, May 10, 2017 05:05:59 Ali Çehreli via Digitalmars-d wrote: >> On 05/09/2017 10:34 AM, H. S. Teoh via Digitalmars-d wrote: >> > After upgrading the compiler, I get a warning that using a pointer as a >> >

Re: DConf 2017 Hackathon report

2017-05-10 Thread Adrian Matoga via Digitalmars-d
On Tuesday, 9 May 2017 at 13:19:12 UTC, Steven Schveighoffer wrote: But it was very awesome to be able to go around and find the people to discuss a PR/idea without going through a forum thread. I think there's a psychological barrier that happens when you post a complete argument, and then

Re: Simulating reference variables using `alias this`

2017-05-10 Thread Carl Sturtivant via Digitalmars-d
On Wednesday, 10 May 2017 at 17:48:53 UTC, MrSmith wrote: On Wednesday, 10 May 2017 at 17:12:11 UTC, Carl Sturtivant wrote: Here's the beginning of an interesting little experiment to simulate reference variables using `alias this` to disguise a pointer as a reference. Could add a destructor

Re: The cost of doing compile time introspection

2017-05-10 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 10 May 2017 at 14:03:58 UTC, Biotronic wrote: On Wednesday, 10 May 2017 at 11:45:05 UTC, Moritz Maxeiner wrote: [CTFE slow] First, as you may know, Stefan Koch is working on an improved CTFE engine that will hopefully make things a lot better. As he already pointed out, it

Re: Problems with Array Assignment?

2017-05-10 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 17:47:57 UTC, Samwise wrote: The expected behavior for this is to just see "Different Text" and "Other Text", instead of having any time to see just "Text". However, it seems that the second update method is having the effect that the first call should, and then

Re: Fantastic exchange from DConf

2017-05-10 Thread H. S. Teoh via Digitalmars-d
On Wed, May 10, 2017 at 04:38:48AM -0700, Ali Çehreli via Digitalmars-d wrote: > On 05/09/2017 10:26 PM, H. S. Teoh via Digitalmars-d wrote: > > On Wed, May 10, 2017 at 01:32:33AM +, Jack Stouffer via Digitalmars-d > wrote: > >> On Wednesday, 10 May 2017 at 00:30:42 UTC, H. S. Teoh wrote:

Re: alloca without runtime?

2017-05-10 Thread aberba via Digitalmars-d-learn
On Thursday, 4 May 2017 at 14:54:58 UTC, 岩倉 澪 wrote: On Thursday, 4 May 2017 at 12:50:02 UTC, Kagamin wrote: You can try ldc and llvm intrinsics http://llvm.org/docs/LangRef.html#alloca-instruction http://llvm.org/docs/LangRef.html#llvm-stacksave-intrinsic Ah, yep! pragma(LDC_alloca) void*

[Issue 17391] New: SECURITY: XSS through DDOC comments

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17391 Issue ID: 17391 Summary: SECURITY: XSS through DDOC comments Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority:

Re: Fantastic exchange from DConf

2017-05-10 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 10 May 2017 at 06:28:31 UTC, H. S. Teoh wrote: On Tue, May 09, 2017 at 09:19:08PM -0400, Nick Sabalausky [...] Perhaps I'm just being cynical, but my current unfounded hypothesis is that the majority of C/C++ programmers ... Just a nitpick, could we also please stop conflating

Re: Looking for an equivalent to C++ std::getline in D

2017-05-10 Thread k-five via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 10:47:13 UTC, Ali Çehreli wrote: On 05/09/2017 01:17 AM, k-five wrote: > On Monday, 8 May 2017 at 21:37:17 UTC, Ali Çehreli wrote: >> On 05/06/2017 02:24 AM, Stanislav Blinov wrote: >> Plus, wrapping steps of the

How to avoid throwing an exceptions for a built-in function?

2017-05-10 Thread k-five via Digitalmars-d-learn
I have a line of code that uses "to" function in std.conv for a purpose like: int index = to!int( user_apply[ 4 ] ); // string to int When the user_apply[ 4 ] has value, there is no problem; but when it is empty: "" it throws an ConvException exception and I want to avoid this exception.

Re: Access specifiers and visibility

2017-05-10 Thread Jesse Phillips via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 01:42:47 UTC, Andrew Edwards wrote: Attempting to update a git repo to current D, I encounter the following deprecation messages: src/glwtf/signals.d-mixin-256(256,2): Deprecation: glwtf.input.BaseGLFWEventHandler._on_key_down is not visible from module

Re: Access specifiers and visibility

2017-05-10 Thread Andrew Edwards via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 13:13:46 UTC, Jesse Phillips wrote: On Wednesday, 10 May 2017 at 01:42:47 UTC, Andrew Edwards wrote: Attempting to update a git repo to current D, I encounter the following deprecation messages: src/glwtf/signals.d-mixin-256(256,2): Deprecation:

Re: The cost of doing compile time introspection

2017-05-10 Thread Biotronic via Digitalmars-d
On Wednesday, 10 May 2017 at 11:45:05 UTC, Moritz Maxeiner wrote: [CTFE slow] First, as you may know, Stefan Koch is working on an improved CTFE engine that will hopefully make things a lot better. As for making the code faster right now, could this be done with mixin templates instead?

Re: Looking for an equivalent to C++ std::getline in D

2017-05-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, May 09, 2017 21:37:19 Moritz Maxeiner via Digitalmars-d-learn wrote: > On Tuesday, 9 May 2017 at 19:11:08 UTC, Jonathan M Davis wrote: > > LOL. I get the impression that it's often the tendancy of D > > folks is to get excited when D shows up as high in a list like > > Tiobe and to

Re: Static foreach pull request

2017-05-10 Thread Stefan Koch via Digitalmars-d
On Wednesday, 10 May 2017 at 13:11:46 UTC, Atila Neves wrote: On Wednesday, 10 May 2017 at 11:12:06 UTC, Stefan Koch wrote: null : () { Slice* s; s = null; return s; } [] : () { Slice* s; s = alloca(sizeof(*s)); s.base = null; s.length = 0; return s; } Therefore null.length =>

Re: How to avoid throwing an exceptions for a built-in function?

2017-05-10 Thread Stanislav Blinov via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 13:27:17 UTC, k-five wrote: Thanks, but I know about what are you saying. The user_apply[4] has so many possibilities and I cannot use if-else That doesn't sound right. Either you've already handled all the possible cases and thus expect the to! to not throw (can

Re: CTFE Status 2

2017-05-10 Thread Stefan Koch via Digitalmars-d
On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote: [ ... ] Thanks to Daniel Murphy's input; '&&' works now in my experimental version. I hope to get it to pass the auto-tester soon! This is a big step :) Thanks Daniel.

Re: What's a good wat to trunctate a time point

2017-05-10 Thread Biotronic via Digitalmars-d-learn
On Friday, 5 May 2017 at 09:14:21 UTC, Biotronic wrote: Here's an implementation that supports start of year, month, week, day, hour, minute and second. Works for DateTime and SysTime. Not heavily tested (all tests included): As the last sentence says, there were holes in the testing,

Re: How to avoid throwing an exceptions for a built-in function?

2017-05-10 Thread Ivan Kazmenko via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 12:40:41 UTC, k-five wrote: I have a line of code that uses "to" function in std.conv for a purpose like: int index = to!int( user_apply[ 4 ] ); // string to int When the user_apply[ 4 ] has value, there is no problem; but when it is empty: "" it throws an

Re: "I made a game using Rust"

2017-05-10 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 10 May 2017 at 12:52:34 UTC, JN wrote: I wonder, would it be possible for D in the current state to achieve the same? I imagine iOS isn't possible yet and Android is just getting there? Probably about the same, the author mostly complains about immature libraries for mobile and

Re: Problems with Array Assignment?

2017-05-10 Thread Stefan Koch via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 13:34:30 UTC, Samwise wrote: I'm really sure this is just a stupid mistake I made, but I can't for the life of me figure out what is going on. Basically I'm trying to assign a reference to an object to an array, and the objects exist (an explicit destructor is

Re: "I made a game using Rust"

2017-05-10 Thread Ethan Watson via Digitalmars-d
On Wednesday, 10 May 2017 at 13:22:22 UTC, Adam D. Ruppe wrote: Those of you on IRC know that I've been pushing hard for better error messages. I think that is *the* killer feature clang offered and I see it brought up again and again. D used to do well. Now we're lagging behind. No language

Re: Fantastic exchange from DConf

2017-05-10 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 10 May 2017 at 11:16:57 UTC, Atila Neves wrote: [...] The likelihood of a randomly picked C/C++ programmer not even knowing what a profiler is, much less having used one, is extremely high in my experience. I worked with a lot of embedded C programmers with several years of

Re: Fantastic exchange from DConf

2017-05-10 Thread Guillaume Boucher via Digitalmars-d
On Wednesday, 10 May 2017 at 05:26:11 UTC, H. S. Teoh wrote: int myfunc(blah_t *blah, bleh_t *bleh, bluh_t *bluh) { void *resource1, *resource2, *resource3; int ret = RET_ERROR; /* Vet arguments */ if (!blah || !bleh ||

Re: DIP 1007 Preliminary Review Round 1

2017-05-10 Thread Leandro Lucarella via Digitalmars-d
On Monday, 24 April 2017 at 15:58:12 UTC, rikki cattermole wrote: On the flip side, it would be great for development, feature not yet done but planned? Annotate it. Even before a release ever happens. This is not the intended usage of this DIP. The intention here is to only mark symbols

Re: How to avoid throwing an exceptions for a built-in function?

2017-05-10 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 12:40:41 UTC, k-five wrote: I have a line of code that uses "to" function in std.conv for a purpose like: int index = to!int( user_apply[ 4 ] ); // string to int When the user_apply[ 4 ] has value, there is no problem; but when it is empty: "" it throws an

Re: "I made a game using Rust"

2017-05-10 Thread Atila Neves via Digitalmars-d
On Wednesday, 10 May 2017 at 12:52:34 UTC, JN wrote: Interesting thread I got from Reddit, someone made a game for PC and mobiles fully in Rust. https://michaelfairley.com/blog/i-made-a-game-in-rust/ "Last week, I released A Snake’s Tale on iOS, Android, Windows, Mac, and Linux.". I

Re: How to avoid throwing an exceptions for a built-in function?

2017-05-10 Thread k-five via Digitalmars-d-learn
On Wednesday, 10 May 2017 at 13:12:46 UTC, Ivan Kazmenko wrote: On Wednesday, 10 May 2017 at 12:40:41 UTC, k-five wrote: -- I assume that an empty string is a valid input then. The question is, what value do you want `index` to have when

Problems with Array Assignment?

2017-05-10 Thread Samwise via Digitalmars-d-learn
I'm really sure this is just a stupid mistake I made, but I can't for the life of me figure out what is going on. Basically I'm trying to assign a reference to an object to an array, and the objects exist (an explicit destructor is writing lines at the end of the program, when the objects are

Re: DIP 1004 Preliminary Review Round 1

2017-05-10 Thread Mike Parker via Digitalmars-d
On Monday, 8 May 2017 at 08:25:24 UTC, Andrej Mitrovic wrote: On Monday, 1 May 2017 at 14:55:28 UTC, Mike Parker wrote: DIP 1004 is titled "Inherited Constructors. Mike, given the general feedback I've received here, I think the next best take of action is to split the implicit inheritance

Re: Static foreach pull request

2017-05-10 Thread Timon Gehr via Digitalmars-d
On 10.05.2017 15:18, Stefan Koch wrote: if you try assert([] is null), it should fail. It doesn't. I have tried to make that point before, unsuccessfully. Empty arrays may or may not be null, but the empty array literal is always null.

"I made a game using Rust"

2017-05-10 Thread JN via Digitalmars-d
Interesting thread I got from Reddit, someone made a game for PC and mobiles fully in Rust. https://michaelfairley.com/blog/i-made-a-game-in-rust/ "Last week, I released A Snake’s Tale on iOS, Android, Windows, Mac, and Linux.". I wonder, would it be possible for D in the current state to

Re: DConf 2017 Hackathon report

2017-05-10 Thread Atila Neves via Digitalmars-d
On Wednesday, 10 May 2017 at 11:02:50 UTC, Stefan Koch wrote: On Wednesday, 10 May 2017 at 10:55:09 UTC, Atila Neves wrote: I felt like a wizard afterwards for modifying the compiler, which is a nice bonus. Nice, I usually feel confused after modifying the compiler. Now if only I could

Re: Problems with Array Assignment?

2017-05-10 Thread Adam D. Ruppe via Digitalmars-d-learn
In your code, I see one big mistake: --- class TileRenderer { private Tile[] tiles; /*...*/ } class CTileRenderer : TileRenderer { private CTile[] tiles; /*...*/ } --- Those are two separate arrays! Stuff examined through TileRenderer will be looking at a different array than looking

Re: "I made a game using Rust"

2017-05-10 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 10 May 2017 at 14:00:08 UTC, Ethan Watson wrote: On Wednesday, 10 May 2017 at 13:22:22 UTC, Adam D. Ruppe wrote: Those of you on IRC know that I've been pushing hard for better error messages. I think that is *the* killer feature clang offered and I see it brought up again and

Re: "I made a game using Rust"

2017-05-10 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 10 May 2017 at 14:13:37 UTC, Ethan Watson wrote: On Wednesday, 10 May 2017 at 14:02:38 UTC, Adrian Matoga wrote: Would you mind giving some examples? My biggest bugbear with DMD is internal compiler errors giving me no meaningful information. Internal compiler errors (ICEs)

Re: "I made a game using Rust"

2017-05-10 Thread Ethan Watson via Digitalmars-d
On Wednesday, 10 May 2017 at 14:31:28 UTC, Vladimir Panteleev wrote: Internal compiler errors (ICEs) are bugs which are generally treated as high priority. Please report them. See my previous rant on this subject. http://forum.dlang.org/post/qkxyfiwjwqklftcwt...@forum.dlang.org tl;dr - Sure,

Re: Thoughts on some code breakage with 2.074

2017-05-10 Thread Ali Çehreli via Digitalmars-d
On 05/09/2017 10:34 AM, H. S. Teoh via Digitalmars-d wrote: > I even appreciate breakages that eventually force me to write more > readable code! A not-so-recent example: > >/* Used to work, oh, I forget which version now, but it used to > * work: */ >MyType* ptr = ...; >if

Re: Fantastic exchange from DConf

2017-05-10 Thread Atila Neves via Digitalmars-d
On Wednesday, 10 May 2017 at 11:50:32 UTC, Jonathan M Davis wrote: On Tuesday, May 09, 2017 07:13:31 Walter Bright via Digitalmars-d wrote: On 5/8/2017 1:55 PM, John Carter wrote: Atila commented at dconf that working with allocators in D code for the excel wrapper library he had worked on

Re: Fantastic exchange from DConf

2017-05-10 Thread Guillaume Boucher via Digitalmars-d
On Wednesday, 10 May 2017 at 01:19:08 UTC, Nick Sabalausky (Abscissa) wrote: The moral of this story: Sometimes, breaking people's code is GOOD! ;) I don't get the hate that compiler warnings get in the D community. Sure you can disable them if you don't care, but then don't complain about

Re: Static foreach pull request

2017-05-10 Thread Atila Neves via Digitalmars-d
On Wednesday, 10 May 2017 at 11:12:06 UTC, Stefan Koch wrote: On Wednesday, 10 May 2017 at 09:42:53 UTC, Timon Gehr wrote: [...] So here is the difference between null and []: null : () { Slice* s; s = null; return s; } [] : () { Slice* s; s = alloca(sizeof(*s)); s.base = null; s.length =

Re: "I made a game using Rust"

2017-05-10 Thread Ethan Watson via Digitalmars-d
On Wednesday, 10 May 2017 at 14:02:38 UTC, Adrian Matoga wrote: Would you mind giving some examples? My biggest bugbear with DMD is internal compiler errors giving me no meaningful information. Excepting one or two edge cases with SSE types and the .NET compiler, I can get a meaningful

Re: Static foreach pull request

2017-05-10 Thread Stefan Koch via Digitalmars-d
On Wednesday, 10 May 2017 at 14:13:09 UTC, Timon Gehr wrote: On 10.05.2017 15:18, Stefan Koch wrote: if you try assert([] is null), it should fail. It doesn't. I have tried to make that point before, unsuccessfully. Empty arrays may or may not be null, but the empty array literal is always

Re: The cost of doing compile time introspection

2017-05-10 Thread Stefan Koch via Digitalmars-d
On Wednesday, 10 May 2017 at 14:03:58 UTC, Biotronic wrote: On Wednesday, 10 May 2017 at 11:45:05 UTC, Moritz Maxeiner wrote: [CTFE slow] First, as you may know, Stefan Koch is working on an improved CTFE engine that will hopefully make things a lot better. It will not; This is issue is

Re: Fantastic exchange from DConf

2017-05-10 Thread Atila Neves via Digitalmars-d
On Wednesday, 10 May 2017 at 12:18:40 UTC, Patrick Schluter wrote: On Wednesday, 10 May 2017 at 11:16:57 UTC, Atila Neves wrote: [...] The likelihood of a randomly picked C/C++ programmer not even knowing what a profiler is, much less having used one, is extremely high in my experience. I

Re: "I made a game using Rust"

2017-05-10 Thread Stanislav Blinov via Digitalmars-d
On Wednesday, 10 May 2017 at 12:52:34 UTC, JN wrote: Interesting thread I got from Reddit, someone made a game for PC and mobiles fully in Rust. https://michaelfairley.com/blog/i-made-a-game-in-rust/ "Last week, I released A Snake’s Tale on iOS, Android, Windows, Mac, and Linux.". I

Re: DIP 1007 Preliminary Review Round 1

2017-05-10 Thread Leandro Lucarella via Digitalmars-d
On Tuesday, 25 April 2017 at 12:33:44 UTC, Steven Schveighoffer wrote: Really, what you are doing is reserving the overload spot. In cases where the overload would have selected your local function, then you should get no warning (as the additional symbol won't conflict). In cases where your

Re: "I made a game using Rust"

2017-05-10 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 10 May 2017 at 14:02:38 UTC, Adrian Matoga wrote: Would you mind giving some examples? What bothers me on a regular basis is overloading. Basic case: $ dmd lll lll.d(6): Error: none of the overloads of 'foo' are callable using argument types (int, double), candidates are:

[Issue 17390] New: Pass flags to linker driver without -Xlinker

2017-05-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17390 Issue ID: 17390 Summary: Pass flags to linker driver without -Xlinker Product: D Version: D2 Hardware: All OS: Linux Status: NEW Severity: enhancement

  1   2   >