Re: How to convert this function into a template ?

2018-10-02 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 17:37:58 UTC, Ali Çehreli wrote: On 10/02/2018 07:39 AM, Vinod K Chandran wrote: > Thanks a lot. Great help !. I will sure the check the link. :) I find the Index section useful (yes, can be improved). For example, just seach for "append" on this page:

Re: How to implement D to HTML pages ?

2018-10-02 Thread bauss via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 18:27:04 UTC, Aurélien Plazzotta wrote: On Tuesday, 2 October 2018 at 06:56:33 UTC, bauss wrote: On Monday, 1 October 2018 at 23:17:59 UTC, rjframe wrote: vibe.d has more of a node.js feel. There's also DiamondMVC[1], which reminds me of ASP.NET (I'm not 100%

Just found this debugger...

2018-10-02 Thread solidstate1991 via Digitalmars-d
I wanted to do some work on lzbacon (D port of lzham-codec with some extras such as tarball support), but without a debugger it's pretty hard (I suspect an error in the multithreading when looking up for a value, or some C++ language quirk I missed). The current state of mago-mi is nearly

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Adam Wilson via Digitalmars-d
On 10/2/18 4:34 AM, Joakim wrote: On Tuesday, 2 October 2018 at 09:39:14 UTC, Adam Wilson wrote: On 10/1/18 11:26 PM, Joakim wrote: [snip] I disagree. It is not clear what you disagree with, since almost nothing you say has any bearing on my original post. To summarize, I suggest changing

Re: Dynamic Minimum width with Format / writefln

2018-10-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 3 October 2018 at 01:14:24 UTC, Chris Katko wrote: I'm not sure how I made this mistake. But it seems to only show up now if I leave .toStringz() with the writefln. Yeah. So what's happening here is toStringz returns the C-style char*, which printf works well with, but writef

Re: Dynamic Minimum width with Format / writefln

2018-10-02 Thread Chris Katko via Digitalmars-d-learn
On Wednesday, 3 October 2018 at 00:34:33 UTC, Adam D. Ruppe wrote: On Wednesday, 3 October 2018 at 00:14:03 UTC, Chris Katko wrote: Except it doesn't work and tries to decode col.width-1 into a hexadecimal number and only prints that. ("4D6EF6") That number certainly isn't col.width (unless

Re: DIP 1014

2018-10-02 Thread Walter Bright via Digitalmars-d
On 10/2/2018 4:30 PM, Adam D. Ruppe wrote: On Tuesday, 2 October 2018 at 22:30:38 UTC, Jonathan M Davis wrote: Yeah. IIRC, it was supposed to be _guaranteed_ that the compiler moved structs in a number of situations - e.g. when the return value was an rvalue. Something like Eh, I don't think

Re: Dynamic Minimum width with Format / writefln

2018-10-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 3 October 2018 at 00:14:03 UTC, Chris Katko wrote: Except it doesn't work and tries to decode col.width-1 into a hexadecimal number and only prints that. ("4D6EF6") That number certainly isn't col.width (unless you have a width of like millions)... It looks more like a

Dynamic Minimum width with Format / writefln

2018-10-02 Thread Chris Katko via Digitalmars-d-learn
- First, I'm confused. The docs say 's' is "whatever it needs to be". ("he corresponding argument is formatted in a manner consistent with its type:") But what if I specifically want a STRING. Because I only see floats, ints, etc. No forced string types. - Second, This works fine in D:

Re: DIP 1014

2018-10-02 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 2 October 2018 at 22:30:38 UTC, Jonathan M Davis wrote: Yeah. IIRC, it was supposed to be _guaranteed_ that the compiler moved structs in a number of situations - e.g. when the return value was an rvalue. Something like Eh, I don't think that moves it, but rather just constructs

[Issue 19257] std.array.join does not handle const fields that cannot be converted to mutable

2018-10-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19257 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/7a32298747de7e0b302d39f8c836eef84a9b9e8c Fix issue 19257: Only remove const on .join if you can

[Issue 19257] std.array.join does not handle const fields that cannot be converted to mutable

2018-10-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19257 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: Dlang tour - Unittesting example

2018-10-02 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/2/18 8:30 AM, Joe wrote: On Tuesday, 2 October 2018 at 12:25:19 UTC, Joe wrote: On Tuesday, 2 October 2018 at 09:59:28 UTC, bauss wrote: On Tuesday, 2 October 2018 at 04:13:01 UTC, Joe wrote: There appears to be a problem with the example at

Re: DIP 1014

2018-10-02 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, October 2, 2018 11:54:57 AM MDT Manu via Digitalmars-d wrote: > On Tue, Oct 2, 2018 at 2:40 AM Walter Bright via Digitalmars-d > > wrote: > > On 10/2/2018 2:17 AM, Walter Bright wrote: > > > 1. Don't allow moving of C++ structs > > > 2. Add a struct attribute that means "not moveable"

Re: `shared`...

2018-10-02 Thread Walter Bright via Digitalmars-d
On 10/2/2018 1:49 PM, Manu wrote: So... `scope` says "I won't escape this, but I may escape anything this points to"? That's right. http://dconf.org/2017/talks/bright.html

Re: GC page and block metadata storage

2018-10-02 Thread Per Nordlöw via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 09:43:02 UTC, thedeemon wrote: I guess you would want to scan the metadata without thrashing all the pages. Keeping metadata together compactly is good for cache. Can you briefly elaborate on what use case(s) you hade in mind when you wrote this?

[Issue 19284] alias this not used in nested functions of a method

2018-10-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19284 Eyal changed: What|Removed |Added Severity|enhancement |major --

[Issue 19285] New: false positive GC inferred

2018-10-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19285 Issue ID: 19285 Summary: false positive GC inferred Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: major Priority: P1

Re: Quick C bindings

2018-10-02 Thread solidstate1991 via Digitalmars-d
I would also like something, but for the C11 runtime, as it's essential for mago (uses it for unicode strings, rewriting them for Phobos would take too much time, and I've already ran out of time).

[Issue 19284] New: alias this not used in nested functions of a method

2018-10-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19284 Issue ID: 19284 Summary: alias this not used in nested functions of a method Product: D Version: D2 Hardware: All URL: http://dlang.org/ OS: All Status:

Re: Linking with a non-default druntime

2018-10-02 Thread Per Nordlöw via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 16:20:52 UTC, Basile B. wrote: This works https://github.com/BBasile/druntime/pull/1. Not sure if it will be useful. Ahh, thanks! I've just found my own way of iterating via a script at https://github.com/nordlow/scripts/blob/master/dmd-own that

Re: Deep nesting vs early returns

2018-10-02 Thread Faux Amis via Digitalmars-d
On 2018-10-02 21:09, Jacob Carlborg wrote: On 2018-10-02 20:14, Andrei Alexandrescu wrote: Kate Gregory makes a good argument on something I've often commented in code reviews: https://youtu.be/n0Ak6xtVXno?t=2682 Swift has the "guard" statement to help with early returns (and unwrap

Re: `shared`...

2018-10-02 Thread Manu via Digitalmars-d
On Tue, Oct 2, 2018 at 12:45 AM Walter Bright via Digitalmars-d wrote: > > On 10/1/2018 7:31 PM, Manu wrote: > > Surely `scope` must be transitive? > > It isn't. > > > How could it work otherwise? > > It's a storage class, not a type constructor. There is no "pointer to scope" > type, for

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 10/02/2018 02:26 AM, Joakim wrote: I'm sure some thought and planning is now going into the next DConf, so I'd like to make sure people are aware that the conference format that DConf uses is dying off, as explained here: https://marco.org/2018/01/17/end-of-conference-era People are now

Re: Warn on unused imports?

2018-10-02 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 10/01/2018 11:00 PM, Jonathan M Davis wrote: The very fact that we have -w causes problems, because it forks the language. e.g. anyone that doesn't compile a library with -wi or -w and then releases it with dub can cause problems when someone else uses that project and then _does_ compile

[Issue 9239] x86_64 ABI: 3 byte structs are never enregistered

2018-10-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9239 ki...@gmx.net changed: What|Removed |Added CC||ki...@gmx.net --- Comment #1 from

[Issue 19283] [std.mathspecial] documentation for normal distribution doesn't list parameters

2018-10-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19283 Ray Kulhanek changed: What|Removed |Added CC||kulhane...@wright.edu --

[Issue 19283] New: [std.mathspecial] documentation for normal distribution doesn't list parameters

2018-10-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19283 Issue ID: 19283 Summary: [std.mathspecial] documentation for normal distribution doesn't list parameters Product: D Version: D2 Hardware: All URL:

Re: Deep nesting vs early returns

2018-10-02 Thread Jacob Carlborg via Digitalmars-d
On 2018-10-02 20:14, Andrei Alexandrescu wrote: Kate Gregory makes a good argument on something I've often commented in code reviews: https://youtu.be/n0Ak6xtVXno?t=2682 Swift has the "guard" statement to help with early returns (and unwrap optionals).

Re: Yet another binding generator (WIP)

2018-10-02 Thread Jacob Carlborg via Digitalmars-d
On 2018-10-02 03:25, evilrat wrote: To be honest I don't know. Also dstep is written in D and using only 'stable' clang C API, right? Yes. This tool is based on full 'unstable' C++ API, so in theory it is possible to do broader range of features, such as template substitution for wrapper

Re: Quick C bindings

2018-10-02 Thread Jacob Carlborg via Digitalmars-d
On 2018-09-29 20:29, Arun Chandrasekaran wrote: Dstep has got better. Give it a try now. Yes, it's gone through some major changes. Please compile from master if you give it a try. -- /Jacob Carlborg

Re: Wrong module initialization order when building with Dub on Windows?

2018-10-02 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-10-02 08:49, bauss wrote: Honestly I would say that it should have worked regardless of the module order, because it's the runtime arguments. Basically D's runtime should set them before ANY module constructors are called and most definitely before the main function is called. They

Re: printed v0.0.3: a low-level API to generate self-contained PDF/SVG

2018-10-02 Thread Cristian Vasile via Digitalmars-d-announce
On Monday, 1 October 2018 at 09:34:34 UTC, Guillaume Piolat wrote: printed is a low-level API to generate self-contained PDF 1.4/SVG 1.1 documents hopefully suitable for print. Currently it does not provide any "layout" option, you are just provided a sort of 2D Canvas API which can then

Re: How to implement D to HTML pages ?

2018-10-02 Thread Aurélien Plazzotta via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 06:56:33 UTC, bauss wrote: On Monday, 1 October 2018 at 23:17:59 UTC, rjframe wrote: vibe.d has more of a node.js feel. There's also DiamondMVC[1], which reminds me of ASP.NET (I'm not 100% sure whether that's intentional, and I haven't tried Diamond) and

Re: DIP 1014

2018-10-02 Thread Andrei Alexandrescu via Digitalmars-d
On 10/2/18 1:51 PM, Manu wrote: But dangling pointer is an instant crash/memory corruption... it's a pretty bad 'bug'. Yeah doesn't sound very brilliant. I think such a workaround wouldn't fare well. To keep momentum while we mull over a solution to this I suggest you look at porting other

Deep nesting vs early returns

2018-10-02 Thread Andrei Alexandrescu via Digitalmars-d
Kate Gregory makes a good argument on something I've often commented in code reviews: https://youtu.be/n0Ak6xtVXno?t=2682

Re: DIP 1014

2018-10-02 Thread Manu via Digitalmars-d
On Tue, Oct 2, 2018 at 2:40 AM Walter Bright via Digitalmars-d wrote: > > On 10/2/2018 2:17 AM, Walter Bright wrote: > > 1. Don't allow moving of C++ structs > > 2. Add a struct attribute that means "not moveable" > > 3. DIP 1014, which is add a __move_post_blit() function (most complex > >

Re: DIP 1014

2018-10-02 Thread Manu via Digitalmars-d
On Tue, Oct 2, 2018 at 2:20 AM Walter Bright via Digitalmars-d wrote: > > On 9/29/2018 9:34 PM, Manu wrote: > > Who knows about DIP 1014? (struct move hook) > > Is it well received? Is it likely to be accepted soon? > > > > I'm working on the std::string binding, it's almost finished... but > >

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread bauss via Digitalmars-d
On Tuesday, 2 October 2018 at 16:10:20 UTC, Johannes Loher wrote: Just to use myself as an example, last Docnf I was able to talk to Andrei, Walter, Mike, Ali, Jonathan, Kai and lots of others and exchange ideas with them. This would not have been possible with a decentralised event (except

Re: How to convert this function into a template ?

2018-10-02 Thread Ali Çehreli via Digitalmars-d-learn
On 10/02/2018 07:39 AM, Vinod K Chandran wrote: > Thanks a lot. Great help !. I will sure the check the link. :) I find the Index section useful (yes, can be improved). For example, just seach for "append" on this page: http://ddili.org/ders/d.en/ix.html > The doumentation did not tell me

Re: Dlang tour - Unittesting example

2018-10-02 Thread Joe via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 13:24:09 UTC, Basile B. wrote: The problem is the NaN madness. Since several values are NaN there's this strange stuff: void main() { import std.stdio; import std.math : isNaN; double d; writeln(d.init);// nan writeln(d); // nan

Re: Linking with a non-default druntime

2018-10-02 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 13:07:04 UTC, Basile B. wrote: On Monday, 1 October 2018 at 11:10:07 UTC, Per Nordlöw wrote: On Monday, 1 October 2018 at 08:27:54 UTC, Basile B. wrote: I think so. Apparently it's registered with a string, e.g "manual" and you pass a special druntime option with

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Johannes Loher via Digitalmars-d
On Tuesday, 2 October 2018 at 15:42:20 UTC, Joakim wrote: On Tuesday, 2 October 2018 at 15:03:45 UTC, Adam D. Ruppe wrote: That is what Joakim is talking about - changing the main event to be more like the after-hours stuff everyone loves so much, to actually use all the time to maximize the

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Joakim via Digitalmars-d
On Tuesday, 2 October 2018 at 15:03:45 UTC, Adam D. Ruppe wrote: That is what Joakim is talking about - changing the main event to be more like the after-hours stuff everyone loves so much, to actually use all the time to maximize the potential of in-person time. I'm talking about growing

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Joakim via Digitalmars-d
On Tuesday, 2 October 2018 at 14:49:31 UTC, bachmeier wrote: On Tuesday, 2 October 2018 at 06:26:30 UTC, Joakim wrote: "Once the videos are all up, set up weekend meetups in several cities [all over the world], where a few livestreamed talks may talk place if some speakers don't want to spend

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 2 October 2018 at 14:49:31 UTC, bachmeier wrote: I believe it would be a mistake to drop DConf. What about we design a DConf that focuses on interactive collaboration instead of sitting passively in a room watching someone talk over a slideshow? When Joakim talked about this

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread bachmeier via Digitalmars-d
On Tuesday, 2 October 2018 at 06:26:30 UTC, Joakim wrote: "Once the videos are all up, set up weekend meetups in several cities [all over the world], where a few livestreamed talks may talk place if some speakers don't want to spend more time producing a pre-recorded talk, but most time is

Re: How to convert this function into a template ?

2018-10-02 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 12:23:47 UTC, Jonathan M Davis wrote: The template equivalent would have been something like void arrayAdd(T)(ref T[] x, T value) { auto index = x.length; x.length += 1; x[index] = value; } But if you're new to the language, I'd suggest that you read

Re: Wrong module initialization order when building with Dub on Windows?

2018-10-02 Thread Kagamin via Digitalmars-d-learn
Missing command line arguments? Sounds like this: https://forum.dlang.org/post/eevaqbqufmhhducua...@forum.dlang.org

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread ShadoLight via Digitalmars-d
[snip] However constructive your alternate proposals are, I suspect people are misreading your title (and it is easy to assume, just from the OP title, that you actually want to get 'get rid of' DConf, rather than just 'modify' and 'improve' DConf. Personally I feel there is a cognitive

Re: Dlang tour - Unittesting example

2018-10-02 Thread ag0aep6g via Digitalmars-d-learn
On 10/02/2018 03:24 PM, Basile B. wrote: The problem is the NaN madness. Since several values are NaN there's this strange stuff: void main() {     import std.stdio;     import std.math : isNaN;     double d;     writeln(d.init);    // nan     writeln(d); // nan    

Re: Dlang tour - Unittesting example

2018-10-02 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 12:30:36 UTC, Joe wrote: On Tuesday, 2 October 2018 at 12:25:19 UTC, Joe wrote: On Tuesday, 2 October 2018 at 09:59:28 UTC, bauss wrote: On Tuesday, 2 October 2018 at 04:13:01 UTC, Joe wrote: There appears to be a problem with the example at

Re: Linking with a non-default druntime

2018-10-02 Thread Basile B. via Digitalmars-d-learn
On Monday, 1 October 2018 at 11:10:07 UTC, Per Nordlöw wrote: On Monday, 1 October 2018 at 08:27:54 UTC, Basile B. wrote: I think so. Apparently it's registered with a string, e.g "manual" and you pass a special druntime option with your program to select. Actually i would be interested to

Re: Dlang tour - Unittesting example

2018-10-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, October 2, 2018 3:59:28 AM MDT bauss via Digitalmars-d-learn wrote: > On Tuesday, 2 October 2018 at 04:13:01 UTC, Joe wrote: > > There appears to be a problem with the example at > > > > https://tour.dlang.org/tour/en/gems/unittesting > > > > If compiled with -unittest, the resulting

Re: Dlang tour - Unittesting example

2018-10-02 Thread Joe via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 12:25:19 UTC, Joe wrote: On Tuesday, 2 October 2018 at 09:59:28 UTC, bauss wrote: On Tuesday, 2 October 2018 at 04:13:01 UTC, Joe wrote: There appears to be a problem with the example at https://tour.dlang.org/tour/en/gems/unittesting If compiled with -unittest,

Re: Dlang tour - Unittesting example

2018-10-02 Thread Joe via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 09:59:28 UTC, bauss wrote: On Tuesday, 2 October 2018 at 04:13:01 UTC, Joe wrote: There appears to be a problem with the example at https://tour.dlang.org/tour/en/gems/unittesting If compiled with -unittest, the resulting program crashes. It happens with ldc2 on

Re: How to convert this function into a template ?

2018-10-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, October 2, 2018 6:09:53 AM MDT Vinod K Chandran via Digitalmars- d-learn wrote: > On Tuesday, 2 October 2018 at 11:49:06 UTC, Jonathan M Davis > > wrote: > > Why do you have a function for that? All you need to do is use > > the append operator. e.g. > > > > x ~= value; > > > > -

Re: How to convert this function into a template ?

2018-10-02 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 11:49:06 UTC, Jonathan M Davis wrote: Why do you have a function for that? All you need to do is use the append operator. e.g. x ~= value; - Jonathan M Davis Thanks for the reply. I did not find that it in documentation. Ofcourse i lost a chance to learn

Re: How to convert this function into a template ?

2018-10-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, October 2, 2018 5:40:18 AM MDT Vinod K Chandran via Digitalmars- d-learn wrote: > Hi all, > I have a function and i want to convert this into a template so > that i can use this function for more than one data type. > This is my function. > ```D > void ArrayAdd( ref int[] x, int value)

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Joakim via Digitalmars-d
On Tuesday, 2 October 2018 at 10:37:44 UTC, Nicholas Wilson wrote: On Tuesday, 2 October 2018 at 06:26:30 UTC, Joakim wrote: [...] As I'm sure has been said before, if it were just the talks it probably wouldn't be worth it. But conferences are sooo much more than just the talks.

How to convert this function into a template ?

2018-10-02 Thread Vinod K Chandran via Digitalmars-d-learn
Hi all, I have a function and i want to convert this into a template so that i can use this function for more than one data type. This is my function. ```D void ArrayAdd( ref int[] x, int value) { int index = x.length ; x.length += 1 ; x[index] = value ; } ```

Re: Does the WInMain function is mandatory ?

2018-10-02 Thread Vinod K Chandran via Digitalmars-d-learn
On Sunday, 30 September 2018 at 15:06:31 UTC, Mike Parker wrote: On Sunday, 30 September 2018 at 14:06:20 UTC, Vinod K Chandran wrote: Thanks. It worked. I would like to compile this as a gui. Now it starts with the cmd. Google search didn't gave me the link i want. Any help ? With the

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Joakim via Digitalmars-d
On Tuesday, 2 October 2018 at 09:39:14 UTC, Adam Wilson wrote: On 10/1/18 11:26 PM, Joakim wrote: [snip] I disagree. It is not clear what you disagree with, since almost nothing you say has any bearing on my original post. To summarize, I suggest changing the currently talk-driven DConf

Re: Use nested functions as callbacks with Windows API functions?

2018-10-02 Thread John Chapman via Digitalmars-d-learn
On Monday, 1 October 2018 at 20:27:43 UTC, spikespaz wrote: Of course there is nothing wrong with defining each callback as a separate function, but then comes the issue of naming them. I also don't like the way it makes my code look. I think the best you can do is something like this: ---

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Nicholas Wilson via Digitalmars-d
On Tuesday, 2 October 2018 at 06:26:30 UTC, Joakim wrote: [snip] Also you're out by a year :)

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Nicholas Wilson via Digitalmars-d
On Tuesday, 2 October 2018 at 06:26:30 UTC, Joakim wrote: I'm sure some thought and planning is now going into the next DConf, so I'd like to make sure people are aware that the conference format that DConf uses is dying off, as explained here:

Re: Dlang tour - Unittesting example

2018-10-02 Thread bauss via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 04:13:01 UTC, Joe wrote: There appears to be a problem with the example at https://tour.dlang.org/tour/en/gems/unittesting If compiled with -unittest, the resulting program crashes. It happens with ldc2 on Linux but it can also be seen if you click on "Export"

Re: GC page and block metadata storage

2018-10-02 Thread thedeemon via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 07:25:36 UTC, Per Nordlöw wrote: Should a new fresh GC for D store block metadata inside the page itself or in a (pool) structure separate from the page? I'm already aware of Dmitry's suggestion to separate value-type pools from pools of types possibly containing

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Adam Wilson via Digitalmars-d
On 10/1/18 11:26 PM, Joakim wrote: [snip] I disagree. There is much more to the conference than just a 4-day meetup with talks. The idea that it's just the core 8-15 people with a bunch of hangers-on is patently false. It's not about the conversations I have with the "core" people. It's

Re: DIP 1014

2018-10-02 Thread Walter Bright via Digitalmars-d
On 10/2/2018 2:17 AM, Walter Bright wrote: 1. Don't allow moving of C++ structs 2. Add a struct attribute that means "not moveable" 3. DIP 1014, which is add a __move_post_blit() function (most complex solution) 4. Use copy/destruct for C++ structs that have copy constructors (this is the old

[Issue 17448] Move semantics cause memory corruption and cryptic bugs

2018-10-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17448 --- Comment #38 from Walter Bright --- DIP 1014: https://github.com/dlang/DIPs/blob/38cec74a7471735559e3b8a7553f55102d289d28/DIPs/DIP1014.md --

Re: Copy Constructor DIP and implementation

2018-10-02 Thread RazvanN via Digitalmars-d-announce
Hi all, I just pushed another version of the DIP in which the major modifications among otthers are removing implicit and use copy constructor calls in all situations where a copy is made. For more details, please visit [1] and if you have the time, please offer some feedback, Thank you,

[Issue 17448] Move semantics cause memory corruption and cryptic bugs

2018-10-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17448 --- Comment #37 from Walter Bright --- Looking at your example, I rewrote it into a nunnable form: import core.stdc.stdio; struct S { int i; this(int i) { printf("this() %d\n", i); this.i = i; } this(this) {

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Joakim via Digitalmars-d
On Tuesday, 2 October 2018 at 08:21:11 UTC, maarten van damme wrote: While I have never attended dconf itself, conferences itself usually aren't about the talks but about the people you meet and get to interact with. Since this thread is about replacing the outdated DConf format with two

Re: DIP 1014

2018-10-02 Thread Walter Bright via Digitalmars-d
On 9/29/2018 9:34 PM, Manu wrote: Who knows about DIP 1014? (struct move hook) Is it well received? Is it likely to be accepted soon? I'm working on the std::string binding, it's almost finished... but then I hit a brick wall. GNU's std::string implementation stores an interior pointer! >_<

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread bauss via Digitalmars-d
On Tuesday, 2 October 2018 at 07:32:58 UTC, Joakim wrote: Ex. for D conf there is much more than just D. There is also the minor escape from reality to new surroundings, like a mini vacation etc. Thank you for making clear that the real reason you and some others like the current format is

Re: DIP 1014

2018-10-02 Thread Walter Bright via Digitalmars-d
On 9/29/2018 9:34 PM, Manu wrote: Who knows about DIP 1014? (struct move hook) When discussing DIP 1014, a link is helpful: https://github.com/dlang/DIPs/blob/38cec74a7471735559e3b8a7553f55102d289d28/DIPs/DIP1014.md

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread maarten van damme via Digitalmars-d
While I have never attended dconf itself, conferences itself usually aren't about the talks but about the people you meet and get to interact with. Op di 2 okt. 2018 om 10:15 schreef Joakim via Digitalmars-d < digitalmars-d@puremagic.com>: > On Tuesday, 2 October 2018 at 08:08:38 UTC, Gary

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Joakim via Digitalmars-d
On Tuesday, 2 October 2018 at 08:08:38 UTC, Gary Willoughby wrote: On Tuesday, 2 October 2018 at 07:32:58 UTC, Joakim wrote: Thank you for making clear that the real reason you and some others like the current format is because you want to have a fun "vacation"- as I pointed out in that

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Gary Willoughby via Digitalmars-d
On Tuesday, 2 October 2018 at 07:32:58 UTC, Joakim wrote: Thank you for making clear that the real reason you and some others like the current format is because you want to have a fun "vacation"- as I pointed out in that earlier thread- rather than anything to do with D or advancing the

Re: printed v0.0.3: a low-level API to generate self-contained PDF/SVG

2018-10-02 Thread Andrea Fontana via Digitalmars-d-announce
On Monday, 1 October 2018 at 09:34:34 UTC, Guillaume Piolat wrote: printed is a low-level API to generate self-contained PDF 1.4/SVG 1.1 documents hopefully suitable for print. Currently it does not provide any "layout" option, you are just provided a sort of 2D Canvas API which can then

Re: `shared`...

2018-10-02 Thread Walter Bright via Digitalmars-d
On 10/1/2018 7:31 PM, Manu wrote: Surely `scope` must be transitive? It isn't. How could it work otherwise? It's a storage class, not a type constructor. There is no "pointer to scope" type, for example. Having it transitive would make it unworkable, actually, for similar reasons that

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Joakim via Digitalmars-d
On Tuesday, 2 October 2018 at 07:14:54 UTC, bauss wrote: On Tuesday, 2 October 2018 at 06:26:30 UTC, Joakim wrote: [...] I highly disagree with this. I love conferences and meetups. It's good socially and a conference is not 100% just about the topic it hosts. I think you didn't read

GC page and block metadata storage

2018-10-02 Thread Per Nordlöw via Digitalmars-d-learn
Should a new fresh GC for D store block metadata inside the page itself or in a (pool) structure separate from the page? I'm already aware of Dmitry's suggestion to separate value-type pools from pools of types possibly containing addresses.

Re: Funny way to crash dmd and brick the whole computer

2018-10-02 Thread bauss via Digitalmars-d
On Monday, 1 October 2018 at 10:18:48 UTC, Basile B. wrote: On Monday, 1 October 2018 at 09:24:18 UTC, Basile B. wrote: On Friday, 28 September 2018 at 11:58:25 UTC, Zardoz wrote: CTE fib : module fib_cte; import std.stdio; long fib(long n) { if (n <= 1) return 1; return fib(n - 1) +

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread bauss via Digitalmars-d
On Tuesday, 2 October 2018 at 06:26:30 UTC, Joakim wrote: I'm sure some thought and planning is now going into the next DConf, so I'd like to make sure people are aware that the conference format that DConf uses is dying off, as explained here:

Re: How to implement D to HTML pages ?

2018-10-02 Thread bauss via Digitalmars-d-learn
On Monday, 1 October 2018 at 23:17:59 UTC, rjframe wrote: vibe.d has more of a node.js feel. There's also DiamondMVC[1], which reminds me of ASP.NET (I'm not 100% sure whether that's intentional, and I haven't tried Diamond) and includes an ORM. As the creator of Diamond, then I can say

Re: How to implement D to HTML pages ?

2018-10-02 Thread bauss via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 06:56:33 UTC, bauss wrote: As described on the website (https://diamondmvvc.org/): Minor typo sorry. https://diamondmvc.org/

Re: Wrong module initialization order when building with Dub on Windows?

2018-10-02 Thread bauss via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 01:57:00 UTC, Vladimir Panteleev wrote: Ran into this today, don't have time to dig in now but maybe someone ran into this too. Steps to reproduce: - git clone https://github.com/CyberShadow/ae - cd ae/demo/inputtiming - (download/unpack

Re: Use nested functions as callbacks with Windows API functions?

2018-10-02 Thread Boris-Barboris via Digitalmars-d-learn
On Monday, 1 October 2018 at 23:07:29 UTC, spikespaz wrote: The problem with the code you have is that the callback needs to be extern (Windows). I don't know how to do that with a "lambda". Neither do I actually. Apparently it is impossible. Best I could squeeze out was this:

Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Joakim via Digitalmars-d
I'm sure some thought and planning is now going into the next DConf, so I'd like to make sure people are aware that the conference format that DConf uses is dying off, as explained here: https://marco.org/2018/01/17/end-of-conference-era There was a discussion about this in a previous forum