Re: ARM Cortex-M Microcontroller startup files

2015-04-30 Thread Timo Sintonen via Digitalmars-d
On Thursday, 30 April 2015 at 00:14:18 UTC, Martin Nowak wrote: Wonder if it makes more sense to start from zero and add as few files as possible. When I started I did not know D enough to understand what druntime does. Just picked the easy way. The amount of required changes has got

Re: if(arr) now a warning

2015-04-30 Thread Kagamin via Digitalmars-d
On Wednesday, 29 April 2015 at 17:35:58 UTC, Andrei Alexandrescu wrote: I have no doubt the change can find certain errors. Problem is false positives. FWIW these are the changes I had to operate on std.allocator to make it work with the new compiler. That code is contrived, confusing and

Re: C++ interface problem

2015-04-30 Thread Benjamin Thaut via Digitalmars-d-learn
On Wednesday, 29 April 2015 at 19:04:11 UTC, extrawurst wrote: On Wednesday, 29 April 2015 at 13:55:46 UTC, Benjamin Thaut wrote: On Monday, 27 April 2015 at 21:19:02 UTC, extrawurst wrote: here is the shortened version of the returned class CSteamID:

[Issue 14531] New: `@disable this() immutable` disable mutable default construction, too

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14531 Issue ID: 14531 Summary: `@disable this() immutable` disable mutable default construction, too Product: D Version: D2 Hardware: x86_64 OS: Linux

[Issue 14532] New: switch block allows creating uninitialized variables

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14532 Issue ID: 14532 Summary: switch block allows creating uninitialized variables Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

Re: [dvm] Can't install compilers on Mac

2015-04-30 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-04-29 23:24, Chris wrote: Yes. Doesn't work. What happens when you run ./dvm install dvm? What is the output? If the installation of DVM itself fails you will not be able to install compilers. You can verify the installation of DVM by opening a new shell session (a new tab or

[Issue 14529] Bug in Regex case insensitive match

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14529 Kasa Mia kasamia.o.kasa...@gmail.com changed: What|Removed |Added Summary|Bug in Regex insensitive|Bug in Regex case

Re: getopt helpWanted

2015-04-30 Thread wobbles via Digitalmars-d-learn
On Wednesday, 29 April 2015 at 22:02:29 UTC, novice2 wrote: Hello. Help me please to understand, how to show usage help to user, who enter wrong options? For example, user not provided required filename. I want to show error message, and program usage help text. But likely getopt don't

Re: getopt helpWanted

2015-04-30 Thread novice2 via Digitalmars-d-learn
Thank you, Brian!

[Issue 14530] New: TickDuration to! is broken

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14530 Issue ID: 14530 Summary: TickDuration to! is broken Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major Priority: P1

Re: shouldn't this code at least trigger a warning?

2015-04-30 Thread ketmar via Digitalmars-d-learn
On Wed, 29 Apr 2015 10:48:36 +, Gary Willoughby wrote: Please raise an issue in bugzilla. This is obviously an error. done: https://issues.dlang.org/show_bug.cgi?id=14532 signature.asc Description: PGP signature

Re: shouldn't this code at least trigger a warning?

2015-04-30 Thread ketmar via Digitalmars-d-learn
On Wed, 29 Apr 2015 07:57:07 -0700, H. S. Teoh via Digitalmars-d-learn wrote: Switch statements in D allow all sorts of abominations, if only you would try it. I think it was originally designed to support a particular loop idiom (sorry I forgot what it was called, and don't have time to look

Re: How does D improve on C++17?

2015-04-30 Thread Dennis Ritchie via Digitalmars-d
I believe that the developers of D is a great opportunity: to copy all the new features before the release of C++17 in Phobos :) In my opinion, that would be cool! Thoughts about C++17: https://isocpp.org/files/papers/D4492.pdf

[Issue 14533] New: Error 43: Not a Valid Library File

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14533 Issue ID: 14533 Summary: Error 43: Not a Valid Library File Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: enhancement

Ada to D - an array for storing values of each of the six bits which are sufficient

2015-04-30 Thread Dennis Ritchie via Digitalmars-d-learn
Hi, There is an array of values to store each of which sufficiently 6 bits. As it is written down on the D? - With Ada.Text_IO; Use Ada.Text_IO; With Ada.Integer_Text_IO; Use Ada.Integer_Text_IO; procedure Program is type T_Type is range -10 .. 27; for T_Type'Size use 6; type

Re: Ada to D - an array for storing values of each of the six bits which are sufficient

2015-04-30 Thread bearophile via Digitalmars-d-learn
Dennis Ritchie: There is an array of values to store each of which sufficiently 6 bits. As it is written down on the D? You can't do it directly in D. Someone has to write a packed array data structure to do it. Bye, bearophile

Re: C++ interface problem

2015-04-30 Thread extrawurst via Digitalmars-d-learn
On Thursday, 30 April 2015 at 08:18:16 UTC, Benjamin Thaut wrote: On Wednesday, 29 April 2015 at 19:04:11 UTC, extrawurst wrote: On Wednesday, 29 April 2015 at 13:55:46 UTC, Benjamin Thaut wrote: On Monday, 27 April 2015 at 21:19:02 UTC, extrawurst wrote: here is the shortened version of the

Re: [hackathon] An article about metaprogramming

2015-04-30 Thread Idan Arye via Digitalmars-d
On Wednesday, 29 April 2015 at 18:13:10 UTC, Mafi wrote: On Wednesday, 29 April 2015 at 16:55:58 UTC, bearophile wrote: Mafi: https://marfisc.wordpress.com/2015/04/29/using-d-templates-for-gamedev/ What do you think? Any remarks? The SDL_Event is a union. Accessing it is inherently unsafe

[Issue 14533] Error 43: Not a Valid Library File

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14533 Richard Cattermole alphaglosi...@gmail.com changed: What|Removed |Added CC|

Re: if(arr) now a warning

2015-04-30 Thread Daniel Murphy via Digitalmars-d
Vladimir Panteleev wrote in message news:ajrysqkjmlqjlmkip...@forum.dlang.org... On Wednesday, 29 April 2015 at 19:15:46 UTC, Jonathan M Davis wrote: but std.allocator is definitely not your average code OK, I'm tired of hearing this argument. It's valid though. Most array code cares

dub -vgc

2015-04-30 Thread Robert M. Münch via Digitalmars-d-learn
How can I make use of the -vgc compiler switch in my DUB project? -- Robert M. Münch http://www.saphirion.com smarter | better | faster

Re: Closure capture loop variables

2015-04-30 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 30 April 2015 at 12:01:32 UTC, Marc Schütz wrote: On Thursday, 30 April 2015 at 05:23:55 UTC, Vladimir Panteleev wrote: On Thursday, 30 April 2015 at 03:58:44 UTC, Freddy wrote: On Thursday, 30 April 2015 at 01:19:45 UTC, Vladimir Panteleev wrote: Because copy is still modified

Re: The amazing template which does nothing

2015-04-30 Thread John Colvin via Digitalmars-d
On Wednesday, 29 April 2015 at 14:18:49 UTC, Iain Buclaw wrote: On 29 April 2015 at 14:50, John Colvin via Digitalmars-d digitalmars-d@puremagic.com wrote: On Wednesday, 29 April 2015 at 12:07:58 UTC, Vladimir Panteleev wrote: On Wednesday, 29 April 2015 at 07:00:15 UTC, John Colvin wrote:

Re: ARM Cortex-M Microcontroller startup files

2015-04-30 Thread Mike via Digitalmars-d
On Thursday, 30 April 2015 at 00:14:18 UTC, Martin Nowak wrote: Wonder if it makes more sense to start from zero and add as few files as possible. Druntime doesn't do much useful stuff for a µC anyhow. - GC and rt.lifetime (new, arrays) - Moduleinfo - EH unwind support - AA implementation -

[Issue 10524] Switch skips initialization of 'with' variable

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10524 yebblies yebbl...@gmail.com changed: What|Removed |Added Depends on||14532 --

[Issue 14532] switch block allows creating uninitialized variables

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14532 yebblies yebbl...@gmail.com changed: What|Removed |Added Blocks||10524 --

Re: The amazing template which does nothing

2015-04-30 Thread Iain Buclaw via Digitalmars-d
On 30 April 2015 at 15:01, John Colvin via Digitalmars-d digitalmars-d@puremagic.com wrote: On Wednesday, 29 April 2015 at 14:18:49 UTC, Iain Buclaw wrote: On 29 April 2015 at 14:50, John Colvin via Digitalmars-d digitalmars-d@puremagic.com wrote: On Wednesday, 29 April 2015 at 12:07:58 UTC,

Re: Closure capture loop variables

2015-04-30 Thread via Digitalmars-d
On Thursday, 30 April 2015 at 05:23:55 UTC, Vladimir Panteleev wrote: On Thursday, 30 April 2015 at 03:58:44 UTC, Freddy wrote: On Thursday, 30 April 2015 at 01:19:45 UTC, Vladimir Panteleev wrote: Because copy is still modified every time i is. But shouldn't copy be redeclared every loop

Re: if(arr) now a warning

2015-04-30 Thread Byron Heads via Digitalmars-d
On Wed, 29 Apr 2015 22:44:22 -0400, Steven Schveighoffer wrote: On 4/29/15 8:35 PM, Martin Nowak wrote: Occasionally I'm using if (auto ary = func()), despite the fact that the semantics are wrong, but it's nice and short and works as long a func always returns null instead of empty slices.

Re: dub building is extremely slow

2015-04-30 Thread wobbles via Digitalmars-d-learn
On Thursday, 30 April 2015 at 03:00:36 UTC, zhmt wrote: On Thursday, 30 April 2015 at 02:02:50 UTC, zhmt wrote: dub build is running on centos7. It works well until today, It becomes very slow suddenly. It will take minuties per compilation, there is 10 files in project. Has anyone

Re: if(arr) now a warning

2015-04-30 Thread bearophile via Digitalmars-d
Andrei Alexandrescu: I have no doubt the change can find certain errors. Problem is false positives. FWIW these are the changes I had to operate on std.allocator to make it work with the new compiler. One per 194 lines on average, all false positives: Just fix your code Andrei Alexandrescu

Re: Quit running foreign unittests _

2015-04-30 Thread Kagamin via Digitalmars-d
On Wednesday, 29 April 2015 at 15:00:53 UTC, Dicebot wrote: The core of Nick proposal (and what he does in his own libraries) is to not compile tests of dependnecies even when those are all compiled at once in -unittest mode. If they are compiled in unittest mode, all their unittests are

[Issue 14532] switch block allows creating uninitialized variables

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14532 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||accepts-invalid, safe

Re: if(arr) now a warning

2015-04-30 Thread Kagamin via Digitalmars-d
On Thursday, 30 April 2015 at 02:51:33 UTC, Vladimir Panteleev wrote: OK, I'm tired of hearing this argument. Distinction between null and empty can be done, the problem is it doesn't fly in mainstream.

Re: Range of chars (narrow string ranges)

2015-04-30 Thread Kagamin via Digitalmars-d
On Friday, 24 April 2015 at 20:44:34 UTC, Walter Bright wrote: Time has shown, however, that UTF8 has pretty much won. wchar only exists for Windows API and Java Also NSString. It used to support UTF-16 and C encoding. AFAIK, the latter later evolved into UTF-8.

Re: if(arr) now a warning

2015-04-30 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 30 April 2015 at 11:46:05 UTC, Daniel Murphy wrote: Is that from string lambdas? I don't know. The one in std.exception is probably due to an array being used as a condition for enforce. Does it give an instantiation trace when you use it with warning as errors? It doesn't.

Re: Create custom data types

2015-04-30 Thread via Digitalmars-d-learn
Another possible way is to check the bounds at compile time. The different operators need to be overloaded for that. For example, if you have to types Int!(0, 100) and Int!(20, 30), the result type of an addition needs to be Int!(20, 130). Then, there can be an overloaded opCast() to bool for

Re: if(arr) now a warning

2015-04-30 Thread Daniel Murphy via Digitalmars-d
Vladimir Panteleev wrote in message news:swjdkyjsurpjdqrvq...@forum.dlang.org... I don't know. The one in std.exception is probably due to an array being used as a condition for enforce. Yep, that's not nice. From what I can see the warning in the template constraint is ignored, and so

Re: Closure capture loop variables

2015-04-30 Thread ketmar via Digitalmars-d
On Thu, 30 Apr 2015 12:55:16 +, Vladimir Panteleev wrote: D closures should work in the same way as, e.g., JS closures. js closures are fubared. signature.asc Description: PGP signature

Re: Interrogative: What's a good blog title?

2015-04-30 Thread FujiBar via Digitalmars-d
On Monday, 27 April 2015 at 22:54:07 UTC, Andrei Alexandrescu wrote: My only candidate right now is Greasemonkey Philosopher. I'm shooting for a title that reflects the contrast between my low-level and high-level aspirations. Deus Ex Machina (subtle D reference there) Machine Shop

Re: if(arr) now a warning

2015-04-30 Thread Andrei Alexandrescu via Digitalmars-d
On 4/30/15 4:46 AM, Daniel Murphy wrote: Vladimir Panteleev wrote in message news:ajrysqkjmlqjlmkip...@forum.dlang.org... On Wednesday, 29 April 2015 at 19:15:46 UTC, Jonathan M Davis wrote: but std.allocator is definitely not your average code OK, I'm tired of hearing this argument. It's

Re: Closure capture loop variables

2015-04-30 Thread Ali Çehreli via Digitalmars-d
On 04/30/2015 05:55 AM, Vladimir Panteleev wrote: D closures should work in the same way as, e.g., JS closures. Try rewriting the program in JavaScript. If it behaves in the same way, it's not a D bug. Right. I remember Seth Ladd's Dart language presentation at the local ACCU in Silicon

Re: Possible to write a classic fizzbuzz example using a UFCS chain?

2015-04-30 Thread safety0ff via Digitalmars-d-learn
Just for fun: // map, join, text, iota, writeln, tuple import std.algorithm, std.array, std.conv, std.range, std.stdio, std.typecons; void main() { iota(1,100) .map!(a = tuple(a, a % 3 == 0 ? 0 : 4, a % 5 == 0 ? 8 : 4)) .map!(a = a[1] == a[2] ? a[0].text :

Re: Building DMD on SmartOS

2015-04-30 Thread Joakim via Digitalmars-d
On Thursday, 30 April 2015 at 17:39:02 UTC, flamencofantasy wrote: Hello, I would like to use D on SmartOS. Since there is no binary installer I tried to build DMD from source by following the instructions on this page; http://wiki.dlang.org/Building_DMD Unfortunately I get this error;

Re: Interrogative: What's a good blog title?

2015-04-30 Thread bitwise via Digitalmars-d
The D Tales

Implicit conversion error

2015-04-30 Thread Paul via Digitalmars-d-learn
When compiled on a 64 bit machine, this line int r = uniform(0, mobs.length); gives me an error: Error: cannot implicitly convert expression (uniform(0, mobs.length)) of type ulong to int but it compiles ok on a 32 bit machine. I thought it was the expression on the righthand side returning

Re: Code coverage for D now supported

2015-04-30 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 4/29/15 1:55 PM, Steve Peak wrote: With the help of @ColdenCullen, Codecov now supports D language. You can easily upload your coverage reports and utilize our many features to enhance your workflow. Writing tests for your code is important, no question. The results of your tests is simply

Re: if(arr) now a warning

2015-04-30 Thread deadalnix via Digitalmars-d
On Thursday, 30 April 2015 at 16:49:59 UTC, Daniel Murphy wrote: Andrei Alexandrescu wrote in message news:mhtggg$26b5$1...@digitalmars.com... I think we need to stop here. I'll make the PR today for reverting this language change. We can't handle D like a semester science project, because

Re: if(arr) now a warning

2015-04-30 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 30 April 2015 at 17:10:23 UTC, Jeremy Powers wrote: On Thu, Apr 30, 2015 at 8:08 AM, Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: This trickle of teeny-bit breaking changes for the sake of touted benefits must stop. This is how you improve the

Re: if(arr) now a warning

2015-04-30 Thread Jeremy Powers via Digitalmars-d
On Thu, Apr 30, 2015 at 8:08 AM, Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: This trickle of teeny-bit breaking changes for the sake of touted benefits must stop. This is how you improve the language. You can disagree with the touted benefits, but without

Re: if(arr) now a warning

2015-04-30 Thread Daniel Murphy via Digitalmars-d
Andrei Alexandrescu wrote in message news:mhtggg$26b5$1...@digitalmars.com... I think we need to stop here. I'll make the PR today for reverting this language change. We can't handle D like a semester science project, because for as long as we do we won't have credibility. This trickle of

Building DMD on SmartOS

2015-04-30 Thread flamencofantasy via Digitalmars-d
Hello, I would like to use D on SmartOS. Since there is no binary installer I tried to build DMD from source by following the instructions on this page; http://wiki.dlang.org/Building_DMD Unfortunately I get this error; [~/d/dmd/src]# make -f posix.mak MODEL=64 no cpu specified, assuming

Re: if(arr) now a warning

2015-04-30 Thread Andrei Alexandrescu via Digitalmars-d
On 4/30/15 9:50 AM, Daniel Murphy wrote: Andrei Alexandrescu wrote in message news:mhtggg$26b5$1...@digitalmars.com... I think we need to stop here. I'll make the PR today for reverting this language change. We can't handle D like a semester science project, because for as long as we do we

Re: if(arr) now a warning

2015-04-30 Thread Andrei Alexandrescu via Digitalmars-d
On 4/30/15 10:10 AM, Jeremy Powers via Digitalmars-d wrote: On Thu, Apr 30, 2015 at 8:08 AM, Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com mailto:digitalmars-d@puremagic.com wrote: This trickle of teeny-bit breaking changes for the sake of touted benefits must stop.

[Issue 14534] New: Front-end should lower all non-scalar condition expressions

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14534 Issue ID: 14534 Summary: Front-end should lower all non-scalar condition expressions Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: if(arr) now a warning

2015-04-30 Thread deadalnix via Digitalmars-d
On Thursday, 30 April 2015 at 11:43:06 UTC, Kagamin wrote: On Thursday, 30 April 2015 at 02:51:33 UTC, Vladimir Panteleev wrote: OK, I'm tired of hearing this argument. Distinction between null and empty can be done, the problem is it doesn't fly in mainstream. if (myslice is []) would

Re: if(arr) now a warning

2015-04-30 Thread deadalnix via Digitalmars-d
On Thursday, 30 April 2015 at 18:04:18 UTC, Vladimir Panteleev wrote: On Thursday, 30 April 2015 at 17:10:23 UTC, Jeremy Powers wrote: On Thu, Apr 30, 2015 at 8:08 AM, Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: This trickle of teeny-bit breaking changes for

rdmd renames directories if they share the same name as an output file, what to do?

2015-04-30 Thread Gary Willoughby via Digitalmars-d
In the following bug report it's highlighted that rdmd renames directories if they share the same name as the output file. https://issues.dlang.org/show_bug.cgi?id=13758 Is there a consensus of opinion on what rdmd should do in this situation? i.e. should it raise an error and fail? Should

Re: Building DMD on SmartOS

2015-04-30 Thread Kai Nacke via Digitalmars-d
On Thursday, 30 April 2015 at 17:54:00 UTC, Joakim wrote: compiling that on SmartOS with just a C++ compiler. Of course, the Solaris support in dmd/druntime/phobos is not really tested, so you may need to fill in some gaps for SmartOS. I compiled dmd on OpenIndiana (Illumos based like

Re: ARM Cortex-M Microcontroller startup files

2015-04-30 Thread Martin Nowak via Digitalmars-d
On 04/30/2015 08:43 AM, Timo Sintonen wrote: Printf is a little tricky. It is actually a file operation to stdout and that is actually a syscall to kernel. No, you usually have to implement some hook for outputting yourself, e.g. putc or write, printf solely takes care of the formatting.

[Issue 14528] GIT HEAD: can't pass protected member to template by alias

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14528 Martin Nowak c...@dawg.eu changed: What|Removed |Added CC||c...@dawg.eu --- Comment #1 from

Destruction in D

2015-04-30 Thread bitwise via Digitalmars-d-learn
After reading GC page in the reference, it seems that class destructors are called on a separate thread, in parallel to the main thread. Is this correct? What about structs? Are the destructors called when they go out of scope in a C++ RAII fashion, or do they happen on a separate thread

Re: rdmd renames directories if they share the same name as an output file, what to do?

2015-04-30 Thread CraigDillabaugh via Digitalmars-d
On Thursday, 30 April 2015 at 18:09:29 UTC, Gary Willoughby wrote: In the following bug report it's highlighted that rdmd renames directories if they share the same name as the output file. https://issues.dlang.org/show_bug.cgi?id=13758 Is there a consensus of opinion on what rdmd should do

Re: ARM Cortex-M Microcontroller startup files

2015-04-30 Thread Jens Bauer via Digitalmars-d
On Thursday, 30 April 2015 at 20:54:07 UTC, Martin Nowak wrote: On 04/30/2015 08:43 AM, Timo Sintonen wrote: Printf is a little tricky. It is actually a file operation to stdout and that is actually a syscall to kernel. No, you usually have to implement some hook for outputting yourself,

Capacity is first-come first served for multiple slices to all elements

2015-04-30 Thread Ali Çehreli via Digitalmars-d-learn
(Thanks to Luís Marques for waking me up.) Although it makes sense now, somehow some parts of this story is news to me after all these years. :-/ When there are multiple slices to all elements of an array, they all start with same capacity until an element is added to one of them. After

Re: ARM Cortex-M Microcontroller startup files

2015-04-30 Thread Martin Nowak via Digitalmars-d
On 04/30/2015 01:30 PM, Mike wrote: While this may seem simple to achieve, I think it will raise a few questions that will need answering. * Can ModuleInfo be leveraged, without introducing overhead, to call module constructors and static constructors? They might be useful for hardware

Re: Destruction in D

2015-04-30 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 30 April 2015 at 20:07:11 UTC, bitwise wrote: destructors are called on a separate thread, in parallel to the main thread. Is this correct? Not necessarily. the way the GC works in D today is whenever any thread allocates, it runs the GC functions which might do a collection.

[Issue 14535] New: std.net.curl.CurlException should include status line

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14535 Issue ID: 14535 Summary: std.net.curl.CurlException should include status line Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: ARM Cortex-M Microcontroller startup files

2015-04-30 Thread Jens Bauer via Digitalmars-d
On Thursday, 30 April 2015 at 06:43:18 UTC, Timo Sintonen wrote: {snip} I think it is possible to make a minimum bare metal runtime from scratch. {snip} Yes I think it won't be too difficult. All are good points that we should have in mind, while deciding on how we proceed. -Also Mike's

anonymous template predicates

2015-04-30 Thread Vlad Levenfeld via Digitalmars-d-learn
I was wondering if there's a mechanism to make anonymous templates, e.g. given: enum Policy {A, B} alias List = TypeTuple!(...); instead of this: enum has_policy_A (T) = T.policy == Policy.A; alias Result = Filter!(has_policy_A, List); use something like this: Filter!(T = T.policy

Re: Destruction in D

2015-04-30 Thread weaselcat via Digitalmars-d-learn
On Thursday, 30 April 2015 at 20:07:11 UTC, bitwise wrote: After reading GC page in the reference, it seems that class destructors are called on a separate thread, in parallel to the main thread. Is this correct? There's no guarantee what thread will be used in the standard GC implementation

Re: if(arr) now a warning

2015-04-30 Thread TC via Digitalmars-d
What about less intrusive change as a compromise? I'm the C# guy and they solve these problems just with warnings. Each warning has some ID and compiler spits it out with the description of a problem itself. Developers than have 4 ways to handle it: 1) ignore it and live with the warning 2)

[Issue 12856] template alias should not perform access check

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12856 Martin Nowak c...@dawg.eu changed: What|Removed |Added CC||deadal...@gmail.com --- Comment

[Issue 13744] Cannot pass private symbol as alias parameter

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13744 Martin Nowak c...@dawg.eu changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: array operations and ranges

2015-04-30 Thread Walter Bright via Digitalmars-d
On 4/26/2015 3:17 AM, Manu via Digitalmars-d wrote: Array operations are super cool, and I'm using ranges (which kinda look and feel like arrays) more and more these days, but I can't help but feel like their incompatibility with the standard array operations is a massive loss. Let's say I want

Re: if(arr) now a warning

2015-04-30 Thread ketmar via Digitalmars-d
On Fri, 01 May 2015 11:12:12 +1000, Daniel Murphy wrote: Andrei Alexandrescu wrote in message news:mhto1k$2dk0$1...@digitalmars.com... Nothing negates that. It's a judgment call. Please let's stop here. Thanks. -- Andrei Please stop trying to undo this improvement. Just fix your code

[Issue 13758] RDMD renames directory if -ofNAME is the name of a directory

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13758 Vladimir Panteleev thecybersha...@gmail.com changed: What|Removed |Added Keywords||pull

Re: if(arr) now a warning

2015-04-30 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 1 May 2015 at 02:16:01 UTC, deadalnix wrote: On Friday, 1 May 2015 at 01:12:08 UTC, Daniel Murphy wrote: Andrei Alexandrescu wrote in message news:mhto1k$2dk0$1...@digitalmars.com... Nothing negates that. It's a judgment call. Please let's stop here. Thanks. -- Andrei Please

Re: if(arr) now a warning

2015-04-30 Thread Brian Schott via Digitalmars-d
On Thursday, 30 April 2015 at 18:07:12 UTC, deadalnix wrote: This one is quite straightforward. Dfix could probably handle it. I'd have to rewrite dfix on top of SDC to get this working. dfix can only work at the lexical and AST level at the moment. As soon as you need information like Is

[Issue 14534] Front-end should lower all non-scalar condition expressions

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14534 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC|

Re: Destruction in D

2015-04-30 Thread bitwise via Digitalmars-d-learn
On Thu, 30 Apr 2015 16:17:10 -0400, Adam D. Ruppe destructiona...@gmail.com wrote: On Thursday, 30 April 2015 at 20:07:11 UTC, bitwise wrote: destructors are called on a separate thread, in parallel to the main thread. Is this correct? Not necessarily. the way the GC works in D today is

Re: Destruction in D

2015-04-30 Thread Idan Arye via Digitalmars-d-learn
On Thursday, 30 April 2015 at 23:27:49 UTC, bitwise wrote: Well, the third thing was just my reasoning for asking in the first place. I need to be able to acquire/release shared resources reliably, like an OpenGL texture, for example. If you want to release resources, you are going to have to

Re: Capacity is first-come first served for multiple slices to all elements

2015-04-30 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, April 30, 2015 11:59:00 Ali Çehreli via Digitalmars-d-learn wrote: (Thanks to Luís Marques for waking me up.) Although it makes sense now, somehow some parts of this story is news to me after all these years. :-/ When there are multiple slices to all elements of an array, they

Re: dub -vgc

2015-04-30 Thread Laeeth Isharc via Digitalmars-d-learn
On Thursday, 30 April 2015 at 12:14:39 UTC, Robert M. Münch wrote: How can I make use of the -vgc compiler switch in my DUB project? Does dflags work ? http://code.dlang.org/package-format

Re: if(arr) now a warning

2015-04-30 Thread Daniel Murphy via Digitalmars-d
Andrei Alexandrescu wrote in message news:mhto1k$2dk0$1...@digitalmars.com... Nothing negates that. It's a judgment call. Please let's stop here. Thanks. -- Andrei Please stop trying to undo this improvement. Just fix your code and move on. Thanks.

[Issue 14534] Front-end should lower all non-scalar condition expressions

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14534 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||yebbl...@gmail.com --- Comment

Re: if(arr) now a warning

2015-04-30 Thread deadalnix via Digitalmars-d
On Friday, 1 May 2015 at 01:12:08 UTC, Daniel Murphy wrote: Andrei Alexandrescu wrote in message news:mhto1k$2dk0$1...@digitalmars.com... Nothing negates that. It's a judgment call. Please let's stop here. Thanks. -- Andrei Please stop trying to undo this improvement. Just fix your code

Re: if(arr) now a warning

2015-04-30 Thread ketmar via Digitalmars-d
On Thu, 30 Apr 2015 20:27:01 +, TC wrote: pragma(disablewarn, 123); please, no! nothing in source code should be able to disable warning -- except fixing the code. and such pragma simply ugly. signature.asc Description: PGP signature

Re: Quit running foreign unittests _

2015-04-30 Thread Nick Sabalausky via Digitalmars-d
On 04/28/2015 07:04 PM, Dicebot wrote: I do want do test everything as part of my app tests, including all possible dependencies, transitively. Even Phobos? This is awesome default. With a simple `rdmd -main -unittest` call I can ensure that certain app/module works correctly without having

Re: ARM Cortex-M Microcontroller startup files

2015-04-30 Thread Mike via Digitalmars-d
Martin, This is a bit of a tangent, but I would like to know what your thoughts are on this: http://forum.dlang.org/post/psssnzurlzeqeneag...@forum.dlang.org The problem is that when we use an unimplemented feature of D, the best we can hope for is to generate a linker error. I proposed

How to reuse functions

2015-04-30 Thread Luigi via Digitalmars-d-learn
Hi everybody. I am tring to use a function where its parameter is another function, and at the same time are both already made - they cannot be modified - and the second one has to be conditioned before to be passed as argument. Let's say I have these function and I cannot modify: -jac(+d)

Re: ARM Cortex-M Microcontroller startup files

2015-04-30 Thread Mike via Digitalmars-d
On Thursday, 30 April 2015 at 21:08:22 UTC, Jens Bauer wrote: On Thursday, 30 April 2015 at 20:54:07 UTC, Martin Nowak wrote: On 04/30/2015 08:43 AM, Timo Sintonen wrote: Printf is a little tricky. It is actually a file operation to stdout and that is actually a syscall to kernel. No, you

Re: Example from d-idioms is incorrect

2015-04-30 Thread Namespace via Digitalmars-d-learn
On Thursday, 30 April 2015 at 21:30:36 UTC, TheGag96 wrote: I was looking at the d-idioms website today and saw this code example: http://p0nce.github.io/d-idioms/#Adding-or-removing-an-element-from-arrays And I was kind of irked. I just recently working with removing an element from an

[Issue 14519] [Enh] foreach on strings should return replacementDchar rather than throwing

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14519 Martin Nowak c...@dawg.eu changed: What|Removed |Added CC||c...@dawg.eu --- Comment #23

[Issue 14519] [Enh] foreach on strings should return replacementDchar rather than throwing

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14519 --- Comment #24 from Martin Nowak c...@dawg.eu --- If we validate encoding on data entry points such as readText or byLine, then decoding errors should be assertions rather than silent replacements, because it's a programming error to use unvalidated

depend 0.0.1

2015-04-30 Thread linkrope via Digitalmars-d-announce
https://github.com/funkwerk/depend depend checks actual import dependencies against a PlantUML model of target dependencies. In contrast to dhier, depend makes use of the import dependencies created by dmd with the --deps switch. In our company, we use this tool with CI to guard the

Re: if(arr) now a warning

2015-04-30 Thread deadalnix via Digitalmars-d
On Thursday, 30 April 2015 at 21:58:17 UTC, Brian Schott wrote: On Thursday, 30 April 2015 at 18:07:12 UTC, deadalnix wrote: This one is quite straightforward. Dfix could probably handle it. I'd have to rewrite dfix on top of SDC to get this working. dfix can only work at the lexical and AST

Re: if(arr) now a warning

2015-04-30 Thread Daniel Kozak via Digitalmars-d
On Thursday, 30 April 2015 at 15:08:00 UTC, Andrei Alexandrescu wrote: On 4/30/15 4:46 AM, Daniel Murphy wrote: Vladimir Panteleev wrote in message news:ajrysqkjmlqjlmkip...@forum.dlang.org... On Wednesday, 29 April 2015 at 19:15:46 UTC, Jonathan M Davis wrote: but std.allocator is

[Issue 14079] Variable templates' documentation not generated.

2015-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14079 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: ARM Cortex-M Microcontroller startup files

2015-04-30 Thread Jens Bauer via Digitalmars-d
On Thursday, 30 April 2015 at 23:03:48 UTC, Mike wrote: On Thursday, 30 April 2015 at 20:45:28 UTC, Martin Nowak wrote: * Is data and bss initialization part of the runtime, or delegated to toolchain, silicon, and BSP vendors? We should provide appropriate linker scripts and do the

  1   2   >