Re: Faster Command Line Tools in D

2017-08-08 Thread Joakim via Digitalmars-d-announce
On Wednesday, 24 May 2017 at 13:39:57 UTC, Mike Parker wrote: Some of you may remember Jon Degenhardt's talk from one of the Silicon Valley D meetups, where he described the performance improvements he saw when he rewrote some of eBay's command line tools in D. He has now put the effort into

Re: Faster Command Line Tools in D

2017-08-08 Thread bachmeier via Digitalmars-d-announce
On Tuesday, 8 August 2017 at 21:51:30 UTC, Joakim wrote: On Wednesday, 24 May 2017 at 13:39:57 UTC, Mike Parker wrote: Some of you may remember Jon Degenhardt's talk from one of the Silicon Valley D meetups, where he described the performance improvements he saw when he rewrote some of eBay's

Re: gtkD window centering message up and no app on taskbar

2017-08-08 Thread Johnson Jones via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 21:37:40 UTC, Mike Wey wrote: On 07-08-17 23:52, Johnson Jones wrote: On Monday, 7 August 2017 at 20:57:08 UTC, Mike Wey wrote: On 07-08-17 22:46, Johnson Jones wrote: [...] This appears to be a GTK issue, a work around might be to get the Window handle from

[Issue 15654] SysTime.toISOString formats the time zones incorrectly

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15654 Jonathan M Davis changed: What|Removed |Added Status|RESOLVED|REOPENED

Re: Create class on stack

2017-08-08 Thread Johan Engelen via Digitalmars-d-learn
On Monday, 7 August 2017 at 13:40:18 UTC, Moritz Maxeiner wrote: Thanks, I wasn't aware of this. I tried fooling around scope classes and DIP1000 for a bit and was surprised that this is allowed: Thanks for the test case :-) It was fun to see that ASan can catch this bug too. Because

[Issue 17722] Wrong diagnostic using __traits(compiles, e1 && e2) expressions.

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17722 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/ec3494661edce54b2e72efd762247532e433cec1 fix Issue 17722 - Wrong diagnostic using __traits(compiles,

Re: DMD license question

2017-08-08 Thread Jacob Carlborg via Digitalmars-d
On 2017-08-08 22:50, Jacob Carlborg wrote: On 2017-08-08 16:28, meppl wrote: in case your main application is written in D, too: how do you avoid symbol name collisions? D symbols are mangled to include the package and module name. That will make a collision less likely. The

Re: gtkD window centering message up and no app on taskbar

2017-08-08 Thread Mike Wey via Digitalmars-d-learn
On 07-08-17 23:52, Johnson Jones wrote: On Monday, 7 August 2017 at 20:57:08 UTC, Mike Wey wrote: On 07-08-17 22:46, Johnson Jones wrote: [...] This appears to be a GTK issue, a work around might be to get the Window handle from gtk and use the Windows API to set the taskbar visibility.

[Issue 17688] ICE with static foreach directly inside switch

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17688 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 17688] ICE with static foreach directly inside switch

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17688 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/7ebda47f6a162ce3de774a042207eb883908b650 fix Issue 17688 - ICE with static foreach directly inside

Re: Is there a cleaner way of doing this?

2017-08-08 Thread Andrei Alexandrescu via Digitalmars-d
On 08/08/2017 05:03 AM, Timon Gehr wrote: On 08.08.2017 08:06, Shachar Shemesh wrote: On 07/08/17 12:37, Timon Gehr wrote: struct S(T...) { T param; void initialize(T param) { this.param = param; // Other stuff } } Then, use S!() instead of S!void. It's

[Issue 17731] dman fails to build due to more than 32767 symbols

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17731 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/installer https://github.com/dlang/installer/commit/e356e3710410dde59c5707b903c3f913a41e2925 remove dman from installers to workaround Issue

Beta D 2.075.1

2017-08-08 Thread Martin Nowak via Digitalmars-d-announce
First beta for the 2.075.1 point release. This version resolves a few regressions and bugs in the 2.075.0 release. This release does not ship with the dman tool due to an unresolved issue. Let us know whether and how you use that tool, so we can evaluate whether it's worth fixing.

[Issue 2137] Data not compressed on fly when adding to zip archive

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2137 RazvanN changed: What|Removed |Added CC|

Re: Create class on stack

2017-08-08 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 05:37:41 UTC, ANtlord wrote: On Sunday, 6 August 2017 at 15:47:43 UTC, Moritz Maxeiner wrote: If you use this option, do be aware that this feature has been > scheduled for future deprecation [1]. It's likely going to continue working for quite a while (years),

Re: Is there a cleaner way of doing this?

2017-08-08 Thread Timon Gehr via Digitalmars-d
On 08.08.2017 08:06, Shachar Shemesh wrote: On 07/08/17 12:37, Timon Gehr wrote: struct S(T...) { T param; void initialize(T param) { this.param = param; // Other stuff } } Then, use S!() instead of S!void. It's an interesting approach. It has the down

Re: Specify dmd or ldc compiler and version in a json dub file?

2017-08-08 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 09:17:02 UTC, data pulverizer wrote: Hi, I would like to know how to specify dmd or ldc compiler and version in a json dub file. Thanks in advance. You can't [1]. You can specify the compiler to use only on the dub command line via `--compiler=`. [1]

Re: Who here uses vibe-s3 from code.dlang.org?

2017-08-08 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 7 August 2017 at 22:46:57 UTC, aberba wrote: vibe-s3 (https://code.dlang.org/packages/vibe-s3) is an Amazon s3 object storage API for D. Has anyone here used or tested it? What was your experiences? It has the tagline "this library is highly alpha and mostly untested. use at your

Re: Who here uses vibe-s3 from code.dlang.org?

2017-08-08 Thread extrawurst via Digitalmars-d
On Monday, 7 August 2017 at 22:46:57 UTC, aberba wrote: vibe-s3 (https://code.dlang.org/packages/vibe-s3) is an Amazon s3 object storage API for D. Has anyone here used or tested it? What was your experiences? It has the tagline "this library is highly alpha and mostly untested. use at your

Re: DMD license question

2017-08-08 Thread Jacob Carlborg via Digitalmars-d
On 2017-08-07 23:56, Joakim wrote: Yes, the idea of the Boost Software License is that you don't have to ask such questions. Boost allows you to do anything you want with the source, whether embedding, modifying, etc. and you don't have to ask anyone for permission or even mention that you're

[Issue 17722] Wrong diagnostic using __traits(compiles, e1 && e2) expressions.

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17722 Iain Buclaw changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment

[Issue 17730] [scope][dip1000] Can escape references to scope classes by moving

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17730 Mike changed: What|Removed |Added CC||slavo5...@yahoo.com --

[Issue 2898] Allow RandomCover to sample both w/ and w/o replacement.

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2898 --- Comment #3 from RazvanN --- How should we proceed here? Make a pull request with David's code and see what happens or close with wontfix since there is no demand for this feature? --

Specify dmd or ldc compiler and version in a json dub file?

2017-08-08 Thread data pulverizer via Digitalmars-d-learn
Hi, I would like to know how to specify dmd or ldc compiler and version in a json dub file. Thanks in advance.

Re: d_to_html.d

2017-08-08 Thread Biotronic via Digitalmars-d-announce
On Sunday, 6 August 2017 at 15:18:29 UTC, Jacob Carlborg wrote: [snip] Wow, that's pretty cool :). One downside I see is that all tags are currently hard coded. This won't work for XML or if using new/custom tags that the library doesn't know about yet. That's easily amendable: struct

Re: Visual Studio Code code-d serve-d beta release

2017-08-08 Thread Arjan via Digitalmars-d-announce
On Saturday, 5 August 2017 at 22:43:31 UTC, WebFreak001 wrote: ... Thanks a lot! Will give it a try. Small request: could the setting "d.stdlibPath" be inferred from the compiler in use? DMD and LDC both have a conf file in which the paths are already set. What about the debugging

Re: DMD license question

2017-08-08 Thread Andre Pany via Digitalmars-d
On Monday, 7 August 2017 at 21:56:01 UTC, Joakim wrote: On Monday, 7 August 2017 at 21:28:52 UTC, Andre Pany wrote: [...] Yes, the idea of the Boost Software License is that you don't have to ask such questions. Boost allows you to do anything you want with the source, whether embedding,

Re: Who here uses vibe-s3 from code.dlang.org?

2017-08-08 Thread Andre Pany via Digitalmars-d
On Monday, 7 August 2017 at 22:46:57 UTC, aberba wrote: vibe-s3 (https://code.dlang.org/packages/vibe-s3) is an Amazon s3 object storage API for D. Has anyone here used or tested it? What was your experiences? It has the tagline "this library is highly alpha and mostly untested. use at your

Re: Is there a cleaner way of doing this?

2017-08-08 Thread Shachar Shemesh via Digitalmars-d
On 07/08/17 12:37, Timon Gehr wrote: struct S(T...) { T param; void initialize(T param) { this.param = param; // Other stuff } } Then, use S!() instead of S!void. It's an interesting approach. It has the down side that it also accepts S!(int, string,

Re: Constructor is not callable using argument types

2017-08-08 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 06:03:06 UTC, Nrgyzer wrote: Hi guys, I've the following code: abstract class a {} class b : a { this(a* myAttr = null) {} } class c : a { this(a* myAttr = null) {} } void main() { auto myb = new b(); auto myc = new c(); } DMD says "Constructor c.this(a*

Re: rename file, execute os, etc at compile time

2017-08-08 Thread Johnson Jones via Digitalmars-d-learn
On Monday, 7 August 2017 at 12:39:31 UTC, lobo wrote: On Monday, 7 August 2017 at 00:07:26 UTC, Johnson Jones wrote: On Sunday, 6 August 2017 at 23:11:56 UTC, Nicholas Wilson wrote: On Sunday, 6 August 2017 at 19:56:06 UTC, Johnson Jones wrote: [...] It is deliberately not possible.

Constructor is not callable using argument types

2017-08-08 Thread Nrgyzer via Digitalmars-d-learn
Hi guys, I've the following code: abstract class a {} class b : a { this(a* myAttr = null) {} } class c : a { this(a* myAttr = null) {} } void main() { auto myb = new b(); auto myc = new c(); } DMD says "Constructor c.this(a* myAttr = null) is not callable using argument types (b*)".

Re: x64 build time 3x slower?

2017-08-08 Thread Johnson Jones via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 00:01:05 UTC, Johnson Jones wrote: On Monday, 7 August 2017 at 22:56:37 UTC, Moritz Maxeiner wrote: On Monday, 7 August 2017 at 22:19:57 UTC, Johnson Jones wrote: Why would that be. Program take about 4 seconds to compile and 12 for x64. There is fundamentally no

[Issue 17428] [scope] class field assignment allows to escape scope parameters

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17428 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/16a922f0864569b669b65448cf647de0c605e41d fix Issue 17428 - [scope] class field assignment allows to

[Issue 17428] [scope] class field assignment allows to escape scope parameters

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17428 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: Get Dll functions at compile time

2017-08-08 Thread Johnson Jones via Digitalmars-d-learn
On Wednesday, 9 August 2017 at 02:11:13 UTC, Johnson Jones wrote: I like to create code that automates much of the manual labor that we, as programmers, are generally forced to do. D generally makes much of this work automatable. For example, I have created the following code which makes

Re: Visual Studio Code code-d serve-d beta release

2017-08-08 Thread Dmitry via Digitalmars-d-announce
On Tuesday, 8 August 2017 at 17:13:18 UTC, WebFreak001 wrote: Use my other extension `code-debug` (or `Native Debug`) for that Is there somebody who used it successfully on Windows?

Why does stringof not like functions with arguments?

2017-08-08 Thread Jason Brady via Digitalmars-d-learn
Why does the following code error out with: app.d(12,10): Error: function app.FunctionWithArguments (uint i) is not callable using argument types () Code: import std.stdio; void FunctionWithoutArguments() { } void FunctionWithArguments(uint i) { } void main() {

Get Dll functions at compile time

2017-08-08 Thread Johnson Jones via Digitalmars-d-learn
I like to create code that automates much of the manual labor that we, as programmers, are generally forced to do. D generally makes much of this work automatable. For example, I have created the following code which makes loading dlls similar to libs: /* Import DLL functions in to type T.

Is it's possible to make modular pug template in vibed?

2017-08-08 Thread Suliman via Digitalmars-d-learn
For example I am making simple site with header and footer. header and footer will be same for all pages. I do not want to do copy-paste it in every page. I want write it's once and than simpy import in every page. Is it's possible to do with vibed?

Re: Is it's possible to make modular pug template in vibed?

2017-08-08 Thread Suliman via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 11:55:09 UTC, Suliman wrote: For example I am making simple site with header and footer. header and footer will be same for all pages. I do not want to do copy-paste it in every page. I want write it's once and than simpy import in every page. Is it's possible to

Re: Is it's possible to make modular pug template in vibed?

2017-08-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/8/17 8:38 AM, Suliman wrote: On Tuesday, 8 August 2017 at 11:59:38 UTC, Suliman wrote: On Tuesday, 8 August 2017 at 11:55:09 UTC, Suliman wrote: For example I am making simple site with header and footer. header and footer will be same for all pages. I do not want to do copy-paste it in

Re: Is it's possible to make modular pug template in vibed?

2017-08-08 Thread Suliman via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 11:59:38 UTC, Suliman wrote: On Tuesday, 8 August 2017 at 11:55:09 UTC, Suliman wrote: For example I am making simple site with header and footer. header and footer will be same for all pages. I do not want to do copy-paste it in every page. I want write it's once

[Issue 17680] Broken ddmd source links in documentation

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17680 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/2501a047179eba522a73a91bd049d63772d5f48f Use DDoc syntax for license links Partial fix for Issue

[Issue 17733] idup fails for structs/classes with member functions

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17733 Steven Schveighoffer changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 17734] __traits(isRef) cannot currently be used to distinguish l-value from r-value passing of `this`

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17734 Steven Schveighoffer changed: What|Removed |Added CC|

Calling C++ "void foo(Klass&)"

2017-08-08 Thread Johan Engelen via Digitalmars-d
Hi all, Currently, it is not possible to call the C++ function "void foo(Klass&)" when Klass is an extern(C++) _class_ on the D side. You have to declare Klass as a D _struct_, otherwise there is no way to get the correct mangling. When Klass has virtual functions, you're hosed. For more

Re: Netflix opensources its first D library: Vectorflow

2017-08-08 Thread Nordlöw via Digitalmars-d-announce
On Tuesday, 8 August 2017 at 18:40:08 UTC, Nordlöw wrote: On Thursday, 3 August 2017 at 04:40:05 UTC, Matt wrote: Also note, one of the main advantages of Eigen is the whole lazy evaluation of expressions for compound operations. I haven't dug in the source, but it's my understanding it's

Re: Express "Class argument may not be null" ?

2017-08-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/8/17 2:34 PM, Johan Engelen wrote: Hi all, How would you express the function interface intent that a reference to a class may not be null? For a function "void foo(Klass)", calling "foo(null)" is valid. How do I express that that is invalid? (let's leave erroring with a compile error

Re: Express "Class argument may not be null" ?

2017-08-08 Thread ag0aep6g via Digitalmars-d-learn
On 08/08/2017 08:34 PM, Johan Engelen wrote: How would you express the function interface intent that a reference to a class may not be null? For a function "void foo(Klass)", calling "foo(null)" is valid. How do I express that that is invalid? (let's leave erroring with a compile error

[Issue 17734] New: __traits(isRef) cannot currently be used to distinguish l-value from r-value passing of `this`

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17734 Issue ID: 17734 Summary: __traits(isRef) cannot currently be used to distinguish l-value from r-value passing of `this` Product: D Version: D2 Hardware: All OS:

Express "Class argument may not be null" ?

2017-08-08 Thread Johan Engelen via Digitalmars-d-learn
Hi all, How would you express the function interface intent that a reference to a class may not be null? For a function "void foo(Klass)", calling "foo(null)" is valid. How do I express that that is invalid? (let's leave erroring with a compile error aside for now) Something equivalent to

Re: Netflix opensources its first D library: Vectorflow

2017-08-08 Thread Nordlöw via Digitalmars-d-announce
On Thursday, 3 August 2017 at 04:40:05 UTC, Matt wrote: Also note, one of the main advantages of Eigen is the whole lazy evaluation of expressions for compound operations. I haven't dug in the source, but it's my understanding it's done through a lot of compile time C++ template hacking

Re: Jetbrains announce support for rust plugin, show them we want one too!

2017-08-08 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 8 August 2017 at 15:40:08 UTC, Ryion wrote: On Sunday, 6 August 2017 at 19:15:59 UTC, bachmeier wrote: Your claim to have limited D skills doesn't prevent you from writing a blog post detailing the things that are missing for Windows development and showing how other languages deal

[Issue 17733] idup fails for structs/classes with member functions

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17733 Anton Fediushin changed: What|Removed |Added Component|druntime|dmd --

Re: Specify dmd or ldc compiler and version in a json dub file?

2017-08-08 Thread data pulverizer via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 09:21:54 UTC, Moritz Maxeiner wrote: On Tuesday, 8 August 2017 at 09:17:02 UTC, data pulverizer wrote: Hi, I would like to know how to specify dmd or ldc compiler and version in a json dub file. Thanks in advance. You can't [1]. You can specify the compiler to

Re: DMD license question

2017-08-08 Thread Joakim via Digitalmars-d
On Tuesday, 8 August 2017 at 08:55:51 UTC, Jacob Carlborg wrote: On 2017-08-07 23:56, Joakim wrote: Yes, the idea of the Boost Software License is that you don't have to ask such questions. Boost allows you to do anything you want with the source, whether embedding, modifying, etc. and you

[Issue 4271] drop/pop methods for std.algorithm.BinaryHeap

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4271 RazvanN changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Issue 17732] New: SysTime.init.toString segfaults because timezone is null

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17732 Issue ID: 17732 Summary: SysTime.init.toString segfaults because timezone is null Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: Specify dmd or ldc compiler and version in a json dub file?

2017-08-08 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 09:31:49 UTC, data pulverizer wrote: On Tuesday, 8 August 2017 at 09:21:54 UTC, Moritz Maxeiner wrote: On Tuesday, 8 August 2017 at 09:17:02 UTC, data pulverizer wrote: Hi, I would like to know how to specify dmd or ldc compiler and version in a json dub file.

Re: Specify dmd or ldc compiler and version in a json dub file?

2017-08-08 Thread data pulverizer via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 09:51:40 UTC, Moritz Maxeiner wrote: If your code depends on capabilities of a specific D compiler, I wouldn't depend on build tools for that, I'd make it clear in the source code via conditional compilation [1]: --- version (DigitalMars) { } else version (LDC) {

[Issue 17731] dman fails to build due to more than 32767 symbols

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17731 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/installer https://github.com/dlang/installer/commit/ef720edff651d8d2c2c20d39940f9162f73d2f3e disable dman to workaround Issue 17731

Re: Is it's possible to make modular pug template in vibed?

2017-08-08 Thread Suliman via Digitalmars-d-learn
Yes, thanks what: extends layout mean?

Re: Who here uses vibe-s3 from code.dlang.org?

2017-08-08 Thread aberba via Digitalmars-d
On Tuesday, 8 August 2017 at 08:49:33 UTC, Andre Pany wrote: On Monday, 7 August 2017 at 22:46:57 UTC, aberba wrote: [...] I created a generator which uses the JS Api definitions https://github.com/aws/aws-sdk-js/tree/master/apis to create D structs and classes. Instead of calling the rest

Re: Is it's possible to make modular pug template in vibed?

2017-08-08 Thread Suliman via Digitalmars-d-learn
Still can't get it work. include header .MainContainer .Header .HeaderMenu .HeaderBlock a(href="/") General .HeaderBlock a(href="/FAQ") FAQ .HeaderBlock a(href="/book") Book .HeaderLoginBlock Sign in .Middle f include footer it's template is compilable,

Re: Is it's possible to make modular pug template in vibed?

2017-08-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/8/17 9:10 AM, Suliman wrote: Yes, thanks what: extends layout mean? It means that your final file will be layout.dt, but with the block statements replaced with the contents defined by the specific view file. Think of it like an interface, where the "blocks" are function prototypes,

Re: Is it's possible to make modular pug template in vibed?

2017-08-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/8/17 9:19 AM, Suliman wrote: Still can't get it work. include header ..MainContainer ..Header .HeaderMenu .HeaderBlock a(href="/") General .HeaderBlock a(href="/FAQ") FAQ .HeaderBlock a(href="/book") Book .HeaderLoginBlock Sign in ..Middle f

Re: Is it's possible to make modular pug template in vibed?

2017-08-08 Thread Suliman via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 13:22:58 UTC, Steven Schveighoffer wrote: On 8/8/17 9:10 AM, Suliman wrote: Yes, thanks what: extends layout mean? It means that your final file will be layout.dt, but with the block statements replaced with the contents defined by the specific view file.

Re: DMD license question

2017-08-08 Thread meppl via Digitalmars-d
On Monday, 7 August 2017 at 21:28:52 UTC, Andre Pany wrote: Hi, as DMD is now under Boost Software License, can I distribute it as part of my commercial product? I want to provide script support within my application. The idea is to compile the scripts (D coding) to shared libraries and

Re: Release D 2.075.0

2017-08-08 Thread Moritz Maxeiner via Digitalmars-d-announce
On Wednesday, 19 July 2017 at 15:36:22 UTC, Martin Nowak wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Glad to announce D 2.075.0. This release comes with various phobos additions, a repackaged std.datetime, configurable Fiber stack guard pages (now also on Posix), and optional

Re: Visual Studio Code code-d serve-d beta release

2017-08-08 Thread Johannes Pfau via Digitalmars-d-announce
Am Tue, 08 Aug 2017 17:13:18 + schrieb WebFreak001 : > On Tuesday, 8 August 2017 at 08:03:05 UTC, Arjan wrote: > > Small request: could the setting "d.stdlibPath" be inferred > > from the compiler in use? DMD and LDC both have a conf file in > > which the paths are

[Issue 17731] dman fails to build due to more than 32767 symbols

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17731 --- Comment #5 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/b64a108e7866874d172f9b05fd82716997a1 chmgen: Emit d.tag in JSON syntax too Partial fix

Re: Visual Studio Code code-d serve-d beta release

2017-08-08 Thread Arjan via Digitalmars-d-announce
On Tuesday, 8 August 2017 at 17:27:30 UTC, Johannes Pfau wrote: Am Tue, 08 Aug 2017 17:13:18 + schrieb WebFreak001 : On Tuesday, 8 August 2017 at 08:03:05 UTC, Arjan wrote: > Small request: could the setting "d.stdlibPath" be inferred > from the compiler in use? DMD

Re: Visual Studio Code code-d serve-d beta release

2017-08-08 Thread WebFreak001 via Digitalmars-d-announce
On Tuesday, 8 August 2017 at 08:03:05 UTC, Arjan wrote: Small request: could the setting "d.stdlibPath" be inferred from the compiler in use? DMD and LDC both have a conf file in which the paths are already set. oh cool I didn't know that, is there a standard path to where these conf files

[Issue 17731] dman fails to build due to more than 32767 symbols

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17731 --- Comment #6 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/tools https://github.com/dlang/tools/commit/72ab90ceadd6a421126643cef6780b8be96f5d17 dman: Use d-tags.json instead of d.tag Fixes issue 17731.

Re: [OT] Bitcoin's Split Is Good for Progress

2017-08-08 Thread deadalnix via Digitalmars-d
On Monday, 7 August 2017 at 23:45:13 UTC, Joakim wrote: On Wednesday, 2 August 2017 at 16:21:41 UTC, jmh530 wrote: I was surprised to see a familiar name here: https://www.bloomberg.com/view/articles/2017-08-02/bitcoin-s-split-is-good-for-progress Here's an interview with Amaury about the

Re: Express "Class argument may not be null" ?

2017-08-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/8/17 2:56 PM, ag0aep6g wrote: On 08/08/2017 08:34 PM, Johan Engelen wrote: How would you express the function interface intent that a reference to a class may not be null? For a function "void foo(Klass)", calling "foo(null)" is valid. How do I express that that is invalid? (let's

Re: Express "Class argument may not be null" ?

2017-08-08 Thread Johan Engelen via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 18:57:48 UTC, Steven Schveighoffer wrote: On 8/8/17 2:34 PM, Johan Engelen wrote: Hi all, How would you express the function interface intent that a reference to a class may not be null? For a function "void foo(Klass)", calling "foo(null)" is valid. How do I

Re: Express "Class argument may not be null" ?

2017-08-08 Thread Johan Engelen via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 19:38:19 UTC, Steven Schveighoffer wrote: Note that C++ also can do this, so I'm not sure the & is accomplishing the correct goal: void foo(Klass&); int main() { Klass *k = NULL; foo(*k); } In C++, it is clear that the _caller_ is doing the

[Issue 2898] Allow RandomCover to sample both w/ and w/o replacement.

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2898 Andrei Alexandrescu changed: What|Removed |Added Status|NEW |RESOLVED

Re: Express "Class argument may not be null" ?

2017-08-08 Thread Andre Kostur via Digitalmars-d-learn
On 2017-08-08 12:38 PM, Steven Schveighoffer wrote: On 8/8/17 2:56 PM, ag0aep6g wrote: On 08/08/2017 08:34 PM, Johan Engelen wrote: How would you express the function interface intent that a reference to a class may not be null? For a function "void foo(Klass)", calling "foo(null)" is

[Issue 17734] __traits(isRef) cannot currently be used to distinguish l-value from r-value passing of `this`

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17734 Andrei Alexandrescu changed: What|Removed |Added Status|NEW |RESOLVED

Re: Efficiently streaming data to associative array

2017-08-08 Thread Anonymouse via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 16:00:17 UTC, Steven Schveighoffer wrote: I wouldn't use formattedRead, as I think this is going to allocate temporaries for a and b. What would you suggest to use in its stead? My use-case is similar to the OP's in that I have a string of tokens that I want

[Issue 17734] __traits(isRef) cannot currently be used to distinguish l-value from r-value passing of `this`

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17734 --- Comment #3 from Per Nordlöw --- (In reply to Steven Schveighoffer from comment #1) > I recommend closing, this enhancement isn't going to happen. Can anyone think of an alternative way of finding out whether or not `this`

[Issue 17734] __traits(isRef) cannot currently be used to distinguish l-value from r-value passing of `this`

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17734 --- Comment #4 from Andrei Alexandrescu --- Don't use methods. Instead, use regular functions with UFCS and overload on ref and non-ref to distinguish rvalues from rvalues. --

Re: Specify dmd or ldc compiler and version in a json dub file?

2017-08-08 Thread Joakim via Digitalmars-d-learn
On Tuesday, 8 August 2017 at 10:07:54 UTC, data pulverizer wrote: On Tuesday, 8 August 2017 at 09:51:40 UTC, Moritz Maxeiner wrote: If your code depends on capabilities of a specific D compiler, I wouldn't depend on build tools for that, I'd make it clear in the source code via conditional

[Issue 17734] __traits(isRef) cannot currently be used to distinguish l-value from r-value passing of `this`

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17734 --- Comment #5 from Per Nordlöw --- (In reply to Andrei Alexandrescu from comment #4) > Don't use methods. Instead, use regular functions with UFCS and overload on > ref and non-ref to distinguish rvalues from rvalues. But

Re: Express "Class argument may not be null" ?

2017-08-08 Thread Adam D. Ruppe via Digitalmars-d-learn
I was about to say "use NotNull" but there still isn't one in std.typecons. ugh. But it is just a wrapper type that checks null in the contracts too, so you can do it at the function itself.

Re: Beta D 2.075.1

2017-08-08 Thread Martin Nowak via Digitalmars-d-announce
On Tuesday, 8 August 2017 at 15:45:45 UTC, Vladimir Panteleev wrote: On Tuesday, 8 August 2017 at 14:57:58 UTC, Daniel Kozak wrote: https://issues.dlang.org/show_bug.cgi?id=17731 Thanks. I've submitted a fix. Thanks, considering https://issues.dlang.org/show_bug.cgi?id=17569 I'd still say

[Issue 17569] Rename dman in the Debian .deb package to prevent conflict with Debian package debian-goodies

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17569 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu --- Comment #1

Thread sequencer

2017-08-08 Thread Johnson Jones via Digitalmars-d-learn
I'm wondering if there is an easy way to create a single extra thread that one can pass delegates(code) to and it executes it properly. The thread never closes except at shutdown. The idea is that isn't of creating one thread per task, there is one thread that executes each task. Obviously

[Issue 17734] __traits(isRef) cannot currently be used to distinguish l-value from r-value passing of `this`

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17734 --- Comment #6 from Andrei Alexandrescu --- (In reply to Per Nordlöw from comment #5) > (In reply to Andrei Alexandrescu from comment #4) > > Don't use methods. Instead, use regular functions with UFCS and overload on > > ref and

Re: DMD license question

2017-08-08 Thread Jacob Carlborg via Digitalmars-d
On 2017-08-08 16:28, meppl wrote: in case your main application is written in D, too: how do you avoid symbol name collisions? D symbols are mangled to include the package and module name. That will make a collision less likely. -- /Jacob Carlborg

readText with added null-terminator that enables sentinel-based search

2017-08-08 Thread Nordlöw via Digitalmars-d-learn
Has anybody written a wrapper around `std.file.readText` (or similar) that appends a final zero-byte terminator in order to realize sentinel-based search in textual parsers.

Re: Calling C++ "void foo(Klass&)"

2017-08-08 Thread Jacob Carlborg via Digitalmars-d
On 2017-08-08 20:51, Johan Engelen wrote: Hi all, Currently, it is not possible to call the C++ function "void foo(Klass&)" when Klass is an extern(C++) _class_ on the D side. You have to declare Klass as a D _struct_, otherwise there is no way to get the correct mangling. When Klass has

Efficiently streaming data to associative array

2017-08-08 Thread Guillaume Chatelet via Digitalmars-d-learn
Let's say I'm processing MB of data, I'm lazily iterating over the incoming lines storing data in an associative array. I don't want to copy unless I have to. Contrived example follows: input file -- a,b,15 c,d,12 ... Efficient ingestion --- void main() {

Re: Jetbrains announce support for rust plugin, show them we want one too!

2017-08-08 Thread Ryion via Digitalmars-d
On Sunday, 6 August 2017 at 19:15:59 UTC, bachmeier wrote: Your claim to have limited D skills doesn't prevent you from writing a blog post detailing the things that are missing for Windows development and showing how other languages deal with them. A lot of work with tooling doesn't require D

[Issue 17731] dman fails to build due to more than 32767 symbols

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17731 Vladimir Panteleev changed: What|Removed |Added Keywords||pull

Re: Beta D 2.075.1

2017-08-08 Thread Vladimir Panteleev via Digitalmars-d-announce
On Tuesday, 8 August 2017 at 14:57:58 UTC, Daniel Kozak wrote: https://issues.dlang.org/show_bug.cgi?id=17731 Thanks. I've submitted a fix.

Re: Is it's possible to make modular pug template in vibed?

2017-08-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/8/17 10:52 AM, Suliman wrote: your examples generate me: DLANG.ru (c) DLANG 2017 That's the template without the block. The only one modification that I did I changes pages names:

  1   2   >