Re: multiple `alias this` suggestion

2017-04-28 Thread Daniel N via Digitalmars-d
On Friday, 28 April 2017 at 05:32:36 UTC, Carl Sturtivant wrote: On Friday, 28 April 2017 at 04:44:44 UTC, Carl Sturtivant wrote: On Thursday, 27 April 2017 at 05:41:43 UTC, Daniel N wrote: On Wednesday, 26 April 2017 at 18:34:48 UTC, Carl Sturtivant wrote: On Wednesday, 26 April 2017 at 15:00:

Re: Garbage Collector?

2017-04-28 Thread Ben via Digitalmars-d
On Thursday, 27 April 2017 at 22:43:56 UTC, Moritz Maxeiner wrote: You replied to the wrong person here, seeing as I did not link to the article you're referring to, Sorry... so I'll reply: Expanding the continuous memory region a dynamic array consists of (possibly moving it) once it overfl

Re: DConf Hackathon Ideas

2017-04-28 Thread Adrian Matoga via Digitalmars-d
On Thursday, 27 April 2017 at 14:53:02 UTC, Mike Parker wrote: This year, DConf has an extra day tacked on for problem solving in the form of a hackathon. The intent is to work on issues people find frustrating in the D ecosystem. While there will be time given at the event for proposals, and t

Re: Garbage Collector?

2017-04-28 Thread Mike Parker via Digitalmars-d
On Friday, 28 April 2017 at 07:35:00 UTC, Ben wrote: so I'll reply: Expanding the continuous memory region a dynamic array consists of (possibly moving it) once it overflows has absolutely nothing to do with the GC, or even the language, it's how the abstract data type "dynamic array" is defi

Re: Garbage Collector?

2017-04-28 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 28 April 2017 at 04:24:43 UTC, Ola Fosheim Grostad wrote: On Thursday, 27 April 2017 at 22:43:56 UTC, Moritz Maxeiner wrote: Working on the memory chunk layer is memory management. Working on the object layer is object lifetime management. D offers you both automatic memory management

Re: Garbage Collector?

2017-04-28 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 28 April 2017 at 08:25:01 UTC, Moritz Maxeiner wrote: On Friday, 28 April 2017 at 04:24:43 UTC, Ola Fosheim Grostad wrote: On Thursday, 27 April 2017 at 22:43:56 UTC, Moritz Maxeiner wrote: Working on the memory chunk layer is memory management. Working on the object layer is object

Re: DIP 1007 Preliminary Review Round 1

2017-04-28 Thread Olivier FAURE via Digitalmars-d
On Wednesday, 26 April 2017 at 11:26:19 UTC, Steven Schveighoffer wrote: I'm wondering if you actually wrote this? It seems to be quoted. That was a quote from the DIP. (guess I should have used a colon)

Re: CTFE Status 2

2017-04-28 Thread Stefan Koch via Digitalmars-d
On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote: [ ... ] After a little of exploration of the JIT, I have now determined that a simple risc architecture is still the best. (codegen for scaled loads is hard :p) I am now back to fixing non-compiling code, such as : struct S {

Re: DConf Hackathon Ideas

2017-04-28 Thread Jacob Carlborg via Digitalmars-d
On 2017-04-28 04:12, Luís Marques wrote: Backtraces with line information on macOS? That would be nice. Should be fairly trivial to look at the Linux implementation and to the same but read the data from different sections. -- /Jacob Carlborg

Re: Garbage Collector?

2017-04-28 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 28 April 2017 at 07:35:00 UTC, Ben wrote: On Thursday, 27 April 2017 at 22:43:56 UTC, Moritz Maxeiner wrote: D just does this transparently for you by default. If you already know the exact or maximum size, you can allocate *once* (not 6 times) using `new` and `.reserve` respectively

Re: Garbage Collector?

2017-04-28 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 28 April 2017 at 08:26:28 UTC, Ola Fosheim Grøstad wrote: On Friday, 28 April 2017 at 08:25:01 UTC, Moritz Maxeiner wrote: On Friday, 28 April 2017 at 04:24:43 UTC, Ola Fosheim Grostad wrote: On Thursday, 27 April 2017 at 22:43:56 UTC, Moritz Maxeiner wrote: Working on the memory ch

Re: Garbage Collector?

2017-04-28 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 28 April 2017 at 09:02:19 UTC, Moritz Maxeiner wrote: On Friday, 28 April 2017 at 08:26:28 UTC, Ola Fosheim Grøstad wrote: If it isn't sound then it isn't worth mentioning... So you claim... Actually, unsound lifetime management is worse than nothing as far as correctness goes...

Re: Garbage Collector?

2017-04-28 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 28 April 2017 at 09:12:03 UTC, Ola Fosheim Grøstad wrote: On Friday, 28 April 2017 at 09:02:19 UTC, Moritz Maxeiner wrote: On Friday, 28 April 2017 at 08:26:28 UTC, Ola Fosheim Grøstad wrote: If it isn't sound then it isn't worth mentioning... So you claim... Actually, unsound li

Re: DConf Hackathon Ideas

2017-04-28 Thread via Digitalmars-d
On Thursday, 27 April 2017 at 14:53:02 UTC, Mike Parker wrote: This year, DConf has an extra day tacked on for problem solving in the form of a hackathon. The intent is to work on issues people find frustrating in the D ecosystem. While there will be time given at the event for proposals, and t

OT: Re: DConf Hackathon Ideas

2017-04-28 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 28 April 2017 at 09:52:29 UTC, Petar Kirov [ZombineDev] wrote: AST introspection - given a function definition (!= declaration, i.e. the body is available) f, the expression __traits(ast, f) should return an instance of FuncDeclaration (https://github.com/dlang/dmd/blob/197ff0fd84b

Re: DConf Hackathon Ideas

2017-04-28 Thread Jacob Carlborg via Digitalmars-d
On 2017-04-27 19:06, Andre Pany wrote: Another big issue for me is using dub in a company. Big companies do not want to use the official dub repository due to security issues. That would be nice. -- /Jacob Carlborg

Re: CTFE Status 2

2017-04-28 Thread Nordlöw via Digitalmars-d
On Friday, 28 April 2017 at 08:47:43 UTC, Stefan Koch wrote: After a little of exploration of the JIT, I have now determined that a simple risc architecture is still the best. (codegen for scaled loads is hard :p) Do you mean no Jit?

Re: CTFE Status 2

2017-04-28 Thread Stefan Koch via Digitalmars-d
On Friday, 28 April 2017 at 13:03:42 UTC, Nordlöw wrote: On Friday, 28 April 2017 at 08:47:43 UTC, Stefan Koch wrote: After a little of exploration of the JIT, I have now determined that a simple risc architecture is still the best. (codegen for scaled loads is hard :p) Do you mean no Jit?

Re: Python : Pythonista / Ruby: Rubyist : / D : ?

2017-04-28 Thread Chris via Digitalmars-d
On Thursday, 27 April 2017 at 12:29:48 UTC, Steven Schveighoffer wrote: On 4/24/17 1:43 AM, Nick Sabalausky (Abscissa) wrote: "Dashing, awesome, ultra-attractive programmer with an impeccably fine taste in languages." It's a bit long and doesn't include the letter D FIFY -Steve D-veloper

Re: OT: Re: DConf Hackathon Ideas

2017-04-28 Thread via Digitalmars-d
On Friday, 28 April 2017 at 10:09:32 UTC, Moritz Maxeiner wrote: On Friday, 28 April 2017 at 09:52:29 UTC, Petar Kirov [ZombineDev] wrote: AST introspection - given a function definition (!= declaration, i.e. the body is available) f, the expression __traits(ast, f) should return an instance

Re: Python : Pythonista / Ruby: Rubyist : / D : ?

2017-04-28 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 28 April 2017 at 13:19:47 UTC, Chris wrote: On Thursday, 27 April 2017 at 12:29:48 UTC, Steven Schveighoffer wrote: On 4/24/17 1:43 AM, Nick Sabalausky (Abscissa) wrote: "Dashing, awesome, ultra-attractive programmer with an impeccably fine taste in languages." It's a bit long and

Re: CTFE Status 2

2017-04-28 Thread Nordlöw via Digitalmars-d
On Friday, 28 April 2017 at 13:13:16 UTC, Stefan Koch wrote: Do you mean no Jit? Of course there will be a JIT. Ah, I misunderstood you formulation. But currently I am fixing busy bugs in the generated IR. So the implementation of jit will have to wait a little. Ok. Thanks.

Re: Garbage Collector?

2017-04-28 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 28 April 2017 at 09:40:07 UTC, Moritz Maxeiner wrote: I'm sorry, but that's just plain wrong. D does not have ownership pointers because nobody that wants them has stepped up and 1) Done the work of drafting an informal proposal that *actually deals with _all_ of the issues involved*

Re: Garbage Collector?

2017-04-28 Thread H. S. Teoh via Digitalmars-d
On Fri, Apr 28, 2017 at 09:01:03AM +, Moritz Maxeiner via Digitalmars-d wrote: > On Friday, 28 April 2017 at 07:35:00 UTC, Ben wrote: [...] > > Is it so hard for developers when you declare a variable, to later > > also clean it up??? > > > > var x = 1; > > // Do work > > x.free; > > If you

Re: Garbage Collector?

2017-04-28 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 28 April 2017 at 14:59:46 UTC, Ola Fosheim Grøstad wrote: On Friday, 28 April 2017 at 09:40:07 UTC, Moritz Maxeiner wrote: I'm sorry, but that's just plain wrong. D does not have ownership pointers because nobody that wants them has stepped up and 1) Done the work of drafting an info

Re: OT: Re: DConf Hackathon Ideas

2017-04-28 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 28 April 2017 at 13:31:33 UTC, Petar Kirov [ZombineDev] wrote: [...] Other applications include: * compiling/transpiling D functions to targets like JS, SPIR-V, WebAssembly, etc. using CTFE. * CTFE-driven code diagnostics (linting) * Adding semantic to user defined attributes: E.g.

Re: Garbage Collector?

2017-04-28 Thread bachmeier via Digitalmars-d
On Friday, 28 April 2017 at 15:23:18 UTC, H. S. Teoh wrote: you could save yourself the bug by writing: auto x = malloc(...); scope(exit) free(x); // ... however many pages of stuff you want, you don't have to // remember to write free() afterwards! Yes, D comes

Re: Move construction from !is(T == typeof(this))

2017-04-28 Thread Ola Fosheim Grøstad via Digitalmars-d
On Thursday, 27 April 2017 at 12:28:38 UTC, Steven Schveighoffer wrote: My solution would be to push the duplication onto the user. I'm not a fan of implicit copying. It's also wasteful in the case of immutable data. Isn't that an odd stance given that "struct" is supposed to be a value type?

Re: Garbage Collector?

2017-04-28 Thread jmh530 via Digitalmars-d
On Friday, 28 April 2017 at 16:03:18 UTC, bachmeier wrote: I usually use the GC, so I have limited knowledge in this area. How common is this pattern in D code? Is it better than using reference counted structs? Is there any advantage to using the GC in this scenario? I would like to add th

Re: Interesting PRs: bringing type system legitimacy to shared allocators

2017-04-28 Thread Atila Neves via Digitalmars-d
On Friday, 28 April 2017 at 01:12:39 UTC, Nick Sabalausky (Abscissa) wrote: On 04/27/2017 07:12 PM, Moritz Maxeiner wrote: Wasn't one major selling point of compile time introspection / duck typing that we could stop using interfaces such... naming schemes? Not that I speak for everyone, bu

Re: Garbage Collector?

2017-04-28 Thread bachmeier via Digitalmars-d
On Friday, 28 April 2017 at 17:06:51 UTC, jmh530 wrote: On Friday, 28 April 2017 at 16:03:18 UTC, bachmeier wrote: I usually use the GC, so I have limited knowledge in this area. How common is this pattern in D code? Is it better than using reference counted structs? Is there any advantage to

Re: Garbage Collector?

2017-04-28 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 28 April 2017 at 17:42:18 UTC, bachmeier wrote: I'm hoping to put all information in one place. Then when someone on Reddit or HN or here starts making claims about the GC, I can give them one link that shows all of their options. That's nice. Just get your hopes up for it having an

Re: CTFE Status 2

2017-04-28 Thread Stefan Koch via Digitalmars-d
On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote: [ ... ] Hi Guys, I just implemented sliceAssigment. meaning the following code will now compile: uint[] assignSlice(uint from, uint to, uint[] stuff) { uint[] slice; slice.length = to + 4; foreach (uint i; 0 .. to +

Re: Interesting PRs: bringing type system legitimacy to shared allocators

2017-04-28 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 04/28/2017 01:09 PM, Atila Neves wrote: https://github.com/atilaneves/concepts import concepts; @models!(isForwardRange, MyType) struct MyType { } Hmm, close, but if I'm reading the source right, it looks like a type doesn't have to use the UDA in order for isXXX or "static assert

Re: Interesting PRs: bringing type system legitimacy to shared allocators

2017-04-28 Thread jmh530 via Digitalmars-d
On Friday, 28 April 2017 at 17:09:22 UTC, Atila Neves wrote: https://github.com/atilaneves/concepts import concepts; @models!(isForwardRange, MyType) struct MyType { } Atila I remember you had posted about this last year. It looks like you've added some stuff on ranges to it recently

Re: Garbage Collector?

2017-04-28 Thread H. S. Teoh via Digitalmars-d
On Fri, Apr 28, 2017 at 04:03:18PM +, bachmeier via Digitalmars-d wrote: > On Friday, 28 April 2017 at 15:23:18 UTC, H. S. Teoh wrote: > > > you could save yourself the bug by writing: > > > > auto x = malloc(...); > > scope(exit) free(x); > > // ... however many pages of stuff yo

Re: Move construction from !is(T == typeof(this))

2017-04-28 Thread Steven Schveighoffer via Digitalmars-d
On 4/28/17 12:56 PM, Ola Fosheim Grøstad wrote: On Thursday, 27 April 2017 at 12:28:38 UTC, Steven Schveighoffer wrote: My solution would be to push the duplication onto the user. I'm not a fan of implicit copying. It's also wasteful in the case of immutable data. Isn't that an odd stance give

Re: Move construction from !is(T == typeof(this))

2017-04-28 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 28 April 2017 at 18:05:41 UTC, Steven Schveighoffer wrote: On 4/28/17 12:56 PM, Ola Fosheim Grøstad wrote: Isn't that an odd stance given that "struct" is supposed to be a value type? Not really, but thanks for asking. Well, it counters the very definition of a value... I guess

Kafka site needs to be updated with D modules

2017-04-28 Thread Ali Çehreli via Digitalmars-d
There are three D modules that I could identify that provide Kafka bindings[1] by searching for "kafka" on the code registry: http://code.dlang.org/ Could people in the know please update the Kafka site with necessary information like what version of Kafka they support, etc. Thank you, Ali

Re: CTFE Status 2

2017-04-28 Thread Stefan Koch via Digitalmars-d
On Friday, 28 April 2017 at 17:53:04 UTC, Stefan Koch wrote: On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote: [ ... ] Hi Guys, I just implemented sliceAssigment. meaning the following code will now compile: uint[] assignSlice(uint from, uint to, uint[] stuff) { uint[] sl

Re: Garbage Collector?

2017-04-28 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 28 April 2017 at 15:43:22 UTC, Moritz Maxeiner wrote: On Friday, 28 April 2017 at 14:59:46 UTC, Ola Fosheim Grøstad wrote: Walter's position has always been that having more than a single pointer type is a disaster. None of the threads I've read in the last couple of years regardin

Re: Garbage Collector?

2017-04-28 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 28 April 2017 at 17:48:47 UTC, Ola Fosheim Grøstad wrote: On Friday, 28 April 2017 at 17:42:18 UTC, bachmeier wrote: I'm hoping to put all information in one place. Then when someone on Reddit or HN or here starts making claims about the GC, I can give them one link that shows all of

Re: Garbage Collector?

2017-04-28 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote: On Friday, 28 April 2017 at 15:43:22 UTC, Moritz Maxeiner wrote: On Friday, 28 April 2017 at 14:59:46 UTC, Ola Fosheim Grøstad wrote: Walter's position has always been that having more than a single pointer type is a disaster.

Re: Garbage Collector?

2017-04-28 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 28 April 2017 at 20:13:58 UTC, Moritz Maxeiner wrote: Both of these, however, show only that he doesn't seem to personally like multiple pointer types (and consequently doesn't seem to have any interest in working on them himself); that's not the same as him claiming that it "is a di

Re: Garbage Collector?

2017-04-28 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 28 April 2017 at 20:21:34 UTC, Ola Fosheim Grøstad wrote: On Friday, 28 April 2017 at 20:13:58 UTC, Moritz Maxeiner wrote: Both of these, however, show only that he doesn't seem to personally like multiple pointer types (and consequently doesn't seem to have any interest in working o

Re: Garbage Collector?

2017-04-28 Thread jmh530 via Digitalmars-d
On Friday, 28 April 2017 at 20:21:34 UTC, Ola Fosheim Grøstad wrote: On Friday, 28 April 2017 at 20:13:58 UTC, Moritz Maxeiner wrote: Both of these, however, show only that he doesn't seem to personally like multiple pointer types (and consequently doesn't seem to have any interest in working o

Re: Garbage Collector?

2017-04-28 Thread Atila Neves via Digitalmars-d
On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote: On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote: «Back in the old DOS days, there were multiple pointer types (near and far). Programmers put up with that because it was the only way, but they HATED HATED H

Re: Garbage Collector?

2017-04-28 Thread H. S. Teoh via Digitalmars-d
On Fri, Apr 28, 2017 at 09:50:49PM +, Atila Neves via Digitalmars-d wrote: > On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote: > > On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote: > > «Back in the old DOS days, there were multiple pointer types (near > > a

Re: Interesting PRs: bringing type system legitimacy to shared allocators

2017-04-28 Thread Atila Neves via Digitalmars-d
On Friday, 28 April 2017 at 18:04:06 UTC, jmh530 wrote: On Friday, 28 April 2017 at 17:09:22 UTC, Atila Neves wrote: https://github.com/atilaneves/concepts import concepts; @models!(isForwardRange, MyType) struct MyType { } Atila I remember you had posted about this last year. It loo

Re: Garbage Collector?

2017-04-28 Thread Ola Fosheim Grostad via Digitalmars-d
On Friday, 28 April 2017 at 21:21:13 UTC, jmh530 wrote: To be fair, C++ effectively has multiple pointer types too with raw pointers, unique_ptr, shared_ptr, and weak_ptr. However, each of the extra ones has a unique purpose and are opt-in. As a result, people happily use them when it makes the

Re: OT: Re: DConf Hackathon Ideas

2017-04-28 Thread Nicholas Wilson via Digitalmars-d
On Friday, 28 April 2017 at 13:31:33 UTC, Petar Kirov [ZombineDev] wrote: Other applications include: * compiling/transpiling D functions to targets like JS, SPIR-V, I got you covered ;) (LDC not CTFE though. It would be fiendishly complicated to do at CTFE as a fair amount of compiler magic i

Re: DConf Hackathon Ideas

2017-04-28 Thread Nicholas Wilson via Digitalmars-d
On Thursday, 27 April 2017 at 14:53:02 UTC, Mike Parker wrote: This year, DConf has an extra day tacked on for problem solving in the form of a hackathon. The intent is to work on issues people find frustrating in the D ecosystem. While there will be time given at the event for proposals, and t