Re: Antipattern in core.memory.GC.addRange?

2017-09-22 Thread Petar via Digitalmars-d
On Friday, 22 September 2017 at 21:29:10 UTC, Steven Schveighoffer wrote: GC.addRange has this signature: static nothrow @nogc void addRange(in void* p, size_t sz, const TypeInfo ti = null); I see a large problem with this. Let's say you malloc an array of struct pointers: struct Foo { ...

Re: Antipattern in core.memory.GC.addRange?

2017-09-22 Thread safety0ff via Digitalmars-d
On Friday, 22 September 2017 at 21:29:10 UTC, Steven Schveighoffer wrote: GC.addRange has this signature: static nothrow @nogc void addRange(in void* p, size_t sz, const TypeInfo ti = null); I see a large problem with this. Let's say you malloc an array of struct pointers: struct Foo { ...

Re: Finding class template instantiations via runtime reflection (for openmethods)

2017-09-22 Thread bitwise via Digitalmars-d
On Thursday, 21 September 2017 at 20:32:38 UTC, Jean-Louis Leroy wrote: Neither 'Bar!int' nor 'BarInt' appear in 'localClasses'. Ideas? The information you can retrieve through localClasses is limited. AFAIK it only retrieves plain non-template classes declared directly in the module. Last

Re: Finding class template instantiations via runtime reflection (for openmethods)

2017-09-22 Thread bitwise via Digitalmars-d
On Thursday, 21 September 2017 at 20:32:38 UTC, Jean-Louis Leroy wrote: Neither 'Bar!int' nor 'BarInt' appear in 'localClasses'. Ideas? The information you can retrieve through localClasses is limited. AFAIK it only retrieves plain non-template classes declared directly in the module. Last

Re: Finding class template instantiations via runtime reflection (for openmethods)

2017-09-22 Thread bitwise via Digitalmars-d
On Thursday, 21 September 2017 at 20:32:38 UTC, Jean-Louis Leroy wrote: Neither 'Bar!int' nor 'BarInt' appear in 'localClasses'. Ideas? The information you can retrieve through localClasses is limited. AFAIK it only retrieves plain non-template classes declared directly in the module. Last

Re: A potential danger to dub

2017-09-22 Thread Matt via Digitalmars-d
On Saturday, 16 September 2017 at 17:09:34 UTC, David Gileadi wrote: Let me preface this by saying I love package managers and think dub is one of the best things with dlang. However they can also sometimes be dangerous, as this PyPI incident[1] shows: several Python packages were uploaded that

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-22 Thread Regio via Digitalmars-d
On Thursday, 21 September 2017 at 08:01:23 UTC, Vadim Lopatin wrote: There is a simple set of simple web server apps written in several languages (Go, Rust, Scala, Node-js): https://github.com/nuald/simple-web-benchmark I've sent PR to include D benchmark (vibe.d). I was hoping it could show

Re: code.dlang.org is offline?

2017-09-22 Thread Seb via Digitalmars-d
On Friday, 22 September 2017 at 08:14:43 UTC, Szabo Bogdan wrote: Hi, Is there a reason why code.dlang.org is offline? Thanks, Bogdan It's an ongoing process to make the registry more reliable. However, since a couple of months we run multiple mirrors. At the moment there is: https://code-mi

Antipattern in core.memory.GC.addRange?

2017-09-22 Thread Steven Schveighoffer via Digitalmars-d
GC.addRange has this signature: static nothrow @nogc void addRange(in void* p, size_t sz, const TypeInfo ti = null); I see a large problem with this. Let's say you malloc an array of struct pointers: struct Foo { ... } import core.stdc.stdlib; auto ptrs = (cast(Foo *)malloc(Foo.sizeof * 10

Re: Weka.IO in the news... but not mentioning Dlang... why?

2017-09-22 Thread Shachar Shemesh via Digitalmars-d
On 21/09/17 09:18, Suliman wrote: On Thursday, 3 August 2017 at 21:01:28 UTC, Joakim wrote: On Thursday, 3 August 2017 at 20:55:35 UTC, Pradeep Gowda wrote: On Thursday, 3 August 2017 at 20:47:30 UTC, Joakim wrote: Please tell me which enterprise storage company advertises the programming lang

Re: Finding class template instantiations via runtime reflection (for openmethods)

2017-09-22 Thread Ali Çehreli via Digitalmars-d
On 09/22/2017 05:16 AM, Steven Schveighoffer wrote: > On 9/21/17 4:32 PM, Jean-Louis Leroy wrote: >> it seems that classes that >> come from class template instantiations are not registered in >> ModuleInfo > I would say it's a bug. > > -Steve I think so too. I wanted to hear it from Steve firs

Should we add `a * b` for vectors?

2017-09-22 Thread Ilya Yaroshenko via Digitalmars-d
Should we add `a * b` to ndslice for 1d vectors? Discussion at https://github.com/libmir/mir-algorithm/issues/91

Re: code.dlang.org is offline?

2017-09-22 Thread Computermatronic via Digitalmars-d
On Friday, 22 September 2017 at 08:14:43 UTC, Szabo Bogdan wrote: Hi, Is there a reason why code.dlang.org is offline? Thanks, Bogdan Well, it seems to be working now.

Re: static array with inferred size

2017-09-22 Thread Jonathan M Davis via Digitalmars-d
On Friday, September 22, 2017 08:19:32 Steven Schveighoffer via Digitalmars- d wrote: > On 9/22/17 3:55 AM, Dominikus Dittes Scherkl wrote: > > On Thursday, 21 September 2017 at 13:58:14 UTC, Timon Gehr wrote: > >> On 21.09.2017 12:33, Per Nordlöw wrote: > >>> On Wednesday, 20 September 2017 at 18:

Re: static array with inferred size

2017-09-22 Thread Steven Schveighoffer via Digitalmars-d
On 9/22/17 3:55 AM, Dominikus Dittes Scherkl wrote: On Thursday, 21 September 2017 at 13:58:14 UTC, Timon Gehr wrote: On 21.09.2017 12:33, Per Nordlöw wrote: On Wednesday, 20 September 2017 at 18:41:51 UTC, Timon Gehr wrote: Can that be done without breakages? -- Andrei No. Are thinking ab

Re: Finding class template instantiations via runtime reflection (for openmethods)

2017-09-22 Thread Steven Schveighoffer via Digitalmars-d
On 9/21/17 4:32 PM, Jean-Louis Leroy wrote: It did not take long! Someone tried to create templatized open methods and it didn't work right of the box. I expected that, but in fact there may be a bit of hope. You cannot have virtual function templates in C++ or in D because the layout of the vt

Re: code.dlang.org is offline?

2017-09-22 Thread Suliman via Digitalmars-d
On Friday, 22 September 2017 at 08:14:43 UTC, Szabo Bogdan wrote: Hi, Is there a reason why code.dlang.org is offline? Thanks, Bogdan Who is host code.dlang.org?

Re: code.dlang.org is offline?

2017-09-22 Thread Seb via Digitalmars-d
On Friday, 22 September 2017 at 08:14:43 UTC, Szabo Bogdan wrote: Hi, Is there a reason why code.dlang.org is offline? Thanks, Bogdan No, it's an ongoing process to make the registry more reliable. However, since a couple of months we run multiple mirrors. At the moment there is: https://cod

Re: code.dlang.org is offline?

2017-09-22 Thread Rene Zwanenburg via Digitalmars-d
On Friday, 22 September 2017 at 08:14:43 UTC, Szabo Bogdan wrote: Hi, Is there a reason why code.dlang.org is offline? Thanks, Bogdan It works fine for me. Can you verify?

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-22 Thread Sönke Ludwig via Digitalmars-d
Am 21.09.2017 um 20:49 schrieb bitwise: Doesn't vibe-d use Fibers? I tried to build a simple web server with a fiber-based approach once - it was horribly slow. I hope C# (and soon C++) style stackless resumable functions will eventually come to D. It uses them and the overhead actually d

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-22 Thread Sönke Ludwig via Digitalmars-d
Am 22.09.2017 um 09:45 schrieb Vadim Lopatin: On Thursday, 21 September 2017 at 19:40:48 UTC, bitwise wrote: On Thursday, 21 September 2017 at 18:55:04 UTC, Vadim Lopatin It does. But Golang uses them, too. Goroutines. Indeed. I'm reading about them right now, and they seem to be "multiplexe

Re: code.dlang.org is offline?

2017-09-22 Thread Nemanja Boric via Digitalmars-d
On Friday, 22 September 2017 at 08:14:43 UTC, Szabo Bogdan wrote: Hi, Is there a reason why code.dlang.org is offline? Thanks, Bogdan Works from here. Best, Nemanja

Re: code.dlang.org is offline?

2017-09-22 Thread John Colvin via Digitalmars-d
On Friday, 22 September 2017 at 08:14:43 UTC, Szabo Bogdan wrote: Hi, Is there a reason why code.dlang.org is offline? Thanks, Bogdan Works for me

Re: A potential danger to dub

2017-09-22 Thread Szabo Bogdan via Digitalmars-d
On Saturday, 16 September 2017 at 17:09:34 UTC, David Gileadi wrote: Let me preface this by saying I love package managers and think dub is one of the best things with dlang. However they can also sometimes be dangerous, as this PyPI incident[1] shows: several Python packages were uploaded that

Re: code.dlang.org is offline?

2017-09-22 Thread Szabo Bogdan via Digitalmars-d
On Friday, 22 September 2017 at 08:14:43 UTC, Szabo Bogdan wrote: Hi, Is there a reason why code.dlang.org is offline? Thanks, Bogdan it looks like http://dlang.org/ is down too... ``` traceroute to dlang.org (162.217.114.56), 30 hops max, 60 byte packets 1 ... 0.434 m

code.dlang.org is offline?

2017-09-22 Thread Szabo Bogdan via Digitalmars-d
Hi, Is there a reason why code.dlang.org is offline? Thanks, Bogdan

Re: static array with inferred size

2017-09-22 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 21 September 2017 at 13:58:14 UTC, Timon Gehr wrote: On 21.09.2017 12:33, Per Nordlöw wrote: On Wednesday, 20 September 2017 at 18:41:51 UTC, Timon Gehr wrote: Can that be done without breakages? -- Andrei No. Are thinking about     typeof([1,2]) changing from     int[] t

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-22 Thread Vadim Lopatin via Digitalmars-d
On Thursday, 21 September 2017 at 19:40:48 UTC, bitwise wrote: On Thursday, 21 September 2017 at 18:55:04 UTC, Vadim Lopatin It does. But Golang uses them, too. Goroutines. Indeed. I'm reading about them right now, and they seem to be "multiplexed". I wonder if Vibe.d does something similar.

Re: Greetings, New IDE Development

2017-09-22 Thread Jacob Carlborg via Digitalmars-d
On 2017-09-16 21:38, Answar Enchali wrote: Does dmd support outputting the full ast with symbol type information and full line mapping or will these features have to be added? If they are to be added, what would be a ball part man-hour cost to add these features? If we are able to integrate D