Good advice from the Go team

2014-10-28 Thread deadalnix via Digitalmars-d
https://code.google.com/p/go/source/diff?spec=svn11b6d55be06401b56985cb5c97d4f9829c980706&r=11b6d55be06401b56985cb5c97d4f9829c980706&format=side&path=/doc/go_mem.html That sounds about right.

Re: C++ developer choices in open source projects

2014-10-28 Thread ketmar via Digitalmars-d
On Tue, 28 Oct 2014 21:37:45 -0700 Walter Bright via Digitalmars-d wrote: > 3. Inheritance and polymorphism are widely used > > It's my impression that D uses a lot more parametric polymorphism (i.e. > templates) than virtual inheritance. this is true at least for my case. i tend to write templ

C++ developer choices in open source projects

2014-10-28 Thread Walter Bright via Digitalmars-d
http://www.codergears.com/Blog/?p=421 This is interesting as it relates to D's choices: 1. No common build system ,Visual Studio, make and CMake are the most widely used D - no change. 2. Namesapces not widely used D - forces use of namespaces, i.e. modules 3. Inheritance and polymorphism

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread Walter Bright via Digitalmars-d
On 10/28/2014 7:00 PM, Andrei Alexandrescu wrote: Totally. Bitchin' fer shur

Re: function pointer bug?

2014-10-28 Thread deadalnix via Digitalmars-d
On Wednesday, 29 October 2014 at 01:22:43 UTC, Andrei Alexandrescu wrote: That won't work in D because in D pointers to methods carry "this" with them, whereas in C++ they don't. -- Andrei I have an idea ! We should call them delegates so people won't make the confusion !

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Kevin Lamonte via Digitalmars-d
On Tuesday, 28 October 2014 at 11:11:09 UTC, Martin Nowak wrote: I think part of the misunderstanding is that I'm thinking of an app as user code plus a number of libraries all on top of phobos. Say I have an app using vibe.d and I want to enable logging in my app, but disable it in phobos. Was

Re: DIP67: Associative Ranges

2014-10-28 Thread Brad Anderson via Digitalmars-d
On Tuesday, 28 October 2014 at 22:44:32 UTC, Freddy wrote: http://wiki.dlang.org/DIP67 Abstraction over the build-in associative array(one type of range for containers and another type for dynamic generators). Plese criticize. It's kind of a weird proposal to be honest. Ranges primitives are

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Andrei Alexandrescu via Digitalmars-d
On 10/28/14 2:46 AM, Robert burner Schadek wrote: On Tuesday, 28 October 2014 at 05:44:48 UTC, Andrei Alexandrescu wrote: Being able to select maximum logging level statically at client application level is a deal maker/breaker for me. The mechanics aren't important but it's likely they will aff

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread Andrei Alexandrescu via Digitalmars-d
On 10/28/14 9:02 AM, Steven Schveighoffer wrote: I don't think recipient.send(mail) is that unintuitive. It's how I would visualize it from a contact application for instance. Totally. It's actually how OOP started - calling a method was sending a message to an object etc. -- Andrei

Re: Stackless resumable functions

2014-10-28 Thread Andrei Alexandrescu via Digitalmars-d
On 10/28/14 8:25 AM, Kagamin wrote: I think, it's for seamless debugging. The debugger support for async/await is indeed non-trivial, because code is mutated by the compiler a lot, but I don't think it has anything to do with concurrency. Official MS position is async/await has no concurrency pro

Re: Algorithms, term rewriting and compile time reflection

2014-10-28 Thread Andrei Alexandrescu via Digitalmars-d
On 10/28/14 2:26 AM, bearophile wrote: Andrei Alexandrescu: I recall there was an earlier implementation of a statically-checked sort, maybe in Agda? It wouldn't typecheck if the output array weren't sorted. Yes, there is a similar code even in ATS language (that is much simpler than Agda, yo

Re: Algorithms, term rewriting and compile time reflection

2014-10-28 Thread Andrei Alexandrescu via Digitalmars-d
On 10/27/14 6:53 PM, deadalnix wrote: On Tuesday, 28 October 2014 at 01:10:18 UTC, Andrei Alexandrescu wrote: On 10/23/14 2:41 AM, thedeemon wrote: To scare you well, here, for example, is my Smoothsort implementation in ATS http://stuff.thedeemon.com/lj/smooth_dats.html that includes proofs th

Re: function pointer bug?

2014-10-28 Thread ketmar via Digitalmars-d
On Wed, 29 Oct 2014 00:13:52 + bitwise via Digitalmars-d wrote: > > no one published it yet, not "no one attempted". i desperately > publish or perish! =) oh, i want it to be at least pre-beta before showing it to the world. ;-) what i'm really aiming at is a system like BlackBox Component Bu

Re: function pointer bug?

2014-10-28 Thread Andrei Alexandrescu via Digitalmars-d
On 10/27/14 4:52 PM, bitwise wrote: quotes self Here is a better example, showing that virtual function pointers are available at compile time in C++. Essentially, I would expect my D code to function similarly, but it won't compile. class TestAddr { public: virtual void test() { cout <<

Re: function pointer bug?

2014-10-28 Thread bitwise via Digitalmars-d
That being said, you only need to worry about any of this if you want to support virtual methods and have it invoke the actual overridden method, not the one you have saved through reflection. (For example, if Bar : Foo overrides foo, and you generated reflection info for Foo, it would call Foo

Re: function pointer bug?

2014-10-28 Thread bitwise via Digitalmars-d
On Tuesday, 28 October 2014 at 02:34:14 UTC, ketmar via Digitalmars-d wrote: On Tue, 28 Oct 2014 01:36:01 + bitwise via Digitalmars-d wrote: I have actually found a work around as well, which was to wrap the actual retrieval of the function address in a lambda, and pass the lambda by temp

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: toString refactor in druntime

2014-10-28 Thread Manu via Digitalmars-d
On 28 October 2014 22:51, Steven Schveighoffer via Digitalmars-d wrote: > On 10/27/14 8:01 PM, Manu via Digitalmars-d wrote: >> >> 28 October 2014 04:40, Benjamin Thaut via Digitalmars-d >> wrote: >>> >>> Am 27.10.2014 11:07, schrieb Daniel Murphy: >>> "Benjamin Thaut" wrote in message ne

Re: DIP66 - Multiple alias this

2014-10-28 Thread IgorStepanov via Digitalmars-d
On Tuesday, 28 October 2014 at 21:55:35 UTC, Meta wrote: 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

Re: DIP66 - Multiple alias this

2014-10-28 Thread via Digitalmars-d
You should rethink implementing multiple alias this. D is increasingly becoming a poorly typed language. "alias this" is basically static prototype-based programming. http://en.wikipedia.org/wiki/Prototype-based_programming Self had multiple inheritance based on prototypes and removed it beca

DIP67: Associative Ranges

2014-10-28 Thread Freddy via Digitalmars-d
http://wiki.dlang.org/DIP67 Abstraction over the build-in associative array(one type of range for containers and another type for dynamic generators). Plese criticize.

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Martin Nowak via Digitalmars-d
On 10/28/2014 07:22 PM, Martin Nowak wrote: On Tuesday, 28 October 2014 at 12:02:16 UTC, Robert burner Schadek wrote: It is a design goal to disable certain LogLevel at CT of a compile unit (CU). e.g. make all logs to trace function template do nothing One idea to make this working is to use p

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: toString refactor in druntime

2014-10-28 Thread ketmar via Digitalmars-d
On Tue, 28 Oct 2014 08:37:43 -0400 Steven Schveighoffer via Digitalmars-d wrote: > Meta has a cost with the current compiler. It would be nice if it > didn't, but I have practical concerns. i don't think that there will be alot calls to 'write[f]' anyway. i know that CTFE is not costless (i once

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread Steven Schveighoffer via Digitalmars-d
On 10/28/14 3:28 PM, "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= " wrote: On Tuesday, 28 October 2014 at 17:44:36 UTC, Steven Schveighoffer wrote: But parent is not the actual object, it's a *mailbox* of that object, or a reference. In essence, you are saying "use this recipient record to send a messa

Re: DIP66 - Multiple alias this

2014-10-28 Thread IgorStepanov via Digitalmars-d
On Tuesday, 28 October 2014 at 19:45:09 UTC, Andrei Alexandrescu wrote: On 10/10/14 10:09 AM, IgorStepanov wrote: I've created DIP for my pull request. DIP: http://wiki.dlang.org/DIP66 PR: https://github.com/D-Programming-Language/dmd/pull/3998 Please, comment it. Here's my destruction: * "s

Re: DIP66 - Multiple alias this

2014-10-28 Thread Andrei Alexandrescu via Digitalmars-d
On 10/10/14 10:09 AM, IgorStepanov wrote: I've created DIP for my pull request. DIP: http://wiki.dlang.org/DIP66 PR: https://github.com/D-Programming-Language/dmd/pull/3998 Please, comment it. Here's my destruction: * "symbol can be a field or a get-property (method annotated with @property

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread via Digitalmars-d
On Tuesday, 28 October 2014 at 17:44:36 UTC, Steven Schveighoffer wrote: But parent is not the actual object, it's a *mailbox* of that object, or a reference. In essence, you are saying "use this recipient record to send a message to it's target" I think in general you should strive to achieve

Re: Deimos library interfaces needed for these

2014-10-28 Thread Jesse Phillips via Digitalmars-d
On Monday, 27 October 2014 at 03:08:17 UTC, Matt Soucy wrote: On 10/26/2014 12:21 PM, Sean Kelly wrote: On Saturday, 25 October 2014 at 20:49:26 UTC, Walter Bright wrote: https://github.com/D-Programming-Deimos http://en.docsity.com/news/programming-2/free-libraries-for-everyday-work-in-popula

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread via Digitalmars-d
On Tuesday, 28 October 2014 at 17:57:26 UTC, Russel Winder via Digitalmars-d wrote: Python's take on this works quite well: x.sort() is a mutating sort delivering nothing, whilst: sorted(x) Yes, I also find the grammatical distinction interesting. One possible mapping: - i

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread Ali Çehreli via Digitalmars-d
On 10/28/2014 06:41 AM, "Ola Fosheim Grøstad" " wrote: On Tuesday, 28 October 2014 at 08:15:58 UTC, Russel Winder via Digitalmars-d wrote: parent.send(result) or: send(parent, result) as being idiomatic D code? I cannot speak for idioms, but this is a good example of how UFCS fails

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Martin Nowak via Digitalmars-d
On Tuesday, 28 October 2014 at 12:02:16 UTC, Robert burner Schadek wrote: It is a design goal to disable certain LogLevel at CT of a compile unit (CU). e.g. make all logs to trace function template do nothing One idea to make this working is to use prefixed version identifiers. Obviously this

Re: DIP66 - Multiple alias this

2014-10-28 Thread IgorStepanov via Digitalmars-d
On Tuesday, 28 October 2014 at 02:07:23 UTC, Andrei Alexandrescu wrote: On 10/24/14 6:05 AM, 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 co

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread Russel Winder via Digitalmars-d
On Tue, 2014-10-28 at 13:44 -0400, Steven Schveighoffer via Digitalmars-d wrote: […] > If you are saying we should expect sort(arr) to return a *copy* of the > array that is sorted, I don't think that's a fair assessment of D user > expectations. D is not a functional language. Even D pure functi

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread Steven Schveighoffer via Digitalmars-d
On 10/28/14 1:09 PM, "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= " wrote: On Tuesday, 28 October 2014 at 16:02:03 UTC, Steven Schveighoffer wrote: I don't think recipient.send(mail) is that unintuitive. It's how I would visualize it from a contact application for instance. sender.send(mail) ? Consi

Re: Fiber is better than go's goroutine?

2014-10-28 Thread Martin Nowak via Digitalmars-d
On Tuesday, 28 October 2014 at 17:05:13 UTC, Andrei Alexandrescu wrote: I'm not sure but as far as I understand this one issue forces Go code to have a strong networking effect (must call into Go code designed especially for cooperative threading). That forces a lot of rewriting of existing cod

Re: D's New GC and Object Allocation Pools

2014-10-28 Thread Andrei Alexandrescu via Digitalmars-d
On 10/25/14 8:37 PM, Maxime Chevalier-Boisvert wrote: Hello, I was wondering if there have been updates regarding Andrei's announcement that he would rewrite the D garbage collector. Is there any kind of timeline for when a new version of the GC can be expected? There is no timeline as of now.

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread via Digitalmars-d
On Tuesday, 28 October 2014 at 16:02:03 UTC, Steven Schveighoffer wrote: I don't think recipient.send(mail) is that unintuitive. It's how I would visualize it from a contact application for instance. sender.send(mail) ? Consistency about direction is important when you choose names and synta

Re: Fiber is better than go's goroutine?

2014-10-28 Thread Andrei Alexandrescu via Digitalmars-d
On 10/27/14 9:32 AM, Sean Kelly wrote: The real tricky part, which is something that even Go doesn't address as far as I know, is what to do about third-party APIs that block. The easiest way around this is to launch threads that deal with these APIs in actual kernel threads instead of fibers, o

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Dicebot via Digitalmars-d
On Tuesday, 28 October 2014 at 16:05:19 UTC, Andrei Alexandrescu wrote: Agreed. Just to restate my position: so long as we don't have a way to statically control maximum logging level in the client, we don't have a logging library. There is no negotiation. -- Andrei We have way to statically

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Andrei Alexandrescu via Digitalmars-d
On 10/27/14 5:03 AM, Dicebot wrote: On Monday, 27 October 2014 at 08:23:48 UTC, Robert burner Schadek wrote: On Monday, 27 October 2014 at 07:03:11 UTC, Dicebot wrote: I don't consider it a major issue as I don't think std.logger should be used inside Phobos at all. Yes, using std.logger ins

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread Steven Schveighoffer via Digitalmars-d
On 10/28/14 10:56 AM, "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= " wrote: On Tuesday, 28 October 2014 at 14:04:35 UTC, Steven Schveighoffer wrote: I think it means, send result to parent. Isn't this what you said? I had to run out the door and hit enter too early… :P On the larger question, I thi

Re: Stackless resumable functions

2014-10-28 Thread Kagamin via Digitalmars-d
I think, it's for seamless debugging. The debugger support for async/await is indeed non-trivial, because code is mutated by the compiler a lot, but I don't think it has anything to do with concurrency. Official MS position is async/await has no concurrency problems.

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread via Digitalmars-d
On Tuesday, 28 October 2014 at 14:04:35 UTC, Steven Schveighoffer wrote: I think it means, send result to parent. Isn't this what you said? I had to run out the door and hit enter too early… :P On the larger question, I think whatever seems most natural should be used. UFCS can make things re

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread via Digitalmars-d
On Tuesday, 28 October 2014 at 13:59:10 UTC, bearophile wrote: Ola Fosheim Grøstad: "X.action(Y)" will in most OO languages mean do "action" to object "X", but "parent.send(results)" means the opposite?! Poorly formulated… :P Why the opposite? You are instructing the object to send the in

Re: Fiber is better than go's goroutine?

2014-10-28 Thread Sean Kelly via Digitalmars-d
On Tuesday, 28 October 2014 at 07:59:32 UTC, Martin Nowak wrote: On Monday, 27 October 2014 at 16:32:25 UTC, Sean Kelly wrote: That's the reason why the await adapter is so powerful. It's should be possible to await a promise (future) to let the scheduler know that it should resume the Fiber onl

Re: Fiber is better than go's goroutine?

2014-10-28 Thread Sean Kelly via Digitalmars-d
On Tuesday, 28 October 2014 at 08:02:23 UTC, Martin Nowak wrote: On Monday, 27 October 2014 at 21:43:47 UTC, Sean Kelly wrote: Yep. Every logical thread is a Fiber executed in a round-robin manner by a pool of kernel threads. Pooled threads are spun up on demand (to a set upper limit) and te

Re: Fiber is better than go's goroutine?

2014-10-28 Thread Sean Kelly via Digitalmars-d
On Monday, 27 October 2014 at 22:59:50 UTC, Brad Anderson wrote: Again, just out of curiosity, have you ever looked at Windows user-mode scheduling or Google's user-level threads[1][2] (under 200ns context-switch times)? I first heard of them from a post on the Rust forum[3] which suggested M

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread Steven Schveighoffer via Digitalmars-d
On 10/28/14 9:41 AM, "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= " wrote: On Tuesday, 28 October 2014 at 08:15:58 UTC, Russel Winder via Digitalmars-d wrote: parent.send(result) or: send(parent, result) as being idiomatic D code? I cannot speak for idioms, but this is a good example of ho

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread bearophile via Digitalmars-d
Ola Fosheim Grøstad: "X.action(Y)" will in most OO languages mean do "action" to object "X", but "parent.send(results)" means the opposite?! Why the opposite? Bye, bearophile

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread via Digitalmars-d
On Tuesday, 28 October 2014 at 08:15:58 UTC, Russel Winder via Digitalmars-d wrote: parent.send(result) or: send(parent, result) as being idiomatic D code? I cannot speak for idioms, but this is a good example of how UFCS fails to capture the semantics of dot notation. "X.

Re: Stackless resumable functions

2014-10-28 Thread Paulo Pinto via Digitalmars-d
On Tuesday, 28 October 2014 at 12:30:22 UTC, Kagamin wrote: In my experience with .net, async/await introduce a non-obvious multithreading model, which remaining hidden under the hood, can still inflict concurrency issues on your code: race conditions and deadlocks. And while C++ and C# don't k

Re: toString refactor in druntime

2014-10-28 Thread Steven Schveighoffer via Digitalmars-d
On 10/27/14 8:01 PM, Manu via Digitalmars-d wrote: 28 October 2014 04:40, Benjamin Thaut via Digitalmars-d wrote: Am 27.10.2014 11:07, schrieb Daniel Murphy: "Benjamin Thaut" wrote in message news:m2kt16$2566$1...@digitalmars.com... I'm planning on doing a pull request for druntime which

Re: toString refactor in druntime

2014-10-28 Thread Steven Schveighoffer via Digitalmars-d
On 10/27/14 6:02 PM, ketmar via Digitalmars-d wrote: On Mon, 27 Oct 2014 17:04:55 -0400 Steven Schveighoffer via Digitalmars-d wrote: I think this is overkill for this purpose. We need something simple to save a few lines of code. 18KB (even less) module which consists mostly of functional te

Re: Stackless resumable functions

2014-10-28 Thread Kagamin via Digitalmars-d
In my experience with .net, async/await introduce a non-obvious multithreading model, which remaining hidden under the hood, can still inflict concurrency issues on your code: race conditions and deadlocks. And while C++ and C# don't know about shared types, D will need to catch concurrent acce

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Robert burner Schadek via Digitalmars-d
On Tuesday, 28 October 2014 at 11:11:09 UTC, Martin Nowak wrote: Yep, let's try that. I think part of the misunderstanding is that I'm thinking of an app as user code plus a number of libraries all on top of phobos. Say I have an app using vibe.d and I want to enable logging in my app, but d

Re: Deimos library interfaces needed for these

2014-10-28 Thread John Colvin via Digitalmars-d
On Monday, 27 October 2014 at 17:18:06 UTC, Dicebot wrote: On Monday, 27 October 2014 at 07:48:16 UTC, Vladimir Panteleev wrote: On Saturday, 25 October 2014 at 20:49:26 UTC, Walter Bright wrote: https://github.com/D-Programming-Deimos http://en.docsity.com/news/programming-2/free-libraries-fo

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Martin Nowak via Digitalmars-d
On Tuesday, 28 October 2014 at 09:00:54 UTC, Robert burner Schadek wrote: The second two are wanted and disabling a LogLevel at CT of phobos should be banned anyway. But no the less, it is one more option the user has to manipulate the Logger. And this is where the leakage happens because ther

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Martin Nowak via Digitalmars-d
On Tuesday, 28 October 2014 at 10:05:47 UTC, Robert burner Schadek wrote: On Tuesday, 28 October 2014 at 09:39:24 UTC, Martin Nowak wrote: On Tuesday, 28 October 2014 at 08:38:50 UTC, Robert burner Schadek wrote: Actually, that is only true for LogLevel given to a log call at runtime. calls to

Re: Algorithms, term rewriting and compile time reflection

2014-10-28 Thread thedeemon via Digitalmars-d
On Tuesday, 28 October 2014 at 01:10:18 UTC, Andrei Alexandrescu wrote: On 10/23/14 2:41 AM, thedeemon wrote: To scare you well, here, for example, is my Smoothsort implementation in ATS http://stuff.thedeemon.com/lj/smooth_dats.html that includes proofs that the array really gets sorted and th

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Robert burner Schadek via Digitalmars-d
On Tuesday, 28 October 2014 at 09:39:24 UTC, Martin Nowak wrote: On Tuesday, 28 October 2014 at 08:38:50 UTC, Robert burner Schadek wrote: Actually, that is only true for LogLevel given to a log call at runtime. calls to info, trace etc. are guarded with static if. So you're not paying any runt

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Robert burner Schadek via Digitalmars-d
On Tuesday, 28 October 2014 at 05:44:48 UTC, Andrei Alexandrescu wrote: Being able to select maximum logging level statically at client application level is a deal maker/breaker for me. The mechanics aren't important but it's likely they will affect the API. So I think that needs to be resolved

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Martin Nowak via Digitalmars-d
On Tuesday, 28 October 2014 at 08:38:50 UTC, Robert burner Schadek wrote: Actually, that is only true for LogLevel given to a log call at runtime. calls to info, trace etc. are guarded with static if. So you're not paying any runtime overhead when calling log functions with LogLevel build in the

Re: Algorithms, term rewriting and compile time reflection

2014-10-28 Thread bearophile via Digitalmars-d
http://dpaste.dzfl.pl/e60eeb30e3b6 That code is in ATS1. Now there is ATS2 that has a better syntax, and is a bit more powerful (and can compile even to JavaScript). On the ATS site all the ATS1 examples apparently have being removed. Bye, bearophile

Re: Algorithms, term rewriting and compile time reflection

2014-10-28 Thread bearophile via Digitalmars-d
Andrei Alexandrescu: I recall there was an earlier implementation of a statically-checked sort, maybe in Agda? It wouldn't typecheck if the output array weren't sorted. Yes, there is a similar code even in ATS language (that is much simpler than Agda, you can't verify a generic proof as in A

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, October 28, 2014 08:15:44 Russel Winder via Digitalmars-d wrote: I need to know the community view on D idiom regarding UFCS in one particular case (mostly because I am doing a presentation and need to know which one to put on the slides). Given: import std.concurrency: Tid, sen

Re: `alias newSymbol = existingSymbol` or `alias existingSymbol newSymbol`

2014-10-28 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, 28 October 2014 at 08:59:20 UTC, Mike wrote: On Tuesday, 28 October 2014 at 08:29:22 UTC, Jonathan M Davis via Digitalmars-d wrote: I see no reason to say anything about the alias syntax in the style guide. All those that program in D are not required to follow the recommendatio

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Robert burner Schadek via Digitalmars-d
On Tuesday, 28 October 2014 at 01:42:12 UTC, Martin Nowak wrote: On 10/28/2014 01:01 AM, Robert burner Schadek wrote: is different from the code that has been in the PR for quite some time. And the code you show does exactly what you say and the current code does something different. No it b

Re: `alias newSymbol = existingSymbol` or `alias existingSymbol newSymbol`

2014-10-28 Thread Mike via Digitalmars-d
On Tuesday, 28 October 2014 at 08:29:22 UTC, Jonathan M Davis via Digitalmars-d wrote: I see no reason to say anything about the alias syntax in the style guide. All those that program in D are not required to follow the recommendations in the Style Guide. The Style Guide is for contributo

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread Walter Bright via Digitalmars-d
On 10/28/2014 1:15 AM, Russel Winder via Digitalmars-d wrote: This has all the appearance of a potential troll, but that is not my intention, I really do need to know which the community feels is idiomatic D. It's a good question. I prefer: parent.send(result) when doing a "pipeline" styl

Re: Deimos library interfaces needed for these

2014-10-28 Thread Walter Bright via Digitalmars-d
On 10/28/2014 12:39 AM, Martin Nowak wrote: http://wiki.dlang.org/People Searching for github users also works https://github.com/search?q=Vladimir+Panteleev&type=Users Thanks for the info

Re: std.experimental.logger formal review round 3

2014-10-28 Thread Robert burner Schadek via Digitalmars-d
On Tuesday, 28 October 2014 at 01:37:48 UTC, Martin Nowak wrote: On 10/28/2014 12:58 AM, Robert burner Schadek wrote: Disabling a version at CT of the lib has no consequence to compile units that are not compiled with that version statement. Yes setting a version in my app has no effect on

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, October 28, 2014 08:15:44 Russel Winder via Digitalmars-d wrote: > I need to know the community view on D idiom regarding UFCS in one > particular case (mostly because I am doing a presentation and need to > know which one to put on the slides). > > Given: > > import std.concurrency:

Re: `alias newSymbol = existingSymbol` or `alias existingSymbol newSymbol`

2014-10-28 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, October 28, 2014 00:55:30 Mike via Digitalmars-d wrote: > A debate is currently taking place over `alias newSymbol = > existingSymbol` (a.k.a "The new syntax") or `alias existingSymbol > newSymbol` (a.k.a "The old syntax") in a pull request to update > the D Style guide, and a pull requ

Re: Trivial (but not bikeshed please) question of style…

2014-10-28 Thread Gary Willoughby via Digitalmars-d
On Tuesday, 28 October 2014 at 08:15:58 UTC, Russel Winder via Digitalmars-d wrote: I need to know the community view on D idiom regarding UFCS in one particular case (mostly because I am doing a presentation and need to know which one to put on the slides). If you are asking in the general t

Trivial (but not bikeshed please) question of style…

2014-10-28 Thread Russel Winder via Digitalmars-d
I need to know the community view on D idiom regarding UFCS in one particular case (mostly because I am doing a presentation and need to know which one to put on the slides). Given: import std.concurrency: Tid, send and some code that spawns, then in a spawned task should I write:

Re: function pointer bug?

2014-10-28 Thread Kapps via Digitalmars-d
On Monday, 27 October 2014 at 22:17:25 UTC, bitwise wrote: This error seems like it may be related some how: enum index = __traits(getVirtualIndex, TestClass.instanceMethod); enum p = TestClass.classinfo.vtbl[index]; The above code will produce this error: Error: typeid(main.TestClass).vtbl

Re: Fiber is better than go's goroutine?

2014-10-28 Thread Martin Nowak via Digitalmars-d
On Monday, 27 October 2014 at 21:43:47 UTC, Sean Kelly wrote: Yep. Every logical thread is a Fiber executed in a round-robin manner by a pool of kernel threads. Pooled threads are spun up on demand (to a set upper limit) and terminate when there are no fibers waiting to execute. It should ma

Re: `alias newSymbol = existingSymbol` or `alias existingSymbol newSymbol`

2014-10-28 Thread Trass3r via Digitalmars-d
Let the bikeshedding begin. They treat the style guide like the holy bible.

Re: Fiber is better than go's goroutine?

2014-10-28 Thread Martin Nowak via Digitalmars-d
On Monday, 27 October 2014 at 16:32:25 UTC, Sean Kelly wrote: That's the reason why the await adapter is so powerful. It's should be possible to await a promise (future) to let the scheduler know that it should resume the Fiber only after the promise (future) was set.

Re: Stackless resumable functions

2014-10-28 Thread Martin Nowak via Digitalmars-d
On Tuesday, 28 October 2014 at 02:10:47 UTC, Andrei Alexandrescu wrote: On 10/24/14 10:51 AM, ROOAR wrote: I really liked this proposal for resumable lambda: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4244.pdf Is this related to the video? -- Andrei There is a good sumarry of

Re: function pointer bug?

2014-10-28 Thread Kapps via Digitalmars-d
On Tuesday, 28 October 2014 at 02:34:14 UTC, ketmar via Digitalmars-d wrote: On Tue, 28 Oct 2014 01:36:01 + bitwise via Digitalmars-d wrote: I have actually found a work around as well, which was to wrap the actual retrieval of the function address in a lambda, and pass the lambda by temp

Re: RFC: moving forward with @nogc Phobos

2014-10-28 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, September 30, 2014 15:18:17 Jacob Carlborg via Digitalmars-d wrote: > On 30/09/14 14:29, Andrei Alexandrescu wrote: > > Good point. We need to think about that. > > Weren't all methods in Object supposed to be lifted out from Object anyway? Yes, but not much work has been done on it,

Re: Deimos library interfaces needed for these

2014-10-28 Thread Jacob Carlborg via Digitalmars-d
On 2014-10-27 23:27, Brad Anderson wrote: I'd prefer if the name Deimos were dropped as it's less intuitive than calling them by what they are: C bindings. Or just "bindings". We can already bind to C++ as well, and Objective-C, hopefully not too far in the future. -- /Jacob Carlborg

Re: Deimos library interfaces needed for these

2014-10-28 Thread Martin Nowak via Digitalmars-d
On Tuesday, 28 October 2014 at 04:19:48 UTC, Walter Bright wrote: Please, guys, I'd really appreciate it if you'd use your names as github handles. You might think your handle is memorably associated with your name, but when there are 50 such I definitely lose the associations. http://wiki.dl