Re: Box2D Lite D Port (Yet Another)

2016-10-31 Thread John Colvin via Digitalmars-d-announce
On Monday, 31 October 2016 at 09:56:09 UTC, ketmar wrote: i investigated the possibility of having IV as collection of DUB projects (again), and it is still too intrusive. alas. actually, i'd like to feature IV as a set of libraries with dependencies on code.dlang.org, so people can easily use

Re: Release D 2.072.0

2016-10-31 Thread John Colvin via Digitalmars-d-announce
On Monday, 31 October 2016 at 07:24:23 UTC, Sönke Ludwig wrote: Am 31.10.2016 um 02:27 schrieb Martin Nowak: Glad to announce D 2.072.0. http://dlang.org/download.html This is the release ships with the latest version of dub (v1.1.0), comes with lots of phobos additions and native TLS on

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: 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: 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);

Re: D garbage collector and real-time systems

2016-10-26 Thread John Colvin via Digitalmars-d
On Wednesday, 26 October 2016 at 16:15:19 UTC, Tom wrote: My apologies for posting a question and then disappearing for eighteen months. I thought it might be useful if I posted some feedback here. We ended up going with Lua here. The main point in favour was the iterative GC which can be

Re: [Semi OT] - "Garbage In, Garbage Out: Arguing about Undefined Behavior..."

2016-10-16 Thread John Colvin via Digitalmars-d
On Saturday, 15 October 2016 at 00:11:35 UTC, deadalnix wrote: His argument about indices was also weak as it tells more about the need to use size_t rather than 32 bits indices when doing indices computation. Yeah I found that part of the talk interesting but overall unconvincing. Just

Re: Challenge

2016-10-05 Thread John Colvin via Digitalmars-d
On Wednesday, 5 October 2016 at 02:15:13 UTC, Jonathan M Davis wrote: On Wednesday, October 05, 2016 11:20:44 Manu via Digitalmars-d wrote: > While you're at it, might I suggest also adding > std.traits.isProperty? > > Something like: > template isProperty(T, string member) > { > > import

Re: Challenge

2016-10-03 Thread John Colvin via Digitalmars-d
On Monday, 3 October 2016 at 13:19:19 UTC, Manu wrote: Fill in the blank... I'm having a really hard time with this. I've made it work with a mountain of code, and I want to see what others come up with... template isStaticMember(T, string member) { mixin(`alias mem = T.` ~ member ~

Re: Challenge

2016-10-03 Thread John Colvin via Digitalmars-d
On Monday, 3 October 2016 at 13:41:13 UTC, Manu wrote: I'm finding this rather annoying: struct S { static @property int p() { return 10; } } pragma(msg, typeof()); // prints: int function() @property pragma(msg, is(typeof() == function)); // prints: false It looks like a function... but I

Re: ndslice: feature deprecation voting / discussion

2016-10-02 Thread John Colvin via Digitalmars-d
On Sunday, 2 October 2016 at 17:33:49 UTC, Ilya Yaroshenko wrote: On Sunday, 2 October 2016 at 17:11:55 UTC, John Colvin wrote: On Sunday, 2 October 2016 at 15:29:45 UTC, Ilya Yaroshenko wrote: On Sunday, 2 October 2016 at 15:26:00 UTC, John Colvin wrote: On Sunday, 2 October 2016 at 14:02:31

Re: ndslice: feature deprecation voting / discussion

2016-10-02 Thread John Colvin via Digitalmars-d
On Sunday, 2 October 2016 at 15:29:45 UTC, Ilya Yaroshenko wrote: On Sunday, 2 October 2016 at 15:26:00 UTC, John Colvin wrote: On Sunday, 2 October 2016 at 14:02:31 UTC, Ilya Yaroshenko wrote: [...] I'm not that fussed about template bloat, but future API flexibility seems important

Re: ndslice: feature deprecation voting / discussion

2016-10-02 Thread John Colvin via Digitalmars-d
auto a3=iotaSlice([3,4]); auto a6=slice!int(3,4);// proposal:deprecate auto a4=slice!int([3,4]); ... the same for blocks, windows, ... etc. Mir Issue: https://github.com/libmir/mir/issues/337 Current Yes: Timothee Cour, John Colvin Current No : Ilya Yaroshenko, Relja Ljubobratovic If you want

Re: DIP 1002 (TryElseExpression) added to the queue

2016-09-29 Thread John Colvin via Digitalmars-d
On Wednesday, 28 September 2016 at 23:44:19 UTC, Andrei Alexandrescu wrote: On 9/28/16 7:40 PM, Andrei Alexandrescu wrote: // With scope void assertNot(string s) { try { scope(success) assert(0, s); decode(s,DecodeMode.STRICT); } catch (DecodeException e) {} } Sorry, this is not

Re: Overloading relational operators separately; thoughts?

2016-09-28 Thread John Colvin via Digitalmars-d
On Wednesday, 28 September 2016 at 13:58:35 UTC, Timon Gehr wrote: Assume I have two symbolic expressions a and b: Expression a=variable("a"), b=variable("b"); Why should I be allowed to do auto c = a + b; // symbolic value a + b but not auto d = a <= b; // symbolic value a <= b The string

Re: DIP 1002 (TryElseExpression) added to the queue

2016-09-28 Thread John Colvin via Digitalmars-d
On Wednesday, 28 September 2016 at 07:47:32 UTC, Andrei Alexandrescu wrote: * The "Breaking changes" section should include how the following change in semantics would be addressed. Consider: try if (expression) try { ... } catch (Exception) { ... } else { ... }

Re: DIP 1002 (TryElseExpression) added to the queue

2016-09-28 Thread John Colvin via Digitalmars-d
On Wednesday, 28 September 2016 at 10:50:00 UTC, Jack Stouffer wrote: On Wednesday, 28 September 2016 at 10:45:11 UTC, Andrei Alexandrescu wrote: Assertions such as "makes the code cleaner" are likely to add value only if backed up by evidence (case studies, realistic examples). This is

Re: DIP 1002 (TryElseExpression) added to the queue

2016-09-28 Thread John Colvin via Digitalmars-d
On Wednesday, 28 September 2016 at 04:23:56 UTC, Walter Bright wrote: On 9/27/2016 2:30 AM, Dicebot wrote: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1002.md PR: https://github.com/dlang/DIPs/pull/43 Abstract: In Python, the try/catch/finally syntax is augmented with an additional

Re: DIP 1002 (TryElseExpression) added to the queue

2016-09-27 Thread John Colvin via Digitalmars-d
On Tuesday, 27 September 2016 at 09:30:10 UTC, Dicebot wrote: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1002.md PR: https://github.com/dlang/DIPs/pull/43 Abstract: In Python, the try/catch/finally syntax is augmented with an additional clause, termed else. It is a fantastically

Re: Mir GLAS vs Intel MKL: which is faster?

2016-09-24 Thread John Colvin via Digitalmars-d
On Saturday, 24 September 2016 at 12:52:09 UTC, Andrei Alexandrescu wrote: Could you also add a comparison with SciPy? People often say it's just fine for scientific computing. That's just BLAS (so could be mkl, could be openBLAS, could be netlib, etc. just depends on the system and

Re: Numerical age for D: Mir v0.18.0 is faster then OpenBLAS

2016-09-23 Thread John Colvin via Digitalmars-d-announce
On Friday, 23 September 2016 at 13:25:30 UTC, Ilya Yaroshenko wrote: Mir is LLVM-accelerated Generic Numerical Library for Science and Machine Learning. Benchmark: http://blog.mir.dlang.io/glas/benchmark/openblas/2016/09/23/glas-gemm-benchmark.html Mir v0.18.0 release notes:

Re: Emplace vs closures

2016-09-20 Thread John Colvin via Digitalmars-d
On Tuesday, 20 September 2016 at 08:08:16 UTC, cym13 wrote: On Monday, 19 September 2016 at 14:22:16 UTC, Steven Schveighoffer wrote: On 9/19/16 7:27 AM, Lodovico Giaretta wrote: What I'd like to know: is this usage widespread? Should we forbid it for the sake of security? No. There is no

Re: Ah, simple solution to unittests inside templates

2016-09-18 Thread John Colvin via Digitalmars-d
On Sunday, 18 September 2016 at 12:02:47 UTC, Andrei Alexandrescu wrote: On 9/17/16 5:23 PM, Andrej Mitrovic wrote: I think at some point someone suggested we could implement explicit support for such unittests via `static unittest`: That suggests the unittest shall be evaluated during

Re: PBR for Audio Software Interfaces

2016-09-17 Thread John Colvin via Digitalmars-d
On Saturday, 17 September 2016 at 09:26:50 UTC, Guillaume Piolat wrote: In this post, I describe the software renderer available in Dplug: https://www.auburnsounds.com/blog/2016-09-16_PBR-for-Audio-Software-Interfaces.html Isn't that rather a lot of work to be doing? In my experience with

Re: [OT] Brokerage for the D Language Foundation

2016-09-17 Thread John Colvin via Digitalmars-d
On Saturday, 17 September 2016 at 14:22:03 UTC, Andrei Alexandrescu wrote: The Foundation's cash os currently sitting in a checking account at Bank of America. I've googled for things like "brokerage accounts for non-profit" and figured that most or all deep discount brokers (Fidelity,

Re: Draw math formulas with ggplotd

2016-09-17 Thread John Colvin via Digitalmars-d-learn
On Saturday, 17 September 2016 at 12:09:04 UTC, Edwin van Leeuwen wrote: On Saturday, 17 September 2016 at 11:57:17 UTC, John Colvin wrote: On Saturday, 17 September 2016 at 11:45:07 UTC, Edwin van Leeuwen wrote: But I assumed he meant adding the formula onto the plot. Hah, yes, I should

Re: Draw math formulas with ggplotd

2016-09-17 Thread John Colvin via Digitalmars-d-learn
On Saturday, 17 September 2016 at 11:45:07 UTC, Edwin van Leeuwen wrote: On Saturday, 17 September 2016 at 11:22:04 UTC, John Colvin wrote: On Saturday, 17 September 2016 at 02:41:15 UTC, brocolis wrote: How do I draw math formulas programmatically? I want to do on screen what latex does

Re: Draw math formulas with ggplotd

2016-09-17 Thread John Colvin via Digitalmars-d-learn
On Saturday, 17 September 2016 at 02:41:15 UTC, brocolis wrote: How do I draw math formulas programmatically? I want to do on screen what latex does on .pdf. And I want to draw a math formula in the image generated with ggplotd. Generate data from those formulas (I like to do this with

Re: ddoc latex/formulas?

2016-09-16 Thread John Colvin via Digitalmars-d
On Thursday, 15 September 2016 at 13:23:36 UTC, Andrei Alexandrescu wrote: On 09/15/2016 08:40 AM, Adam D. Ruppe wrote: On Wednesday, 14 September 2016 at 15:49:27 UTC, bachmeier wrote: I agree. That's why I quickly gave up on ddoc. My doc generator just pipes special input text through the

Re: iPhone vs Android

2016-09-14 Thread John Colvin via Digitalmars-d
On Tuesday, 13 September 2016 at 22:28:09 UTC, deadalnix wrote: On Tuesday, 13 September 2016 at 22:19:54 UTC, Jonathan M Davis wrote: The big problem with exceptions being allocated by the GC isn't really the GC but @nogc. No the problem IS @nogc . Allocating with the GC is absolutely not a

GC of const/immutable reference graphs

2016-09-13 Thread John Colvin via Digitalmars-d
For the following, lifetimeEnd(x) is the time of freeing of x. Given a reference graph and an const/immutable node n, all nodes reachable via n (let's call them Q(n)) must also be const/immutable, as per the rules of D's type system. In order to avoid dangling pointers: For all q in Q(n),

Re: colour lib needs reviewers

2016-09-13 Thread John Colvin via Digitalmars-d
On Tuesday, 13 September 2016 at 09:31:53 UTC, Manu wrote: On 13 September 2016 at 17:47, John Colvin via Digitalmars-d <digitalmars-d@puremagic.com> wrote: On Tuesday, 13 September 2016 at 01:05:56 UTC, Manu wrote: Also can I swizzle channels directly? I could add something like:

Re: colour lib needs reviewers

2016-09-13 Thread John Colvin via Digitalmars-d
On Tuesday, 13 September 2016 at 01:05:56 UTC, Manu wrote: Also can I swizzle channels directly? I could add something like: auto brg = c.swizzle!"brg"; The result would be strongly typed to the new arrangement. Perfect use-case for opDispatch like in gl3n.

Re: colour lib needs reviewers

2016-09-12 Thread John Colvin via Digitalmars-d
On Monday, 12 September 2016 at 19:59:58 UTC, Edwin van Leeuwen wrote: On Monday, 12 September 2016 at 19:55:57 UTC, Guillaume Piolat wrote: - I've wanted a function like colorFromString many times. It's especially nice with the added #RGBA and #RRGGBBAA syntax that eg. SVG lacks. What

Re: colour lib needs reviewers

2016-09-12 Thread John Colvin via Digitalmars-d
On Monday, 12 September 2016 at 13:04:49 UTC, Manu wrote: 2. Q: is there anything to convert a color to grey scale ? This isn't a short-answer question :) .. There are many ways depending on the job. A simple way might be: L8 grey = cast(L8)RGB8(r, g, b); // L8 is luminance only,

Re: Should debug{} allow GC?

2016-09-11 Thread John Colvin via Digitalmars-d
On Sunday, 11 September 2016 at 07:46:09 UTC, Manu wrote: I'm having a lot of trouble debugging @nogc functions. I have a number of debug functions that use GC, but I can't call them from @nogc code... should debug{} allow @nogc calls, the same as impure calls? Yes please.

Re: Struct default constructor - need some kind of solution for C++ interop

2016-09-08 Thread John Colvin via Digitalmars-d
On Tuesday, 6 September 2016 at 13:44:37 UTC, Ethan Watson wrote: So now I'm in a bind. This is one struct I need to construct uniquely every time. And I also need to keep the usability up to not require calling some other function since this is matching a C++ class's functionality, including

Re: Struct default constructor - need some kind of solution for C++ interop

2016-09-08 Thread John Colvin via Digitalmars-d
On Wednesday, 7 September 2016 at 22:31:17 UTC, Walter Bright wrote: S is initialized to a valid state, meaning the fields are not filled with garbage, and are in a state expected by the member functions. We can write member functions that require a state other than the initial state. I

Re: Struct default constructor - need some kind of solution for C++ interop

2016-09-07 Thread John Colvin via Digitalmars-d
On Wednesday, 7 September 2016 at 21:05:32 UTC, Walter Bright wrote: The reasons D structs don't have a default constructor: 1. So S.init is a valid initializer 2. So all instances of S can be guaranteed to contain a valid instance 3. So default initialization is guaranteed to succeed 4. So

Re: Promotion rules ... why no float?

2016-09-07 Thread John Colvin via Digitalmars-d
On Wednesday, 7 September 2016 at 15:09:42 UTC, Lodovico Giaretta wrote: I think the current state of affairs is fairly good. Adding implicit conversions would make it worst. What would probably make it better (but can't be changed now) is having two distinct operators, one for integer

Re: dlang-vscode

2016-09-05 Thread John Colvin via Digitalmars-d
On Monday, 5 September 2016 at 22:17:59 UTC, Andrei Alexandrescu wrote: Google Alerts just found this: https://marketplace.visualstudio.com/items?itemName=dlang-vscode.dlang Is anyone here familiar with that work? Andrei I've used it a bit. See also:

Re: Quality of errors in DMD

2016-09-04 Thread John Colvin via Digitalmars-d
On Sunday, 4 September 2016 at 10:33:44 UTC, Walter Bright wrote: On 9/4/2016 2:17 AM, John Colvin wrote: On Sunday, 4 September 2016 at 05:13:49 UTC, Walter Bright wrote: On 9/3/2016 7:35 PM, John Colvin wrote: In my experience getting a clue as to what is was the compiler didn't like

Re: Quality of errors in DMD

2016-09-04 Thread John Colvin via Digitalmars-d
On Sunday, 4 September 2016 at 05:13:49 UTC, Walter Bright wrote: On 9/3/2016 7:35 PM, John Colvin wrote: In my experience getting a clue as to what is was the compiler didn't like is very useful. Often the only way I can find a workaround is by locating the assert in the compiler source

Re: Quality of errors in DMD

2016-09-03 Thread John Colvin via Digitalmars-d
On Saturday, 3 September 2016 at 22:48:27 UTC, Walter Bright wrote: On 9/3/2016 6:20 AM, Adam D. Ruppe wrote: On Saturday, 3 September 2016 at 12:12:34 UTC, Walter Bright wrote: Except that asserts are checking for compiler bugs, not diagnostics on user code. Except that in the real world,

Re: ADL

2016-09-03 Thread John Colvin via Digitalmars-d
On Saturday, 3 September 2016 at 09:31:59 UTC, Manu wrote: std.algorithm is extremely simple, it doesn't do anything except raw algorithm-ey stuff. It doesn't attempt to invoke functionality on the data it's working on. Right now I'm working on image processing. There are lots of image data

Re: Quality of errors in DMD

2016-09-02 Thread John Colvin via Digitalmars-d
On Friday, 2 September 2016 at 14:26:37 UTC, Ethan Watson wrote: Can we have a serious discussion in here about the quality of DMD errors? I've been alternately a dog chasing its own tail, and a dog barking at a fire hydrant, chasing down errors deep in templated and mixin code over the last

Re: Statistics functions

2016-09-02 Thread John Colvin via Digitalmars-d
On Friday, 2 September 2016 at 14:40:36 UTC, jmh530 wrote: On Friday, 2 September 2016 at 14:37:55 UTC, jmh530 wrote: On Thursday, 1 September 2016 at 23:44:15 UTC, John Colvin wrote: Now with actually working API docs: https://dlangscience.github.io/dstats/api/ That makes me happy

Re: Statistics functions

2016-09-01 Thread John Colvin via Digitalmars-d
On Thursday, 1 September 2016 at 16:28:35 UTC, jmh530 wrote: On Thursday, 1 September 2016 at 15:58:38 UTC, Russel Winder wrote: Is there no module in D for statistics functions such as mean, median, mode, standard deviation, linear least squares, etc. There are codes on Rosetta Code but a)

The unittests are failing (individually)

2016-08-25 Thread John Colvin via Digitalmars-d
Try this: git clone https://github.com/dlang/dmd cd dmd make -f posix.mak -j cd .. git clone https://github.com/dlang/druntime cd druntime make -f posix.mak -j cd .. git clone https://github.com/dlang/phobos cd phobos for fn in `find std -name \*.d`; do make -f posix.mak "${fn%.d}.test" ;

Re: Usability of D on windows?

2016-08-23 Thread John Colvin via Digitalmars-d
On Tuesday, 23 August 2016 at 21:15:40 UTC, John Burton wrote: Except that half the time the compiler crashes with a stack trace, and sometimes it just hangs. Occasionally if I move and rearrange the code it will manage to compile it. There are also worrying comments on the LDC web page about

Re: dub test

2016-08-23 Thread John Colvin via Digitalmars-d
On Tuesday, 23 August 2016 at 20:26:12 UTC, Andrei Alexandrescu wrote: As Walter would say, if it's not in bugzilla it will never be fixed ;) https://issues.dlang.org/show_bug.cgi?id=16422 -- Andrei https://github.com/dlang/dub/issues is full of existing issues, not sure whether it's best

Re: On the future of DIP1000

2016-08-21 Thread John Colvin via Digitalmars-d-announce
On Sunday, 21 August 2016 at 21:46:56 UTC, John Colvin wrote: On Sunday, 21 August 2016 at 20:01:27 UTC, Dicebot wrote: - scope is @safe only Why? I might have @system code that could still benefit from scope. I guess it would be too restrictive, but I'm just a bit frustrated at having

Re: On the future of DIP1000

2016-08-21 Thread John Colvin via Digitalmars-d-announce
On Sunday, 21 August 2016 at 20:01:27 UTC, Dicebot wrote: - scope is @safe only Why? I might have @system code that could still benefit from scope.

Re: DIP1000: Scoped Pointers

2016-08-17 Thread John Colvin via Digitalmars-d-announce
On Wednesday, 17 August 2016 at 07:53:49 UTC, Mike wrote: Got it! Thank you! But it still appears that what's illustrated on the deprecations page is not being deprecated. Mike I imagine that will change if/when DIP1000 is accepted.

Re: DIP1000: Scoped Pointers (Discussion)

2016-08-12 Thread John Colvin via Digitalmars-d
On Thursday, 11 August 2016 at 08:53:22 UTC, John Colvin wrote: On Thursday, 11 August 2016 at 08:45:38 UTC, Walter Bright wrote: On 8/11/2016 1:29 AM, John Colvin wrote: Can someone talk me through the lifetime algebra for the following? void foo() { int a; int** c; void bar

Re: How to spawn a thread within method

2016-08-11 Thread John Colvin via Digitalmars-d
On Thursday, 11 August 2016 at 12:09:37 UTC, eugene wrote: Hello, everyone, i'm testing my luck with this code, but it does not work. How to make it work? module test; import std.stdio, std.concurrency, std.variant; class Test { public: void run() { auto tid

Re: DIP1000: Scoped Pointers (Discussion)

2016-08-11 Thread John Colvin via Digitalmars-d
On Thursday, 11 August 2016 at 08:45:38 UTC, Walter Bright wrote: On 8/11/2016 1:29 AM, John Colvin wrote: Can someone talk me through the lifetime algebra for the following? void foo() { int a; int** c; void bar() { int* b = <= ok, b has a smaller lifetime t

Re: DIP1000: Scoped Pointers (Discussion)

2016-08-11 Thread John Colvin via Digitalmars-d
On Wednesday, 10 August 2016 at 20:36:38 UTC, Dicebot wrote: Proposal text: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md Can someone talk me through the lifetime algebra for the following? void foo() { int a; int** c; void bar() { int* b = c =

Re: Why don't we switch to C like floating pointed arithmetic instead of automatic expansion to reals?

2016-08-05 Thread John Colvin via Digitalmars-d
On Friday, 5 August 2016 at 08:43:48 UTC, deadalnix wrote: On Friday, 5 August 2016 at 08:17:00 UTC, Ilya Yaroshenko wrote: 1. Could you please provide an assembler example with clang or recent gcc? I have better: compile your favorite project with -Wdouble-promotion and enjoy the rain of

Re: The D Language Foundation has filed for non-profit status

2016-07-21 Thread John Colvin via Digitalmars-d-announce
On Thursday, 21 July 2016 at 02:16:55 UTC, Andrei Alexandrescu wrote: By the Foundation bylaws we defined, the officers of the Foundation (Walter, Ali, and myself) are not allowed to receive payment for their work on the Foundation. You can still claim expenses though, no?

Re: [OT] Windows install

2016-07-16 Thread John Colvin via Digitalmars-d
On Saturday, 16 July 2016 at 05:26:56 UTC, Walter Bright wrote: On 7/15/2016 9:30 PM, Joakim wrote: As for printing, you're still printing? I think I've printed maybe three or four times in the last decade, but then I almost never read anything on paper during that time either. Sometimes I

Re: Vision for the D language - stabilizing complexity?

2016-07-13 Thread John Colvin via Digitalmars-d
On Wednesday, 13 July 2016 at 11:48:15 UTC, John Colvin wrote: On Wednesday, 13 July 2016 at 11:28:11 UTC, Andrei Alexandrescu wrote: On 7/13/16 5:19 AM, John Colvin wrote: "Casting away immutable is undefined behaviour": the following code has undefined results (note, not impl

Re: Vision for the D language - stabilizing complexity?

2016-07-13 Thread John Colvin via Digitalmars-d
On Wednesday, 13 July 2016 at 11:28:11 UTC, Andrei Alexandrescu wrote: On 7/13/16 5:19 AM, John Colvin wrote: "Casting away immutable is undefined behaviour": the following code has undefined results (note, not implementation defined, not if-you-know-what-you're-doing defined,

Re: Vision for the D language - stabilizing complexity?

2016-07-13 Thread John Colvin via Digitalmars-d
On Wednesday, 13 July 2016 at 00:03:04 UTC, Walter Bright wrote: On 7/12/2016 6:13 AM, John Colvin wrote: On Tuesday, 12 July 2016 at 10:19:04 UTC, Walter Bright wrote: On 7/12/2016 2:40 AM, John Colvin wrote: For the previous statement to be false, you must define cases where casting away

Re: Vision for the D language - stabilizing complexity?

2016-07-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 July 2016 at 10:19:04 UTC, Walter Bright wrote: On 7/12/2016 2:40 AM, John Colvin wrote: For the previous statement to be false, you must define cases where casting away immutability *is* defined. @system programming is, by definition, operating outside of the language

Re: Vision for the D language - stabilizing complexity?

2016-07-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 July 2016 at 05:37:54 UTC, Walter Bright wrote: On 7/11/2016 10:15 PM, Shachar Shemesh wrote: D says any such cast is UB. That's why such casts are not allowed in @safe code. There's also no way to write a storage allocator in @safe code. Code that is not checkably safe is

Re: Bug in D type inferencing

2016-07-02 Thread John Colvin via Digitalmars-d
On Saturday, 2 July 2016 at 01:20:35 UTC, Hiemlick Hiemlicker wrote: public struct Foo { public void Create(T)(uint delegate(T) c, T param) { } } Foo f; f.Create((x) { }, "asdf"); cannot deduce arguments compiler error. Surely D can figure out that T is a

Re: string encryption

2016-07-02 Thread John Colvin via Digitalmars-d
On Friday, 1 July 2016 at 23:11:34 UTC, Hiemlick Hiemlicker wrote: On Friday, 1 July 2016 at 22:55:21 UTC, qznc wrote: On Friday, 1 July 2016 at 22:23:23 UTC, Hiemlick Hiemlicker wrote: It seems D won't replace encrypt("This string will still end up in the binary"); with

Re: GC pathological case behaviour

2016-06-28 Thread John Colvin via Digitalmars-d
On Tuesday, 28 June 2016 at 20:12:29 UTC, luminousone wrote: Is puts high enough latency that, that main thread can fill the message queue faster then start can exhaust it? If you put a call to sleep for 1ms in the main loop does it have the same result? It appears that adding a 1ms sleep

GC pathological case behaviour

2016-06-28 Thread John Colvin via Digitalmars-d
On my machine (OS X), this program eats up memory with no end in sight import std.concurrency; import core.stdc.stdio; void start() { while(true) { receive( (int msg) { char[2] s = '\0'; s[0] = cast(char)msg;

Re: Saturating integer arithmetic

2016-06-26 Thread John Colvin via Digitalmars-d
On Sunday, 26 June 2016 at 22:34:29 UTC, Andrei Alexandrescu wrote: On 06/26/2016 02:07 PM, ketmar wrote: On Sunday, 26 June 2016 at 13:59:03 UTC, Andrei Alexandrescu wrote: See the recent thread "DbI checked integral". Saturation is a direct goal, and you should be able to optimize operations

Re: Please rid me of this goto

2016-06-23 Thread John Colvin via Digitalmars-d
On Thursday, 23 June 2016 at 23:34:54 UTC, David Nadlinger wrote: On Thursday, 23 June 2016 at 22:08:20 UTC, Seb wrote: [1] https://github.com/wilzbach/perf-d/blob/master/test_pow.d [2] https://github.com/wilzbach/perf-d/blob/master/test_powi.d This is a bad way to benchmark. You are

Re: Phobos Action Items

2016-06-19 Thread John Colvin via Digitalmars-d
On Sunday, 19 June 2016 at 01:01:30 UTC, Nicholas Wilson wrote: On Saturday, 18 June 2016 at 20:04:50 UTC, Walter Bright wrote: 9. create a module that enables code to be run on GPUs (John Colvin is doing work on this, ask him how to help!) Now that I'm on my (southern hemisphere) winter

Re: pure D JPEG decoder, with progressive JPEG support, public domain

2016-06-17 Thread John Colvin via Digitalmars-d-announce
On Friday, 17 June 2016 at 13:05:47 UTC, ketmar wrote: finally, the thing you all waited for years is here! pure D no-frills JPEG decoder with progressive JPEG support! Public Domain! one file! no Phobos or other external dependecies! it even has some DDoc! grab it[1] now while it's hot! [1]

Re: Is GC smart enough not to reallocate?

2016-06-16 Thread John Colvin via Digitalmars-d
On Thursday, 16 June 2016 at 13:54:11 UTC, MMJones wrote: Suppose one has something like class foo { int[] x; void bar() { x = []; } } Does the GC trash the "cache" when calling bar or does it realize that it can use the same memory for x and essentially just shortens the

Re: Button: A fast, correct, and elegantly simple build system.

2016-06-16 Thread John Colvin via Digitalmars-d-announce
On Thursday, 16 June 2016 at 12:32:02 UTC, Kagamin wrote: On Sunday, 12 June 2016 at 20:47:31 UTC, cym13 wrote: Yeah, I have often thought that writing a self-contained D program to build D would work well. The full power of the language would be available, there'd be nothing new to learn,

Re: Button: A fast, correct, and elegantly simple build system.

2016-06-16 Thread John Colvin via Digitalmars-d-announce
On Thursday, 16 June 2016 at 12:53:35 UTC, John Colvin wrote: On Thursday, 16 June 2016 at 12:32:02 UTC, Kagamin wrote: On Sunday, 12 June 2016 at 20:47:31 UTC, cym13 wrote: Yeah, I have often thought that writing a self-contained D program to build D would work well. The full power

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread John Colvin via Digitalmars-d
On Thursday, 16 June 2016 at 03:56:02 UTC, tsbockman wrote: That is part of the problem, but this is also a fine example of a broader pattern that I have noticed in D's review process: Pull requests are routinely reviewed in an upside-down fashion: 1) Formatting 2) Typos 3) Names 4) Tests

Re: Button: A fast, correct, and elegantly simple build system.

2016-06-15 Thread John Colvin via Digitalmars-d-announce
On Wednesday, 15 June 2016 at 11:47:00 UTC, Walter Bright wrote: On 6/15/2016 4:07 AM, Edwin van Leeuwen wrote: How about using reggae? https://github.com/atilaneves/phobos/blob/reggae/reggaefile.d I haven't studied either. If you do study that reggae file, remember that it's a deliberate

Re: Transient ranges

2016-06-13 Thread John Colvin via Digitalmars-d
On Monday, 13 June 2016 at 13:59:06 UTC, Steven Schveighoffer wrote: No, it's not. My advice is to understand the limitations and expectations of the range wrappers you are using (i.e. read the docs [1]). If you need caching for your purposes, then do that by plopping cache at the end of your

Nested comments

2016-06-08 Thread John Colvin via Digitalmars-d-announce
On Wednesday, 8 June 2016 at 15:04:28 UTC, Kagamin wrote: BTW do people find nested comments particularly useful? Yes for: A) commenting out a block of code without having to care about syntactic correctness (otherwise version(none)) or whether it contains comments (otherwise /* */) B)

Re: Code runtime

2016-06-05 Thread John Colvin via Digitalmars-d
On Sunday, 5 June 2016 at 21:52:20 UTC, Ausprobierer wrote: I've written this simple piece of code: [CODE] import std.algorithm; import std.array; import std.conv; import std.datetime; import std.parallelism; import std.range; import std.stdio; import core.atomic; import core.thread; void

Re: The Case Against Autodecode

2016-06-02 Thread John Colvin via Digitalmars-d
On Thursday, 2 June 2016 at 20:27:27 UTC, Walter Bright wrote: On 6/2/2016 12:34 PM, deadalnix wrote: On Thursday, 2 June 2016 at 19:05:44 UTC, Andrei Alexandrescu wrote: Pretty much everything. Consider s and s1 string variables with possibly different encodings (UTF8/UTF16). * s.all!(c =>

Re: Reddit announcements

2016-05-31 Thread John Colvin via Digitalmars-d-announce
On Tuesday, 31 May 2016 at 18:57:29 UTC, o-genki-desu-ka wrote: Many nice announcements here last week. I put some on reddit. https://www.reddit.com/r/programming/comments/4lwufi/d_embedded_database_v01_released/

Re: amoeba, a chess engine written in D

2016-05-22 Thread John Colvin via Digitalmars-d-announce
On Friday, 20 May 2016 at 23:16:01 UTC, Richard Delorme wrote: I am pleased to announce the release of a chess engine written in D: https://github.com/abulmo/amoeba I am not aware of any other chess engine written with the D language. The source can be compiled with dmd, ldc or gdc, but the

Re: Beta D 2.071.1-b1

2016-05-18 Thread John Colvin via Digitalmars-d-announce
On Sunday, 15 May 2016 at 04:40:21 UTC, Martin Nowak wrote: First beta for the 2.071.1 point release. A few issues remain to be fixed before the next beta. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.071.1.html Please report any bugs at https://issues.dlang.org

Re: Compile Tango for DMD2 - Any instructions how to do it?

2016-05-18 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 18 May 2016 at 12:24:06 UTC, TheDGuy wrote: On Wednesday, 18 May 2016 at 03:15:25 UTC, Mike Parker wrote: That should get your library. Thanks for your answer. I tried that on my windows console and i got the error that the command 'dub' can't be found.

Re: Always false float comparisons

2016-05-14 Thread John Colvin via Digitalmars-d
On Saturday, 14 May 2016 at 01:26:18 UTC, Walter Bright wrote: Sometimes reproducibility/predictability is more important than maybe making fewer rounding errors sometimes. This includes reproducibility between CTFE and runtime. A more accurate answer should never cause your algorithm to

Re: opDispatch and UFCS

2016-05-11 Thread John Colvin via Digitalmars-d-learn
On Thursday, 12 May 2016 at 00:04:43 UTC, Adam D. Ruppe wrote: On Wednesday, 11 May 2016 at 23:46:48 UTC, John Colvin wrote: Bug? Or am I misunderstanding how these two features are supposed to interact? I'm not sure what you actually expected there, but I'd note that in general, opDispatch

opDispatch and UFCS

2016-05-11 Thread John Colvin via Digitalmars-d-learn
struct S { int a; template opDispatch(string s) { template opDispatch(T...) { auto ref opDispatch(Args ...)(auto ref Args args) { return S(mixin(`a.` ~ s ~ (T.length ? `!T` : ``) ~ `(args)`)); } } } }

Re: Version block "conditions" with logical operators

2016-05-11 Thread John Colvin via Digitalmars-d
On Wednesday, 11 May 2016 at 20:37:35 UTC, Walter Bright wrote: Actually, dmd is a nice example of how unnecessary it is. The dmd C++ source code used to be full of it. I'm convinced that you're argument is reasonable if version is only for things like platforms, but it's used for a lot of

Re: Dconf videos offline download?

2016-05-10 Thread John Colvin via Digitalmars-d
On Tuesday, 10 May 2016 at 20:50:04 UTC, Karabuta wrote: How can I get them? http://offliberty.com/#

Re: dmd not building with dmd

2016-05-10 Thread John Colvin via Digitalmars-d
On Tuesday, 10 May 2016 at 04:49:33 UTC, Lionello Lunesu wrote: Well, it's either wrong phobos or wrong dmd. I assumed phobos was mismatched, but perhaps DMD was mismatched? Installing with brew suggest it's installing 2.071.0, but DMD appears to be 2.070: $ brew install dmd ==> Downloading

Re: Chaining opIndex

2016-05-09 Thread John Colvin via Digitalmars-d-learn
On Monday, 9 May 2016 at 20:14:25 UTC, deed wrote: struct Foo { Bars bars; ... } struct Foos { Foo[] arr; Foo opIndex (size_t idx) { return arr[idx]; } ... } struct Bar { // No Car[] cars; ... } struct Bars { Bar[] arr; Bar opIndex (size_t idx) { return

Re: Always false float comparisons

2016-05-09 Thread John Colvin via Digitalmars-d
On Monday, 9 May 2016 at 20:20:00 UTC, Walter Bright wrote: On 5/9/2016 12:39 PM, tsbockman wrote: Educating programmers who've never studied how to write correct FP code is too complex of a task to implement via compiler warnings. The warnings should be limited to cases that are either

Re: Always false float comparisons

2016-05-09 Thread John Colvin via Digitalmars-d
On Monday, 9 May 2016 at 11:26:55 UTC, Walter Bright wrote: On 5/9/2016 3:16 AM, Jens Mueller via Digitalmars-d wrote: Warning for those comparisons should be fine. Shouldn't mix them anyway. Too onerous. Surely not too onerous if we're only talking about == ? Mixing floating point types

Re: dmd not building with dmd

2016-05-09 Thread John Colvin via Digitalmars-d
On Monday, 9 May 2016 at 07:57:33 UTC, Lionello Lunesu wrote: On 8/5/2016 14:43, Steven Schveighoffer wrote: [...] I ran into this as well. It's a bug in the package from brew: it shipped with the wrong phobos. You can build your own DMD: $ make -f posix.mak AUTO_BOOTSTRAP=1 In what way

Re: How are you enjoying DConf? And where to go next?

2016-05-06 Thread John Colvin via Digitalmars-d
On Friday, 6 May 2016 at 14:57:59 UTC, Chris wrote: On Friday, 6 May 2016 at 14:53:15 UTC, Jonathan M Davis wrote: [...] Facebook have their European headquarters in Dublin. Maybe they'd be willing to sponsor DConf2017 (there are loads of other tech companies in Dublin). Flights from the

Re: Proposed: start DConf days one hour later

2016-04-27 Thread John Colvin via Digitalmars-d-announce
On Wednesday, 27 April 2016 at 18:36:54 UTC, Andrei Alexandrescu wrote: The folks at Sociomantic suggested to start at 10:00 AM instead of 9:00 AM, therefore shifting the end time by one as well. Please reply with thoughts on this! We're particularly concerned about folks who need to take off

Re: XDG-APP and D

2016-04-22 Thread John Colvin via Digitalmars-d-announce
On Thursday, 21 April 2016 at 18:55:23 UTC, Gerald wrote: For those not familiar, xdg-app is a Linux virtualization system targeted at desktop apps, it's been under pretty heavy development and is available for use in Gnome 3.20. Mathias Clausen recently wrote a blog entry about creating his

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