Re: Should we remove int[$] before 2.067?

2015-01-30 Thread Meta via Digitalmars-d
On Friday, 30 January 2015 at 20:43:10 UTC, Andrei Alexandrescu wrote: I think if you showed someone auto declarations and then showed them something like auto[] arr = [...], their likely reaction would be "well of course that works". Although maybe I'm too familiar with D at this point and th

Re: Should we remove int[$] before 2.067?

2015-01-30 Thread Meta via Digitalmars-d
On Friday, 30 January 2015 at 14:47:22 UTC, Andrei Alexandrescu wrote: As discussed in this forum, Kenji has authored https://github.com/D-Programming-Language/dmd/pull/3615 which has been recently merged. By this I am proposing we revert that decision, and quickly - before 2.067 is released

Re: accept @pure @nothrow @return attributes

2015-01-26 Thread Meta via Digitalmars-d
On Monday, 26 January 2015 at 19:44:18 UTC, Walter Bright wrote: On 1/26/2015 8:13 AM, Foo wrote: You could do the same as C++ with override and final: they are only valid attributes if they appear _after_ the function/method. Elsewhere they are still valid as identifiers for e.g. variables.

Re: 521 days, 22 hours, 7 minutes and 52 seconds...

2015-01-26 Thread Meta via Digitalmars-d
On Monday, 26 January 2015 at 18:25:13 UTC, Robert burner Schadek wrote: thank you @!"In order of appearance on github"() { Dicebot, JakobOvrum, monarchdodra, klamonte, grogancolin, fugalh, Geod24, andralex, braddr, AndrejMitrovic, MetaLang, p0nce, yglukhov, elendel-, sigod, sybrandy, DmitryOls

Re: accept @pure @nothrow @return attributes

2015-01-26 Thread Meta via Digitalmars-d
On Monday, 26 January 2015 at 09:54:31 UTC, Andrei Alexandrescu wrote: On 1/26/15 1:50 AM, Brian Schott wrote: On Monday, 26 January 2015 at 09:29:42 UTC, Paolo Invernizzi wrote: If someone is not following the merges, well... [1] !! --- Paolo [1] http://forum.dlang.org/post/54c5f10ae5161_1b

Re: Compile time iota

2015-01-22 Thread Meta via Digitalmars-d
On Thursday, 22 January 2015 at 13:06:26 UTC, Nick Treleaven wrote: On 21/01/2015 19:15, zeljkog wrote: And good name staticIota, unlike TypeTuple. I always wonder what is raw tuple, TypeTuple or Tuple :) Yes, there's a DIP to rename std.typetuple to std.meta.list. I made a pull to do that (

Re: dlang.org redesign n+1

2015-01-22 Thread Meta via Digitalmars-d
On Thursday, 22 January 2015 at 17:00:55 UTC, MattCoder wrote: On Thursday, 22 January 2015 at 16:58:39 UTC, Meta wrote: On Thursday, 22 January 2015 at 05:27:04 UTC, Zekereth wrote: First of all I like the new design. Way better than what's here now. I'll just throw another site in

Re: dlang.org redesign n+1

2015-01-22 Thread Meta via Digitalmars-d
On Thursday, 22 January 2015 at 05:27:04 UTC, Zekereth wrote: First of all I like the new design. Way better than what's here now. I'll just throw another site into the mix that I like which is Ocaml's site: https://ocaml.org/ . That's quite nice. It even has a section with recent forum posts.

Re: The ugly truth about ddoc

2015-01-20 Thread Meta via Digitalmars-d
On Monday, 19 January 2015 at 02:45:32 UTC, Meta wrote: It's late now, but I'll try building tomorrow and see what doesn't work. Getting back to this. I am currently on a journey to attempt to build the docs and/or the website (I'm not sure if the two are mutually exclusi

Re: A new and exciting way in which DMD fails to build for me

2015-01-20 Thread Meta via Digitalmars-d
On Tuesday, 20 January 2015 at 22:25:18 UTC, ketmar via Digitalmars-d wrote: if you'll make a PR, it would be good to change other invocations too: "optabgen" and "impcnvgen". I have; the PR is here if any driveby readers want to merge it: https://github.com/D-Programming-Language/dmd/pull/43

Re: A new and exciting way in which DMD fails to build for me

2015-01-20 Thread Meta via Digitalmars-d
On Tuesday, 20 January 2015 at 22:03:27 UTC, Meta wrote: On Tuesday, 20 January 2015 at 21:57:56 UTC, Meta wrote: The only things in my path when I run make are: C:\D\dmd2\windows\bin C:\Program Files (x86)\Git\cmd C:\D\dm\bin Also, when I open a new shell window and type "where idge

Re: A new and exciting way in which DMD fails to build for me

2015-01-20 Thread Meta via Digitalmars-d
On Tuesday, 20 January 2015 at 21:57:56 UTC, Meta wrote: The only things in my path when I run make are: C:\D\dmd2\windows\bin C:\Program Files (x86)\Git\cmd C:\D\dm\bin Also, when I open a new shell window and type "where idgen.exe", it points to the one in the DMD folder. I'

Re: A new and exciting way in which DMD fails to build for me

2015-01-20 Thread Meta via Digitalmars-d
On Tuesday, 20 January 2015 at 21:37:08 UTC, ketmar via Digitalmars-d wrote: On Tue, 20 Jan 2015 21:11:29 + Meta via Digitalmars-d wrote: On Tuesday, 20 January 2015 at 20:50:49 UTC, ketmar via Digitalmars-d wrote: > this may be timestamp-related somehow, 'cause make looks &

Re: A new and exciting way in which DMD fails to build for me

2015-01-20 Thread Meta via Digitalmars-d
On Tuesday, 20 January 2015 at 20:50:49 UTC, ketmar via Digitalmars-d wrote: this may be timestamp-related somehow, 'cause make looks only to timestamps to determine which file(s) should be rebuild. does this occurs if you cloning dmd repo in fresh place? i built windows version of dmd not so

Re: A new and exciting way in which DMD fails to build for me

2015-01-20 Thread Meta via Digitalmars-d
On Tuesday, 20 January 2015 at 20:33:58 UTC, ketmar via Digitalmars-d wrote: On Tue, 20 Jan 2015 20:22:59 + Meta via Digitalmars-d wrote: > what is that "id.c" at all? i can't find such file in dmd > git repo... It's generated by idgen.exe, which is compiled f

Re: forcing "@nogc" on class destructors

2015-01-20 Thread Meta via Digitalmars-d
On Tuesday, 20 January 2015 at 18:25:42 UTC, ketmar via Digitalmars-d wrote: how likely this to be changed? is there *any* chances of that in 2015? 2016? and why we can't just remove that restriction when new GC will be implemented? removing the "@nogc" requirement on class dtors will break *no

Re: forcing "@nogc" on class destructors

2015-01-20 Thread Meta via Digitalmars-d
On Tuesday, 20 January 2015 at 20:25:15 UTC, Meta wrote: Is it that subtle of a bug? Your program crashes once, you go on the forums and find the answer, and then you know never to do it again. Furthermore, this is something that seems like it'd be incredibly simple to add to dscanne

Re: A new and exciting way in which DMD fails to build for me

2015-01-20 Thread Meta via Digitalmars-d
On Tuesday, 20 January 2015 at 20:19:19 UTC, ketmar via Digitalmars-d wrote: On Tue, 20 Jan 2015 20:14:42 + Meta via Digitalmars-d wrote: I'm trying to build to build DMD and I've encountered a very strange problem. When I run `make -fwin32.mak`, there are errors when it tries

A new and exciting way in which DMD fails to build for me

2015-01-20 Thread Meta via Digitalmars-d
I'm trying to build to build DMD and I've encountered a very strange problem. When I run `make -fwin32.mak`, there are errors when it tries to compile id.c: id.c(298) : Error: 'idPool' is not a member of 'Lexer' ...etc. Sure enough, when I look in id.c, there are a bunch of these: stringof =

Re: forcing "@nogc" on class destructors

2015-01-20 Thread Meta via Digitalmars-d
On Tuesday, 20 January 2015 at 18:12:27 UTC, ketmar via Digitalmars-d wrote: Hello. as there is no possibility to doing GC allocations in class destructors, wouldn't it be nice to just force "@nogc" attribute on such dtors? i know, i know, "this will break alot of code". i'm pretty sure that

Re: The ugly truth about ddoc

2015-01-18 Thread Meta via Digitalmars-d
On Monday, 19 January 2015 at 02:36:35 UTC, Andrei Alexandrescu wrote: On 1/18/15 6:32 PM, Meta wrote: On Monday, 19 January 2015 at 02:25:23 UTC, Adam D. Ruppe wrote: On Monday, 19 January 2015 at 02:18:32 UTC, Andrei Alexandrescu wrote: I'm sure experts must have tools for allowing t

Re: The ugly truth about ddoc

2015-01-18 Thread Meta via Digitalmars-d
On Monday, 19 January 2015 at 02:25:23 UTC, Adam D. Ruppe wrote: On Monday, 19 January 2015 at 02:18:32 UTC, Andrei Alexandrescu wrote: I'm sure experts must have tools for allowing things like variables and macros for css creation. My css macro expander (http://code.dlang.org/packages/cssexp

Re: DIP71: 'noscope' and 'out!param' attributes

2015-01-18 Thread Meta via Digitalmars-d
On Sunday, 18 January 2015 at 18:12:57 UTC, Zach the Mystic wrote: http://wiki.dlang.org/DIP71 I want to keep this simple. There are three ways for a reference passed to a function to escape that function. static T* s; T* fun(T* p1, T** p2) { // escape by global s = p1; // escape by r

Re: http://wiki.dlang.org/DIP25 has been preliminarily approved for 2.067

2015-01-17 Thread Meta via Digitalmars-d
On Friday, 16 January 2015 at 21:41:25 UTC, Andrei Alexandrescu wrote: Please help us work the kinks out! Walter will be proceeding with the opt-in implementation for quicker pipelining. http://wiki.dlang.org/DIP25 Andrei It seems to me that once this DIP is implemented, it should be safe

Re: Why exceptions for error handling is so important

2015-01-13 Thread Meta via Digitalmars-d
On Wednesday, 14 January 2015 at 00:38:21 UTC, Walter Bright wrote: On 1/11/2015 2:48 AM, Walter Bright wrote: However, if exceptions are thrown for errors instead, the programmer has to deliberately add code if he wishes to ignore the error. Interesting that this article just appeared: ht

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Meta via Digitalmars-d
On Monday, 12 January 2015 at 00:33:52 UTC, Andrei Alexandrescu wrote: Answers from others would be helpful. Thanks! -- Andrei Usually once per beta and once per release.

Re: Is anyone working on a D source code formatting tool?

2015-01-10 Thread Meta via Digitalmars-d
On Saturday, 10 January 2015 at 21:17:29 UTC, Meta wrote: On Saturday, 10 January 2015 at 20:54:56 UTC, Jacob Carlborg wrote: On 2015-01-10 21:17, Walter Bright wrote: Has someone made a dfmt, like http://gofmt.com/ ? I have thought about it a couple of times but never started. It would be

Re: Is anyone working on a D source code formatting tool?

2015-01-10 Thread Meta via Digitalmars-d
On Saturday, 10 January 2015 at 20:54:56 UTC, Jacob Carlborg wrote: On 2015-01-10 21:17, Walter Bright wrote: Has someone made a dfmt, like http://gofmt.com/ ? I have thought about it a couple of times but never started. It would be really nice to have. https://github.com/Hackerpilot/dfix

Re: Revert attributes to their defaults with default keywords

2015-01-09 Thread Meta via Digitalmars-d
On Friday, 9 January 2015 at 14:26:26 UTC, aldanor wrote: It could work both ways at the same time. Maybe even something like "default(pred) final(pred) nothrow" --> if pred is compile-time-true, reset all attributes and then add final/nothrow; if it's compile-time-false, disable final and en

Re: http://wiki.dlang.org/DIP25

2015-01-08 Thread Meta via Digitalmars-d
On Monday, 5 January 2015 at 19:21:38 UTC, Steven Schveighoffer wrote: On 1/5/15 10:05 AM, Meta wrote: IMO, inout (and const/immutable to a degree) is a failure for use with class/struct methods. This became clear to me when trying to use it for the toString implementation of Nullable

Re: http://wiki.dlang.org/DIP25

2015-01-05 Thread Meta via Digitalmars-d
On Monday, 5 January 2015 at 14:00:13 UTC, Steven Schveighoffer wrote: On 1/5/15 8:06 AM, deadalnix wrote: On Monday, 29 December 2014 at 20:26:27 UTC, Steven Schveighoffer wrote: On 12/29/14 2:50 PM, Walter Bright wrote: On 12/29/2014 5:53 AM, Steven Schveighoffer wrote: On 12/28/14 4:33 PM,

Re: D and Nim

2015-01-04 Thread Meta via Digitalmars-d
On Sunday, 4 January 2015 at 22:55:52 UTC, bearophile wrote: Nim has 363 issues accoring to https://github.com/Araq/Nim/issues . D has 2444 according to So are Nim developers still in need to find more than two thousand unknown issues? ;-) I agree, it's more likely that there are more undisc

Re: Constant template arguments

2015-01-03 Thread Meta via Digitalmars-d
On Sunday, 4 January 2015 at 01:34:51 UTC, Manu via Digitalmars-d wrote: I kinda feel something like this ought to work, but I can kinda see why it doesn't... void foo(T = Unqual!U, U)(T a, T b); Thing is, it perceives that 'T' as typed by the argument received *is* T, but it's not; T is alre

Re: Constant template arguments

2015-01-03 Thread Meta via Digitalmars-d
On Saturday, 3 January 2015 at 12:45:47 UTC, bearophile wrote: void foo(T)(Unqual!T a, Unqual!T b) { a = b; b = a; } void main() { const int x, y; foo(x, y); } Missing line: import std.traits: Unqual; Bye, bearophile Wouldn't it be better to do this at the call site anyway? Just

Re: Trying to avoid the GC

2015-01-01 Thread Meta via Digitalmars-d
On Thursday, 1 January 2015 at 07:40:50 UTC, Shachar Shemesh wrote: Add to that the fact that the language's name is a single letter, and you find yourself looking for "D is". Try it. The results are unhelpful. Searching for "dlang is" is somewhat better, but not much. TDPL's table of contents

Re: Happy new year!

2014-12-31 Thread Meta via Digitalmars-d
祝贺大家新年好! Happy New Year. Let's make it a good year for D.

Re: http://wiki.dlang.org/DIP25

2014-12-28 Thread Meta via Digitalmars-d
On Sunday, 28 December 2014 at 18:16:04 UTC, Andrei Alexandrescu wrote: "auto" has no meaning there. It does here: auto ref foo(auto ref int x) { return x; } This wouldn't compile anymore - inout is needed for x as well. So are you saying that such code will require the following if this DIP

Re: GBAiD (GameBoy Advance in D)

2014-12-25 Thread Meta via Digitalmars-d
On Thursday, 25 December 2014 at 09:22:48 UTC, JN wrote: I write the code in a same way, even though I first learned and used C++ before switching to Java. Is it really that bad? I know OOP isn't trendy nowadays and functional programming is cool, but it's a very simple way to write software. I

Re: GBAiD (GameBoy Advance in D)

2014-12-24 Thread Meta via Digitalmars-d
On Thursday, 25 December 2014 at 00:05:06 UTC, MattCoder wrote: Hi, Not mine, just sharing: reddit: http://www.reddit.com/r/programming/comments/2qaxvs/gbaid_a_gameboy_advance_emulator_in_d/ github: https://github.com/DDoS/GBAiD Matheus. That's really neat. The author's coding style sugge

Re: Allocators stack

2014-12-22 Thread Meta via Digitalmars-d
On Monday, 22 December 2014 at 16:51:30 UTC, Allocator stack wrote: How about allocators stack? Allocator e.g. one of these https://github.com/andralex/phobos/blob/allocator/std/allocator.d - allocatorStack.push(new GCAllocator); //Some code that use memory allocation auto a = ['x', '

Re: Do everything in Java…

2014-12-17 Thread Meta via Digitalmars-d
On Wednesday, 17 December 2014 at 22:24:09 UTC, Sean Kelly wrote: Hah. I tried RoR once. I couldn't get the environment set up and running and eventually just gave up. Getting RoR set up and working for me + 4 people in a Windows environment was absolute hell. I'd never want to go through th

Re: D3

2014-12-10 Thread Meta via Digitalmars-d
On Tuesday, 9 December 2014 at 08:15:02 UTC, Puming wrote: For Chinese it would be "帝" which pronounces the same as 'D' and means Emperor. An interesting coincidence is that Walter also created the game Empire :-) source: I'm Chinese D2 = D二 = 第二 That was an attempt at a pun, but my Chinese

Re: std.stdint seems to be an outcast?

2014-12-08 Thread Meta via Digitalmars-d
On Monday, 8 December 2014 at 17:21:00 UTC, Gary Willoughby wrote: There is a module called std.stdint located here: http://dlang.org/phobos/std_stdint.html but it doesn't appear in the documentation index here: http://dlang.org/phobos/index.html Not only that but when looking at the source i

Re: Symbol lookup rules and imports

2014-12-04 Thread Meta via Digitalmars-d
module base; class Base { import std.conv; } module derived; import base; import std.stdio; string text = "123"; class Derived : Base { static void foo() { writeln(text); } } void main() { Derived.foo(); } This prints an empty line! M

Re: Symbol lookup rules and imports

2014-12-02 Thread Meta via Digitalmars-d
This whole thing is a huge hole in D that needs to be fixed (it may even be necessary to consider it higher priority than the current C++ and GC). As it works currently, I'd go as far as to say that almost every addition to Phobos must be considered a breaking change for these reasons. Given th

Re: Reference Counting and Static Checker

2014-12-02 Thread Meta via Digitalmars-d
On Tuesday, 2 December 2014 at 14:41:20 UTC, Suminda Dharmasena wrote: Great. What about Rust like static memory safety analysis. (But transparent to the user.) I wouldn't say Rust's method of statically checked memory safety is exactly transparent. You have to do some weird contortions to ex

Re: Some things from GCC 5

2014-11-30 Thread Meta via Digitalmars-d
On Sunday, 30 November 2014 at 10:58:01 UTC, bearophile wrote: I'll wait for your opinions before asking for this error in D. I have added this to Bugzilla, it can please the "final on default" crowd: https://issues.dlang.org/show_bug.cgi?id=13798 Bye, bearophile It seems that both of these

Re: "Named parameter builder" pattern for template parameters

2014-11-26 Thread Meta via Digitalmars-d
On Wednesday, 26 November 2014 at 17:42:07 UTC, Robik wrote: If D would support getting parameter names(currently does not work for lambdas) of lambdas we could have: someConnect(host => "test", port => 7999); Just a random thought :) import std.stdio; import std.traits; void main() {

Re: Type Inference Bug?

2014-11-22 Thread Meta via Digitalmars-d
On Friday, 21 November 2014 at 19:19:20 UTC, Daniel Murphy wrote: Furthermore, I'm starting to get very confused: enum sameTypes(T, U) = is(T: U) && is(U: T); assert(sameTypes!(const int, immutable int)); //Ok, wtf? assert(sameTypes!(int, immutable int); //Ok, wtf? All of those types implicit

Re: 'int' is enough for 'length' to migrate code from x86 to x64

2014-11-21 Thread Meta via Digitalmars-d
On Friday, 21 November 2014 at 16:48:35 UTC, CraigDillabaugh wrote: I live in Quebec and my intuition always tells me to look both ways - because you never know :o) While doing my driver's training years ago, my instructor half-jokingly warned us never to jaywalk in Quebec unless we have a de

Re: Type Inference Bug?

2014-11-21 Thread Meta via Digitalmars-d
On Friday, 21 November 2014 at 07:40:31 UTC, Daniel Murphy wrote: It doesn't print anything for me. This code seems to have the desired effect: shared const int i; void main() { static if (is(typeof(i) : shared(U), U)) { //Prints "const(int)" pragma(msg, U); } } Now

Re: Type Inference Bug?

2014-11-21 Thread Meta via Digitalmars-d
On Friday, 21 November 2014 at 15:29:05 UTC, Daniel Murphy wrote: but you could enforce exact type with something like if (typeof(i) == shared(U), U) && is(shared(U) == typeof(i)) I'm assuming you meant if (typeof(i): shared(U), U) && is(shared(U): typeof(i))).

Re: Type Inference Bug?

2014-11-21 Thread Meta via Digitalmars-d
On Friday, 21 November 2014 at 07:40:31 UTC, Daniel Murphy wrote: It doesn't print anything for me. This code seems to have the desired effect: shared const int i; void main() { static if (is(typeof(i) : shared(U), U)) { //Prints "const(int)" pragma(msg, U); } } Hmm

Re: the traits trap

2014-11-20 Thread Meta via Digitalmars-d
On Friday, 21 November 2014 at 04:08:52 UTC, Steven Schveighoffer wrote: OK, so I'm writing some traits that I'd like my objects to satisfy. And I'm having the worst time debugging them. Most of the traits in D look like this: enum isSomeType(T) = __traits(compiles, (T t){ // some statement

Type Inference Bug?

2014-11-20 Thread Meta via Digitalmars-d
shared const int i; static if (is(typeof(i) T == shared U, U)) { //Prints "shared(const(int))" pragma(msg, U); } This seems like subtly wrong behaviour to me. If T == shared U, for some U, then shouldn't U be unshared? If T is shared(const(int)), and T is the same as the type U with th

Re: Documentation of DList in std.container seems to be inaccurate

2014-11-19 Thread Meta via Digitalmars-d
On Wednesday, 19 November 2014 at 15:45:34 UTC, H. S. Teoh via Digitalmars-d wrote: The documentation was wrong before, but the whole point of removeAny() is that it removes *any* element from the container, and it's not specified *which* one is removed. The fact that a particular element (fro

Re: Can't pass private symbols as alias parameter

2014-11-16 Thread Meta via Digitalmars-d
Actually, the more I think about it, the more I'm sure that it is a bug. If you import A into module b, you should be able to use it with the symbols in b. This actually seems like quite a bad bug.

Re: Can't pass private symbols as alias parameter

2014-11-16 Thread Meta via Digitalmars-d
On Sunday, 16 November 2014 at 10:41:20 UTC, deadalnix wrote: module a; struct A(alias foo) { auto foo() { return foo(); } } module b; import a; void main() { auto a = A!bar(); } private int bar() { return 42; } This do not work. I think it is a bug but I see how could s

DMC download on main site contains wrong link.exe?

2014-11-14 Thread Meta via Digitalmars-d
I was just trying to compile DMD from source when I got a linker error: OPTLINK : warning 9: Unkown Option : LA I got this version of OPTLINK from the DMC zip hosted here: http://downloads.dlang.org/other/dm857c.zip. It says it's version 8.00.15, and the copyright message says "1989-2010" (as

Re: Found by Coverty in LibreOffice

2014-11-10 Thread Meta via Digitalmars-d
You might find this interesting: http://forum.dlang.org/post/mailman.43.1385384503.3242.digitalmar...@puremagic.com

Re: Optimization fun

2014-11-06 Thread Meta via Digitalmars-d
On Thursday, 6 November 2014 at 23:30:56 UTC, Walter Bright wrote: On 11/6/2014 3:13 PM, H. S. Teoh via Digitalmars-d wrote: mouth.open(); mouth.insert(foot); Now you've done it. You must pull the Stone of Shame! https://pbs.twimg.com/media/BrENFq3CMAEqFUL.jpg The Shame Cube is far

Re: Multiple Inhertiance?

2014-11-06 Thread Meta via Digitalmars-d
On Thursday, 6 November 2014 at 21:56:39 UTC, deadalnix wrote: In the other hand, alias this (or prototypal inheritance model in general) do not suffer from these issues. It also have some good use case like entity framework. I'm curious as to how prototypical inheritance avoids the diamond i

Re: sortOn: sorts range of aggregates by member name(s)

2014-11-04 Thread Meta via Digitalmars-d
On Wednesday, 5 November 2014 at 00:32:32 UTC, Nordlöw wrote: Has there been any proposals to add a sort-wrapper, say sortBy, in cases such as struct X { double x, y, z; } auto r = new X[3]; used as r.sortBy!("x", "y") sorting r by value of "x" then "y". If not and anybody is in

Re: Is this a bug? `static if` fails silently.

2014-11-04 Thread Meta via Digitalmars-d
On Tuesday, 4 November 2014 at 21:20:59 UTC, Tofu Ninja wrote: On Tuesday, 4 November 2014 at 09:00:12 UTC, Meta wrote: typeof(T) What is the type of a type? A kind, of course. =)

Re: Is this a bug? `static if` fails silently.

2014-11-04 Thread Meta via Digitalmars-d
On Tuesday, 4 November 2014 at 09:07:10 UTC, deadalnix wrote: It is not static if, it is is. Is is defined as false for invalid types. Ah, right. That's annoyingly hard to spot, but it is not a bug I suppose.

Is this a bug? `static if` fails silently.

2014-11-04 Thread Meta via Digitalmars-d
struct Test(T) { static if (is(typeof(T) == int)) { pragma(msg, "test"); this(T t) { this.t = t; } } } void main() { //Nothing is printed Test!int t; }

Re: Programming Language for Games, part 3

2014-11-04 Thread Meta via Digitalmars-d
On Tuesday, 4 November 2014 at 08:26:36 UTC, Jacob Carlborg wrote: LLVM has a JIT compiler, LDC uses LLVM. Perhaps time to see if it's possible to use the JIT compiler for CTFE. Isn't SDC already able to do JIT compilation for CTFE? I swear I've seen Deadalnix mention it before...

Re: Programming Language for Games, part 3

2014-11-02 Thread Meta via Digitalmars-d
On Sunday, 2 November 2014 at 20:12:17 UTC, bearophile wrote: Perhaps a good enough FlagsEnum can be implemented with pure D library code. https://github.com/D-Programming-Language/phobos/pull/2058

Re: Increasing D's visibility

2014-10-30 Thread Meta via Digitalmars-d
On Thursday, 30 October 2014 at 10:24:56 UTC, eles wrote: On Thursday, 18 September 2014 at 03:25:19 UTC, deadalnix wrote: On Thursday, 18 September 2014 at 02:54:33 UTC, Isaac Gouy wrote: On Thursday, 18 September 2014 at 00:59:41 UTC, Vladimir Panteleev wrote: Rule 34 "Rule #34 There is

Re: What IDE/EDITOR do you use for D?

2014-10-29 Thread Meta via Digitalmars-d
On Wednesday, 29 October 2014 at 19:38:16 UTC, dan wrote: What IDE/EDITOR do you use for D? What plugins if you use Vim? Visual Studio + VisualD, or Sublime with DCD for smaller scripts.

Re: DIP66 - Multiple alias this

2014-10-28 Thread Meta via Digitalmars-d
On Tuesday, 28 October 2014 at 22:55:24 UTC, IgorStepanov wrote: You may see isFloatingPoint declaration in traits.d: enum bool isFloatingPoint(T) = is(FloatingPointTypeOf!T) && !isAggregateType!T; This template explicitly says that T shouldn't be an aggregate type. Thus std.math.isNaN(X)(X

Re: DIP66 - Multiple alias this

2014-10-28 Thread Meta via Digitalmars-d
On Tuesday, 28 October 2014 at 20:09:07 UTC, IgorStepanov wrote: And please comment my way to resolving "is" expression via alias-this: http://forum.dlang.org/thread/ubafmwvxwtolhmnxb...@forum.dlang.org?page=5 Something else related to the discussion about `is` from this thread: http://forum

Re: DIP66 - Multiple alias this

2014-10-28 Thread Meta via Digitalmars-d
On Tuesday, 28 October 2014 at 21:55:35 UTC, Meta wrote: or should isFloatingPoint be changed so that it also accepts types that alias a floating point type? My mistake, I mean isNaN and similar functions, such as isNumeric.

Re: D in my trashbin

2014-10-24 Thread Meta via Digitalmars-d
On Friday, 24 October 2014 at 13:04:48 UTC, ketmar via Digitalmars-d wrote: On Fri, 24 Oct 2014 10:42:47 + Martin Nowak via Digitalmars-d wrote: On Friday, 24 October 2014 at 02:44:48 UTC, Adam D. Ruppe wrote: > I always just use the zip which works fine out of the box > without even ne

Re: DIP66 - Multiple alias this

2014-10-24 Thread Meta via Digitalmars-d
On Friday, 24 October 2014 at 13:05:54 UTC, IgorStepanov wrote: On Friday, 24 October 2014 at 06:04:24 UTC, Andrei Alexandrescu wrote: On 10/19/14 2:00 PM, IgorStepanov wrote: Bump. I've made a few grammar and fluency edits to the DIP, and collected a few thoughts while doing that. Will get

Re: Adding the ?. null verification

2014-10-21 Thread Meta via Digitalmars-d
Did you ever get around to making a pull request for this? It'd be nice to have this in Phobos, so I can make one for you (all attribution to you, of course) if you don't have time to push it through.

Re: So what exactly is coming with extended C++ support?

2014-10-14 Thread Meta via Digitalmars-d
On Tuesday, 14 October 2014 at 22:27:35 UTC, Walter Bright wrote: Currently, D supports C++: * function calling * name mangling * namespaces * templates * member functions * single inheritance * basic types that exist in C++ but not D (like 'long') Note that there are no plans to support C++ se

Re: Will D ever get optional named parameters?

2014-10-13 Thread Meta via Digitalmars-d
On Monday, 13 October 2014 at 19:18:39 UTC, Walter Bright wrote: Nothing requires function overloads to use the same names in the same order for parameters. "color" can be the name for parameter 1 in one overload and for parameter 3 in another and not be there at all for a third. Parameters n

Re: Refined types [almost OT]

2014-10-13 Thread Meta via Digitalmars-d
On Monday, 13 October 2014 at 08:20:15 UTC, thedeemon wrote: Ridiculous, I'm positive that D fully supports refined types in the language. Please check your facts. Meta, go home, you're drunk. That was a joke.

Re: Refined types [almost OT]

2014-10-12 Thread Meta via Digitalmars-d
On Monday, 13 October 2014 at 00:01:02 UTC, Timon Gehr wrote: On 10/13/2014 01:48 AM, Meta wrote: On Sunday, 12 October 2014 at 20:58:58 UTC, Timon Gehr wrote: Yes it is. Why wouldn't it be? Values needn't be completely determined in order to be reasoned about. They do if you wan

Re: Refined types [almost OT]

2014-10-12 Thread Meta via Digitalmars-d
On Sunday, 12 October 2014 at 20:58:58 UTC, Timon Gehr wrote: Yes it is. Why wouldn't it be? Values needn't be completely determined in order to be reasoned about. They do if you want to check, for example, n < 3. D doesn't currently support the type of analysis necessary to implement somethi

Re: Refined types [almost OT]

2014-10-12 Thread Meta via Digitalmars-d
On Sunday, 12 October 2014 at 19:36:35 UTC, bearophile wrote: Meta: On Sunday, 12 October 2014 at 16:21:50 UTC, bearophile wrote: What happens if one of these conditions fails? Is an exception thrown? If you are using refined types, and D is somewhat assuming they are refinements of those

Re: Refined types [almost OT]

2014-10-12 Thread Meta via Digitalmars-d
On Sunday, 12 October 2014 at 16:21:50 UTC, bearophile wrote: What happens if one of these conditions fails? Is an exception thrown? Note that you can also sort of do this using template constraints, but that of course only works at compile time: double get2dimensional(int n, int m, int i, int

Re: What are the worst parts of D?

2014-10-06 Thread Meta via Digitalmars-d
On Monday, 6 October 2014 at 07:51:41 UTC, ketmar via Digitalmars-d wrote: On Mon, 06 Oct 2014 07:44:56 + Paolo Invernizzi via Digitalmars-d wrote: I would also add that it's scaring not having seen a single comment of Andrej here: https://github.com/D-Programming-Language/dmd/pull/3998

Re: User-defined "opIs"

2014-09-24 Thread Meta via Digitalmars-d
On Wednesday, 24 September 2014 at 23:08:26 UTC, Adam D. Ruppe wrote: On Wednesday, 24 September 2014 at 22:48:36 UTC, Meta wrote: Is this supposed to work, and if not, should an enhancement be made to allow it? It is not supposed to work - the docs don't list is as overridable

User-defined "opIs"

2014-09-24 Thread Meta via Digitalmars-d
The following code fails under DMD 2.065: struct Test { bool opBinary(string op: "is", T: typeof(null))(T val) { return false; } bool opBinaryRight(string op: "is", T: typeof(null))(T val) { return false; } } void main() { auto t = Test(); //Error

Re: What are the worst parts of D?

2014-09-24 Thread Meta via Digitalmars-d
On Wednesday, 24 September 2014 at 07:41:48 UTC, ketmar via Digitalmars-d wrote: all three of them. You forget that D is now actively used at Facebook, and better C++ interop would allow them to slowly phase out more and more C++ code. The more Facebook uses D, the more support it will provi

Re: Local imports hide local symbols

2014-09-23 Thread Meta via Digitalmars-d
On Tuesday, 23 September 2014 at 18:52:13 UTC, H. S. Teoh via Digitalmars-d wrote: I can think of a few: 1) Change lookup rules so that symbols pulled in by local import are found last. Walter has stated that he disagrees with this approach because it complicates symbol lookup rules. 2) Emit

Re: Local imports hide local symbols

2014-09-23 Thread Meta via Digitalmars-d
On Tuesday, 23 September 2014 at 18:34:51 UTC, Andrei Alexandrescu wrote: I've raised https://issues.dlang.org/show_bug.cgi?id=10378 to critical. Please chime in with ideas for a good solution. Thanks! -- Andrei What about requiring all local imports to be statically imported? module a; int

Re: Library Typedefs are fundamentally broken

2014-09-23 Thread Meta via Digitalmars-d
On Saturday, 20 September 2014 at 16:34:17 UTC, bearophile wrote: See: https://d.puremagic.com/issues/show_bug.cgi?id=11828 Some other open issues/ERs: https://issues.dlang.org/buglist.cgi?f1=short_desc&o1=casesubstring&query_format=advanced&resolution=---&v1=Typedef Bye, bearophile This issu

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-23 Thread Meta via Digitalmars-d
On Tuesday, 23 September 2014 at 16:18:33 UTC, Andrei Alexandrescu wrote: The offer was in the context of a feature that was being rejected. -- Andrei Walter *has* said before that he's uncomfortable with tools that directly modify source code, which is understandable. A good suggestion was t

Re: Library Typedefs are fundamentally broken

2014-09-23 Thread Meta via Digitalmars-d
Can someone clarify how exactly Typedef should work? I'd love to make a pull request to fix up whatever needs fixing, but it seems like there are a couple different notions of how it should work, and it's quite confusing. This seems very similar to the argument over enums (which turned out to n

Re: Library Typedefs are fundamentally broken

2014-09-22 Thread Meta via Digitalmars-d
On Monday, 22 September 2014 at 09:39:29 UTC, Don wrote: My feeling is that almost every time when you want to create a new type from an existing one, you actually want to restrict the operations which can be performed on it. (Eg if you have typedef money = double; then money*money doesn't mak

Re: Increasing D's visibility

2014-09-16 Thread Meta via Digitalmars-d
On Tuesday, 16 September 2014 at 21:21:08 UTC, Martin Drasar via Digitalmars-d wrote: On 16.9.2014 20:07, Anonymous via Digitalmars-d wrote: Dlang on 4chan http://boards.4chan.org/g/thread/44196390/dlang Yeah, and the discussion is just in line with typical 4chan discussions :-) A1) Andrei

Re: Regarding Nullables

2014-09-13 Thread Meta via Digitalmars-d
On Saturday, 13 September 2014 at 19:39:03 UTC, Andrei Alexandrescu wrote: On 9/13/14, 8:36 AM, bearophile wrote: This is a little Haskell program that uses the Maybe type constructor: [snip] As others noted, I think we need a kind of range with either zero or one element. Also, the range wou

Re: Regarding Nullables

2014-09-13 Thread Meta via Digitalmars-d
On Saturday, 13 September 2014 at 15:36:30 UTC, bearophile wrote: This is a little Haskell program that uses the Maybe type constructor: foo :: Int -> Maybe Int foo x | x < 10 = Just x foo _ = Nothing main = do print $ foo 5 print $ foo 15 Its output: Just 5 Nothing Th

Re: Which patches/mods exists for current versions of the DMD parser?

2014-09-11 Thread Meta via Digitalmars-d
On Thursday, 11 September 2014 at 20:02:22 UTC, Peter Alexander wrote: On Monday, 8 September 2014 at 15:25:11 UTC, Timon Gehr wrote: On 09/08/2014 10:51 AM, "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= " wrote: What kind of syntactical sugar do you feel is missing in D? int square(int x)=>x*x; U

Re: @nogc, exceptions, generic containers... Issues.

2014-09-08 Thread Meta via Digitalmars-d
On Monday, 8 September 2014 at 15:55:53 UTC, monarch_dodra wrote: I'm starting this thread related to two issues I'm encountering in regards to avoiding the GC, and the new @nogc attribute. 1) Issue 1) The first issue is in regards to Throwables. The issue here is that they are allocated using

Re: [OT] If programming languages were weapons

2014-09-05 Thread Meta via Digitalmars-d
On Tuesday, 2 September 2014 at 21:45:42 UTC, Brian Schott wrote: On Tuesday, 2 September 2014 at 08:29:25 UTC, Iain Buclaw wrote: In normal fashion, it's missing an entry for D. http://bjorn.tipling.com/if-programming-languages-were-weapons I'll let your imaginations do the work. Iain. ht

Re: [OT] Re: Redesign of dlang.org

2014-08-21 Thread Meta via Digitalmars-d
On Thursday, 21 August 2014 at 04:59:20 UTC, Hubert wrote: https://www.dropbox.com/s/oicmwoboku136jq/dlang_test_redesign.png That does look quite nice. It may be a bit *too* minimalist, and the colours aren't right, but the design is solid.

<    1   2   3   4   5   6   7   8   9   10   >