Re: Is there Typeof template ?

2016-10-28 Thread Ali Çehreli via Digitalmars-d-learn
On 10/28/2016 11:25 AM, Jonathan M Davis via Digitalmars-d-learn wrote: >> void main() { >> @(`str`, 123) uint k; >> foreach (a; __traits(getAttributes, k)) { >> pragma(msg, typeof(a)); >> } >> } > I don't know if Typeof is actually needed for what the OP is trying to

Re: Is there Typeof template ?

2016-10-28 Thread Ali Çehreli via Digitalmars-d-learn
On 10/28/2016 05:48 AM, Temtaime wrote: On Friday, 28 October 2016 at 12:44:20 UTC, Adam D. Ruppe wrote: On Friday, 28 October 2016 at 10:52:05 UTC, Temtaime wrote: Are there something or should I create a PR to phobos? Why would you want that? I have UDAs with values à la @(`str`, 123)

Re: Is there Typeof template ?

2016-10-28 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, October 28, 2016 11:19:46 Ali Çehreli via Digitalmars-d-learn wrote: > On 10/28/2016 05:48 AM, Temtaime wrote: > > On Friday, 28 October 2016 at 12:44:20 UTC, Adam D. Ruppe wrote: > >> On Friday, 28 October 2016 at 10:52:05 UTC, Temtaime wrote: > >>> Are there something or should I

Re: Fun: Shooting yourself in the foot in D

2016-10-28 Thread Ali Çehreli via Digitalmars-d
On 10/28/2016 04:32 AM, Guillaume Piolat wrote: > When you try shooting at your foot with your AK-47, you realize the GC > has blown it already. Or... the bullet stops midair, waiting for the GC to finish a collection cycle (probably for a lollipop created in another thread). Ali

Re: Fun: Shooting yourself in the foot in D

2016-10-28 Thread Ali Çehreli via Digitalmars-d
On 10/28/2016 04:41 AM, John Colvin wrote: > a bullet that's paused by the GC Wow. I've just said almost the same thing before reading this one. :) Ali

Re: CTFE divide by 0 prints the same error 3 times !

2016-10-28 Thread Ali Çehreli via Digitalmars-d-learn
On 10/28/2016 07:37 AM, Basile B. wrote: try this echo "enum a = 0/0;" > d.d && dmd d.d -main any reason for this ? One is too easy to miss, two is better, but three is just right. :o) Must be an implementation oddity. Please file a bug. Ali

Re: Best approach to handle accented letters

2016-10-28 Thread Chris via Digitalmars-d-learn
On Friday, 28 October 2016 at 14:31:47 UTC, Chris wrote: On Friday, 28 October 2016 at 13:50:24 UTC, Alfred Newman wrote: It boils down to something like: if (c in _accent) return _accent[c]; else return c; Just a normal lambda (condition true) ? yes : no; I'd recommend you to use Marc's

Re: Is there a D static site generator based on markdown (like couscous) ?

2016-10-28 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 28 October 2016 at 13:37:55 UTC, Basile B. wrote: I would need actually something like https://github.com/CouscousPHP/Couscous but in D. You can easily make a custom SSG with https://github.com/kiith-sa/dmarkdown

DLang Youtube channel

2016-10-28 Thread Patric Dexheimer via Digitalmars-d
There isn't a official D youtube channel right? Would be be nice to have all the D related videos spread on youtube centralized in one place :)

Re: Battle-plan for CTFE

2016-10-28 Thread Stefan Koch via Digitalmars-d-announce
Another update on CTFE. I have found a few errors in my handling of switch-statments. An efficient solution for this is still pending, Futhermore I have begun to work on ctfe handling refernces. These are a little bit harder to do in bytecode and do pessimise performance if overused. I hope

Re: Pattern matching in D?

2016-10-28 Thread Dennis Ritchie via Digitalmars-d
Someone may be, it will be interesting, in the C# 7 `switch` will be extended syntax for pattern matching: https://github.com/dotnet/roslyn/blob/features/patterns/docs/features/patterns.md Original post: https://github.com/dotnet/roslyn/issues/206

Re: A question of function design?

2016-10-28 Thread WhatMeWorry via Digitalmars-d-learn
On Friday, 28 October 2016 at 14:12:53 UTC, Mike Parker wrote: On Friday, 28 October 2016 at 13:19:19 UTC, WhatMeWorry wrote: [...] I generally use GLFW event callbacks to populate an event queue with custom event types, then process the queue and handle events elsewhere. That way, the

Re: Mir GLAS is a C library and passes Natlib's test suite! And questions :-)

2016-10-28 Thread Sameer Pradhan via Digitalmars-d
On Friday, 28 October 2016 at 06:31:19 UTC, Ilya Yaroshenko wrote: On Friday, 28 October 2016 at 03:44:05 UTC, Andrei Alexandrescu wrote: On 10/27/16 3:59 AM, Ilya Yaroshenko wrote: [...] I must plead ignorance on the finer interface details, but from what I am reading this seems like an

Re: Best approach to handle accented letters

2016-10-28 Thread Marc Schütz via Digitalmars-d-learn
On Friday, 28 October 2016 at 11:24:28 UTC, Alfred Newman wrote: Hello, I'm getting some troubles to replace the accented letters in a given string with their unaccented counterparts. Let's say I have the following input string "très élégant" and I need to create a function to return just

Re: Is there Typeof template ?

2016-10-28 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, October 28, 2016 10:52:05 Temtaime via Digitalmars-d-learn wrote: > Hi ! > Tried to find > alias Typeof(alias A) = typeof(A); > or something, but failed. > > Are there something or should I create a PR to phobos? > Thanks If it were in Phobos, I'd expect it to be in std.meta, and it's

[Issue 15604] [REG2.070] std.array.array of structs with template opAssign and default initialised 'new'ed class member

2016-10-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15604 Martin Krejcirik changed: What|Removed |Added Summary|std.array.array of structs |[REG2.070] std.array.array

Re: test if the alias of a template is a literal

2016-10-28 Thread Gianni Pisetta via Digitalmars-d-learn
On Friday, 28 October 2016 at 03:33:33 UTC, Basile B. wrote: Hello, I think the correct isStringLiteral would be: import std.meta; template isStringLiteral(alias V) { enum isCompileTime = is(typeof((){enum a = V;})); enum isString = is(typeof(V) == string); enum isStringLiteral

Re: exercise - find invalid D tokens (Impossible ?)

2016-10-28 Thread Johan Engelen via Digitalmars-d-learn
On Friday, 28 October 2016 at 05:16:45 UTC, Basile B. wrote: Here are the specifications of token strings: "Token strings open with the characters q{ and close with the token }. In between must be valid D tokens. The { and }" So we can deduce that any invalid D token inside a token string

Re: [Slides] Generic Low Level Programming with D - The Better C for your Business

2016-10-28 Thread e-y-e via Digitalmars-d-announce
On Friday, 28 October 2016 at 06:46:27 UTC, Ilya Yaroshenko wrote: https://docs.google.com/presentation/d/1w1cQ8vDluglRIt8Qdnm-sY7kqxoKZxbPEWW6tR3lPpo/edit?usp=sharing Thanks for uploading these!

Re: Linus' idea of "good taste" code

2016-10-28 Thread Era Scarecrow via Digitalmars-d
On Tuesday, 25 October 2016 at 22:53:54 UTC, Walter Bright wrote: Eliminating loops is something D adds, and goes even further to making code a straight line. A problem for myself and probably many programmers, is some of the tricks like what Linus did simply doesn't come to mind because

Re: How to kill whole application if child thread raises an exception?

2016-10-28 Thread dm via Digitalmars-d-learn
On Thursday, 27 October 2016 at 13:37:29 UTC, Steven Schveighoffer wrote: Hm... what about: import std.traits: Parameters; auto mySpawn(F)(F func, Parameters!F params) { static auto callIt(F func, Parameters!F params) { try { return func(params); }

Re: Comparing compilation time of random code in C++, D, Go, Pascal and Rust

2016-10-28 Thread Sebastien Alaiwan via Digitalmars-d-announce
On Thursday, 27 October 2016 at 12:11:09 UTC, Johan Engelen wrote: On Thursday, 27 October 2016 at 06:43:15 UTC, Sebastien Alaiwan If code generation/optimization is the bottleneck, a "ccache-for-D" ("dcache"?) tool might be very beneficial. See

Re: Mir GLAS is a C library and passes Natlib's test suite! And questions :-)

2016-10-28 Thread Ilya Yaroshenko via Digitalmars-d
On Friday, 28 October 2016 at 03:44:05 UTC, Andrei Alexandrescu wrote: On 10/27/16 3:59 AM, Ilya Yaroshenko wrote: Mir GLAS (Generic Linear Algebra Subprograms) has its own repository [1] now. Big news: 1. Mir GLAS does not require D / C++ runtime and can be used in any programming language

[Slides] Generic Low Level Programming with D - The Better C for your Business

2016-10-28 Thread Ilya Yaroshenko via Digitalmars-d-announce
https://docs.google.com/presentation/d/1w1cQ8vDluglRIt8Qdnm-sY7kqxoKZxbPEWW6tR3lPpo/edit?usp=sharing

Re: exercise - find invalid D tokens (Impossible ?)

2016-10-28 Thread Basile B. via Digitalmars-d-learn
On Friday, 28 October 2016 at 06:21:38 UTC, Johan Engelen wrote: On Friday, 28 October 2016 at 05:16:45 UTC, Basile B. wrote: Here are the specifications of token strings: "Token strings open with the characters q{ and close with the token }. In between must be valid D tokens. The { and }"

dub build --force but only for this package

2016-10-28 Thread Nicholas Wilson via Digitalmars-d-learn
So I'm trying to debug a project with the work flow of ssh into remote box edit/compile/run if it hangs yank the power out repeat this appears to corrupt the the last modification time to some time in the future and leads to the warning File

SoundTab Theremin software synthesizer

2016-10-28 Thread Vadim Lopatin via Digitalmars-d-announce
Hello, I've open sourced my project SoundTab: https://github.com/buggins/soundtab/ Play like on Theremin, but instead of moving hand in the air, move pen over wacom tablet. Volume is modulated by pen pressure, instead of left hand movement in Theremin. For better experience, use Wacom

Re: [Slides] Generic Low Level Programming with D - The Better C for your Business

2016-10-28 Thread Ilya Yaroshenko via Digitalmars-d-announce
On Friday, 28 October 2016 at 08:28:31 UTC, Johan Engelen wrote: On Friday, 28 October 2016 at 06:46:27 UTC, Ilya Yaroshenko wrote: https://docs.google.com/presentation/d/1w1cQ8vDluglRIt8Qdnm-sY7kqxoKZxbPEWW6tR3lPpo/edit?usp=sharing Nice :) Something I noticed on slide 6-8. The call __adEq2

Re: [Slides] Generic Low Level Programming with D - The Better C for your Business

2016-10-28 Thread Johan Engelen via Digitalmars-d-announce
On Friday, 28 October 2016 at 06:46:27 UTC, Ilya Yaroshenko wrote: https://docs.google.com/presentation/d/1w1cQ8vDluglRIt8Qdnm-sY7kqxoKZxbPEWW6tR3lPpo/edit?usp=sharing Nice :) Something I noticed on slide 6-8. The call __adEq2 is pretty lame, we have our fix ready:

Re: [Slides] Generic Low Level Programming with D - The Better C for your Business

2016-10-28 Thread FreeSlave via Digitalmars-d-announce
On Friday, 28 October 2016 at 06:46:27 UTC, Ilya Yaroshenko wrote: https://docs.google.com/presentation/d/1w1cQ8vDluglRIt8Qdnm-sY7kqxoKZxbPEWW6tR3lPpo/edit?usp=sharing Thanks. Was it for live presentation? Is there a video? And where is this fox from?

Re: What is the right level of abstractions for D?

2016-10-28 Thread Joakim via Digitalmars-d
On Thursday, 27 October 2016 at 17:03:09 UTC, Nick Sabalausky wrote: On 10/27/2016 02:22 AM, Joakim wrote: 1. low-level compiled languages like C++, D, Rust, and Swift, meant for performance and usually experts who want to squeeze it out 2. mid-level bytecode languages like Java and C#,

Re: Fun: Shooting yourself in the foot in D

2016-10-28 Thread Chris via Digitalmars-d
On Friday, 28 October 2016 at 01:25:55 UTC, Kirill Kryukov wrote: You shoot yourself in a tuple containing your foot, boot and sock. Cannot implicitly convert expression (map(shoot(foot))) of type MapResult to std.ouch.InputRange!limb

Re: Fun: Shooting yourself in the foot in D

2016-10-28 Thread Patric Dexheimer via Digitalmars-d
On Friday, 28 October 2016 at 09:29:41 UTC, Chris wrote: On Friday, 28 October 2016 at 01:25:55 UTC, Kirill Kryukov wrote: You shoot yourself in a tuple containing your foot, boot and sock. Cannot implicitly convert expression (map(shoot(foot))) of type MapResult to

Re: [Slides] Generic Low Level Programming with D - The Better C for your Business

2016-10-28 Thread Ilya Yaroshenko via Digitalmars-d-announce
On Friday, 28 October 2016 at 08:26:03 UTC, FreeSlave wrote: On Friday, 28 October 2016 at 06:46:27 UTC, Ilya Yaroshenko wrote: https://docs.google.com/presentation/d/1w1cQ8vDluglRIt8Qdnm-sY7kqxoKZxbPEWW6tR3lPpo/edit?usp=sharing Thanks. Was it for live presentation? Yes Is there a video?

Re: SoundTab Theremin software synthesizer

2016-10-28 Thread Vadim Lopatin via Digitalmars-d-announce
On Friday, 28 October 2016 at 08:28:41 UTC, Vadim Lopatin wrote: I've open sourced my project SoundTab: https://github.com/buggins/soundtab/ Play like on Theremin, but instead of moving hand in the air, move pen over wacom tablet. Volume is modulated by pen pressure, instead of left hand

Re: A question of function design?

2016-10-28 Thread WhatMeWorry via Digitalmars-d-learn
On Thursday, 27 October 2016 at 22:51:13 UTC, pineapple wrote: On Thursday, 27 October 2016 at 22:17:35 UTC, WhatMeWorry wrote: I'm using Derelict GLFW3 and I found the following GLFW3 code snippet in a demo. In a small demo, crap like this usually isn't a big deal. It's not common

Re: Best approach to handle accented letters

2016-10-28 Thread Alfred Newman via Digitalmars-d-learn
On Friday, 28 October 2016 at 11:40:37 UTC, Chris wrote: On Friday, 28 October 2016 at 11:24:28 UTC, Alfred Newman wrote: Hello, I'm getting some troubles to replace the accented letters in a given string with their unaccented counterparts. Let's say I have the following input string "très

Re: Best approach to handle accented letters

2016-10-28 Thread Chris via Digitalmars-d-learn
On Friday, 28 October 2016 at 12:52:04 UTC, Marc Schütz wrote: On Friday, 28 October 2016 at 11:24:28 UTC, Alfred Newman wrote: [...] import std.stdio; import std.algorithm; import std.uni; import std.conv; void main() { auto str = "très élégant"; immutable accents =

Re: Fun: Shooting yourself in the foot in D

2016-10-28 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 28 October 2016 at 11:41:11 UTC, John Colvin wrote: You unregister your feet from the runtime in order to move smoothly, wander in front of a bullet that's paused by the GC, which then un-pauses and hits you in the foot. This is the best one so far! This is typical D: circumvent

Re: The DLang UPB Languages and Systems Research Scholarship

2016-10-28 Thread Mike Parker via Digitalmars-d-announce
On Friday, 28 October 2016 at 10:43:36 UTC, thedeemon wrote: On Wednesday, 26 October 2016 at 01:11:05 UTC, Mike Parker wrote: For anyone tempted to share this on /r/programming, please wait! I hope to do a blog post about this on Friday, so I'll post to reddit then. Thanks! Please don't.

Is there a D static site generator based on markdown (like couscous) ?

2016-10-28 Thread Basile B. via Digitalmars-d-learn
I would need actually something like https://github.com/CouscousPHP/Couscous but in D.

Re: The DLang UPB Languages and Systems Research Scholarship

2016-10-28 Thread Chris via Digitalmars-d-announce
On Tuesday, 25 October 2016 at 22:15:38 UTC, Andrei Alexandrescu wrote: The D Language Foundation is proud to announce its first scholarship, offered to CS and EE students at University "Politehnica" Bucharest in Romania. More details here: http://dlang.org/dlangupb-scholarship.html We are

Re: Default struct member initializer ?

2016-10-28 Thread Temtaime via Digitalmars-d
But what about the case when default ctor is disabled ?

Re: Default struct member initializer ?

2016-10-28 Thread John Colvin via Digitalmars-d
On Friday, 28 October 2016 at 11:20:50 UTC, Temtaime wrote: Hi ! Is there such a magic ? struct S { uint k = 2; } enum Value = Foo!(S.k); // Value == 2 Thanks. struct S { int k = 2; } enum Value = S.init.k; static assert (Value == 2);

Default struct member initializer ?

2016-10-28 Thread Temtaime via Digitalmars-d
Hi ! Is there such a magic ? struct S { uint k = 2; } enum Value = Foo!(S.k); // Value == 2 Thanks.

Best approach to handle accented letters

2016-10-28 Thread Alfred Newman via Digitalmars-d-learn
Hello, I'm getting some troubles to replace the accented letters in a given string with their unaccented counterparts. Let's say I have the following input string "très élégant" and I need to create a function to return just "tres elegant". Considering we need to take care about unicode

Re: Fun: Shooting yourself in the foot in D

2016-10-28 Thread John Colvin via Digitalmars-d
On Thursday, 27 October 2016 at 19:49:16 UTC, Ali Çehreli wrote: http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html Some entries for reference: C - You shoot yourself in the foot. - You shoot yourself in the foot and then nobody else can figure out what you did. C++ -

Re: Best approach to handle accented letters

2016-10-28 Thread Chris via Digitalmars-d-learn
On Friday, 28 October 2016 at 11:24:28 UTC, Alfred Newman wrote: Hello, I'm getting some troubles to replace the accented letters in a given string with their unaccented counterparts. Let's say I have the following input string "très élégant" and I need to create a function to return just

Re: Fun: Shooting yourself in the foot in D

2016-10-28 Thread Chris via Digitalmars-d
On Friday, 28 October 2016 at 09:55:34 UTC, Patric Dexheimer wrote: On Friday, 28 October 2016 at 09:29:41 UTC, Chris wrote: On Friday, 28 October 2016 at 01:25:55 UTC, Kirill Kryukov wrote: You shoot yourself in a tuple containing your foot, boot and sock. Cannot implicitly convert

Re: The DLang UPB Languages and Systems Research Scholarship

2016-10-28 Thread thedeemon via Digitalmars-d-announce
On Wednesday, 26 October 2016 at 01:11:05 UTC, Mike Parker wrote: For anyone tempted to share this on /r/programming, please wait! I hope to do a blog post about this on Friday, so I'll post to reddit then. Thanks! Please don't. This is a total offtopic for /r/programming, don't create the

Is there Typeof template ?

2016-10-28 Thread Temtaime via Digitalmars-d-learn
Hi ! Tried to find alias Typeof(alias A) = typeof(A); or something, but failed. Are there something or should I create a PR to phobos? Thanks

Re: Fun: Shooting yourself in the foot in D

2016-10-28 Thread Guillaume Piolat via Digitalmars-d
On Thursday, 27 October 2016 at 19:49:16 UTC, Ali Çehreli wrote: http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html Some entries for reference: C - You shoot yourself in the foot. - You shoot yourself in the foot and then nobody else can figure out what you did. C++ -

Re: Default struct member initializer ?

2016-10-28 Thread Temtaime via Digitalmars-d
On Friday, 28 October 2016 at 11:23:47 UTC, John Colvin wrote: On Friday, 28 October 2016 at 11:20:50 UTC, Temtaime wrote: Hi ! Is there such a magic ? struct S { uint k = 2; } enum Value = Foo!(S.k); // Value == 2 Thanks. struct S { int k = 2; } enum Value = S.init.k; static assert

Re: Best approach to handle accented letters

2016-10-28 Thread Alfred Newman via Digitalmars-d-learn
On Friday, 28 October 2016 at 15:08:59 UTC, Chris wrote: On Friday, 28 October 2016 at 14:31:47 UTC, Chris wrote: [...] What you basically do is you pass the logic on to `map` and `map` applies it to each item in the range (cf. [1]): [...] The life is beautiful ! Thx.

[Issue 16643] CTFE internal error with null

2016-10-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16643 ag0ae...@gmail.com changed: What|Removed |Added Keywords||ice CC|

Re: D garbage collector and real-time systems

2016-10-28 Thread Yuxuan Shui via Digitalmars-d
On Wednesday, 28 January 2015 at 07:43:35 UTC, ketmar wrote: On Wed, 28 Jan 2015 06:58:41 +, Tom wrote: Or is there now the possibility of disabling the GC altogether, or replacing it with a refcounting 'GC' etc? you still can do manual memory management with `malloc()` and friends. but

Re: Is there Typeof template ?

2016-10-28 Thread Temtaime via Digitalmars-d-learn
On Friday, 28 October 2016 at 18:39:36 UTC, Ali Çehreli wrote: On 10/28/2016 11:25 AM, Jonathan M Davis via Digitalmars-d-learn wrote: >> void main() { >> @(`str`, 123) uint k; >> foreach (a; __traits(getAttributes, k)) { >> pragma(msg, typeof(a)); >> } >> } > I don't

[Issue 16644] New: final switch on int should error unless VRP matches all cases

2016-10-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16644 Issue ID: 16644 Summary: final switch on int should error unless VRP matches all cases Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 16643] New: CTFE internal error with null

2016-10-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16643 Issue ID: 16643 Summary: CTFE internal error with null Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor Priority: P1

Re: Avoiding GC

2016-10-28 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 28 October 2016 at 11:50:20 UTC, hardreset wrote: On Thursday, 27 October 2016 at 07:52:09 UTC, Guillaume Piolat wrote: On Wednesday, 26 October 2016 at 08:18:07 UTC, hardreset wrote: Is there a page somewhere on how to program D without using the GC? The information is scattered.

[Issue 16645] 3 errors messages instead of 1 after CTFE divide by 0

2016-10-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16645 b2.t...@gmx.com changed: What|Removed |Added Keywords||CTFE --

rpc between Tasks of vibe.d

2016-10-28 Thread crimaniak via Digitalmars-d-learn
Hi All! I will try to illustrate by code what exactly I have in mind: // we have not shared class/struct with some interface. class FooController { ... int foo1(int a, string b); string foo2(Struct1 c); ... } // now we want to make a running task with an instance inside auto

Re: A question of function design?

2016-10-28 Thread Mike Parker via Digitalmars-d-learn
On Friday, 28 October 2016 at 13:19:19 UTC, WhatMeWorry wrote: Anyone have a good example of what I should be doing? I generally use GLFW event callbacks to populate an event queue with custom event types, then process the queue and handle events elsewhere. That way, the callbacks need no

Re: The DLang UPB Languages and Systems Research Scholarship

2016-10-28 Thread Mike Parker via Digitalmars-d-announce
On Friday, 28 October 2016 at 13:57:37 UTC, Mike Parker wrote: How is a scholarship for CS degrees off topic? OK, nevermind. Been a while since I looked at the sidebar. "If there is no code in your link, it probably doesn't belong here."

Re: Best approach to handle accented letters

2016-10-28 Thread Chris via Digitalmars-d-learn
On Friday, 28 October 2016 at 13:50:24 UTC, Alfred Newman wrote: On Friday, 28 October 2016 at 11:40:37 UTC, Chris wrote: [...] @Chris As a new guy in the D community, I am not sure, but I think the line below is something like a Python's lambda, right ? auto removed =

CTFE divide by 0 prints the same error 3 times !

2016-10-28 Thread Basile B. via Digitalmars-d-learn
try this echo "enum a = 0/0;" > d.d && dmd d.d -main any reason for this ?

Re: Mir GLAS is a C library and passes Natlib's test suite! And questions :-)

2016-10-28 Thread Nicholas Wilson via Digitalmars-d
On Friday, 28 October 2016 at 16:14:56 UTC, Sameer Pradhan wrote: I must plead ignorance on the finer interface details, but from what I am reading this seems like an amazing development. I am so happy that that D has a solid base for GPU work. The post from a few weeks back with

[Issue 16645] New: 3 errors messages instead of 1 after CTFE divide by 0

2016-10-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16645 Issue ID: 16645 Summary: 3 errors messages instead of 1 after CTFE divide by 0 Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor

Re: Default struct member initializer ?

2016-10-28 Thread John Colvin via Digitalmars-d
On Friday, 28 October 2016 at 11:37:52 UTC, Temtaime wrote: But what about the case when default ctor is disabled ? Only relevant if you've written something like `@disable static S init();`, which you shouldn't be doing anyway. `.init` is independent of `@disable this()`

Re: Is TDPL an accurate description of the D language today?

2016-10-28 Thread Mark via Digitalmars-d-learn
On Tuesday, 27 September 2016 at 17:53:39 UTC, Steven Schveighoffer wrote: On 9/27/16 1:38 PM, Mark wrote: I've been going through Andrei's excellent book and I noticed that the latest printing is from 2010. Since D is still a very young language I can imagine it changing quite a bit within

Re: Pattern matching in D?

2016-10-28 Thread Nick Treleaven via Digitalmars-d
On Monday, 24 October 2016 at 04:14:52 UTC, Nick Sabalausky wrote: It's just...I mean, yea, it works, and you could probably DRY it up a little with a type contructing template ("alias RgbColor = DoMagic!RgbColor_"), but...meh... I think the following should be better. Instead of Proxy we

Re: Avoiding GC

2016-10-28 Thread hardreset via Digitalmars-d-learn
On Thursday, 27 October 2016 at 07:52:09 UTC, Guillaume Piolat wrote: On Wednesday, 26 October 2016 at 08:18:07 UTC, hardreset wrote: Is there a page somewhere on how to program D without using the GC? The information is scattered. How do I allocate / free structs / classes on the heap

Re: Is there Typeof template ?

2016-10-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 28 October 2016 at 10:52:05 UTC, Temtaime wrote: Are there something or should I create a PR to phobos? Why would you want that?

Re: Is there Typeof template ?

2016-10-28 Thread Temtaime via Digitalmars-d-learn
On Friday, 28 October 2016 at 12:44:20 UTC, Adam D. Ruppe wrote: On Friday, 28 October 2016 at 10:52:05 UTC, Temtaime wrote: Are there something or should I create a PR to phobos? Why would you want that? I have UDAs with values à la @(`str`, 123) uint k; And i want to know a type of a

Re: Is TDPL an accurate description of the D language today?

2016-10-28 Thread rikki cattermole via Digitalmars-d-learn
On 29/10/2016 1:35 AM, Mark wrote: On Tuesday, 27 September 2016 at 17:53:39 UTC, Steven Schveighoffer wrote: On 9/27/16 1:38 PM, Mark wrote: I've been going through Andrei's excellent book and I noticed that the latest printing is from 2010. Since D is still a very young language I can

Re: Binding temporaries to ref [WAS: I close BIP27. I won't be pursuing BIPs anymore]

2016-10-28 Thread bitwise via Digitalmars-d
On Friday, 21 October 2016 at 07:56:40 UTC, Ethan Watson wrote: On Thursday, 20 October 2016 at 19:49:42 UTC, Andrei Alexandrescu wrote: I think a solid DIP addressing the problem would have a good chance to get traction. I think all the information in this thread and the "Binding rvalues to