Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Laurent Tréguier via Digitalmars-d
On Monday, 3 September 2018 at 22:30:47 UTC, Chris wrote: On Monday, 3 September 2018 at 18:52:45 UTC, Laurent Tréguier wrote: On Monday, 3 September 2018 at 18:26:57 UTC, Chris wrote: it should come with a warning label that says "D is in many parts still at an experimental stage and ships

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Iain Buclaw via Digitalmars-d
On 4 September 2018 at 04:19, Laeeth Isharc via Digitalmars-d wrote: > On Monday, 3 September 2018 at 16:07:21 UTC, RhyS wrote: >> >> A good example being the resources going into DMD, LDC, GDC... 3 Compilers >> for one language, when even well funded languages stick to one compiler. And >> now

Re: Pass lambda into template

2018-09-03 Thread vit via Digitalmars-d-learn
On Monday, 3 September 2018 at 09:09:44 UTC, Andrey wrote: Hello, Here is a code with comments: https://run.dlang.io/is/BNl2Up. I don't understand how to pass lambda into template. I get an error: onlineapp.d(18): Error: template instance `qwerty!((i) => "arg" ~ i.to!string ~ "[0] == '?'",

Re: D kernel for Jupyter notebook

2018-09-03 Thread Shigeki Karita via Digitalmars-d-announce
On Monday, 20 August 2018 at 00:14:03 UTC, Shigeki Karita wrote: On Sunday, 19 August 2018 at 20:33:45 UTC, Laeeth Isharc wrote: Proof of concept works, but it requires some further development to be useful to do work in. [...] Great. I have tried DUB integration. It seems to work.

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Manu via Digitalmars-d
On Mon, 3 Sep 2018 at 19:35, Laeeth Isharc via Digitalmars-d wrote: > > On Tuesday, 4 September 2018 at 02:24:25 UTC, Manu wrote: > > On Mon, 3 Sep 2018 at 18:45, Laeeth Isharc via Digitalmars-d > > wrote: > >> > >> On Monday, 3 September 2018 at 17:15:03 UTC, Laurent Tréguier > >> wrote: > >> >

Re: Random thought: Alternative stuct

2018-09-03 Thread Era Scarecrow via Digitalmars-d
On Tuesday, 4 September 2018 at 03:38:41 UTC, Nick Sabalausky (Abscissa) wrote: We have classes and structs: Classes: - Default Storage: GC Heap - Indirection Overhead: Yes - Semantics: Reference - Passed By: Copying the Data's Address Structs: - Default Storage: Stack - Indirection Overhead:

Re: Random thought: Alternative stuct

2018-09-03 Thread Paul Backus via Digitalmars-d
On Tuesday, 4 September 2018 at 04:03:19 UTC, Mike Franklin wrote: There are also a few additional differences. classes can inherit implementations, but using the technique illustrated in https://theartofmachinery.com/2018/08/13/inheritance_and_polymorphism_2.html, you can get something very

Re: expectations 0.1.0

2018-09-03 Thread Paul Backus via Digitalmars-d-announce
On Monday, 3 September 2018 at 21:55:57 UTC, Nick Sabalausky (Abscissa) wrote: By contrast, a function that returns an `Expected!T` does *not* force its caller to acknowledge it. If an error occurs, and the caller never checks value or hasValue...nothing happens. That's called squelching an

Re: Random thought: Alternative stuct

2018-09-03 Thread Mike Franklin via Digitalmars-d
On Tuesday, 4 September 2018 at 03:38:41 UTC, Nick Sabalausky (Abscissa) wrote: We have classes and structs: Classes: - Default Storage: GC Heap - Indirection Overhead: Yes - Semantics: Reference - Passed By: Copying the Data's Address Structs: - Default Storage: Stack - Indirection Overhead:

Re: Release D 2.082.0

2018-09-03 Thread Shigeki Karita via Digitalmars-d-announce
On Sunday, 2 September 2018 at 01:05:10 UTC, Martin Nowak wrote: Glad to announce D 2.082.0. This release comes with more efficient update functions for associative arrays, unsafe code in debug blocks, UDAs for function parameters, an improved dependency resolution and avoidance of online

Random thought: Alternative stuct

2018-09-03 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
We have classes and structs: Classes: - Default Storage: GC Heap - Indirection Overhead: Yes - Semantics: Reference - Passed By: Copying the Data's Address Structs: - Default Storage: Stack - Indirection Overhead: No - Semantics: Value - Passed By: Copying the Data (except where the compiler

Half-baked thought: Out-of-process asserts

2018-09-03 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
It seems pretty well established around here that: 1. Doing anything after a process has entered an unknown state is dangerous, and the more activity, the more danger (Note also, the transition to an unknown state actually occurs *before* any assert which is intended to detect it.) 2. For

Re: D is dead

2018-09-03 Thread Walter Bright via Digitalmars-d
On 9/3/2018 7:19 PM, Laeeth Isharc wrote: The way for D to appeal to more people is not to address the complaints of those who spend more time writing on the forum grumbling but don't use it much, because in my experience you do much better appealing to the people who are your best customers

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 4 September 2018 at 02:24:25 UTC, Manu wrote: On Mon, 3 Sep 2018 at 18:45, Laeeth Isharc via Digitalmars-d wrote: On Monday, 3 September 2018 at 17:15:03 UTC, Laurent Tréguier wrote: > On Monday, 3 September 2018 at 16:55:10 UTC, Jonathan M > Davis wrote: >> Most of the work

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Manu via Digitalmars-d
On Mon, 3 Sep 2018 at 18:45, Laeeth Isharc via Digitalmars-d wrote: > > On Monday, 3 September 2018 at 17:15:03 UTC, Laurent Tréguier > wrote: > > On Monday, 3 September 2018 at 16:55:10 UTC, Jonathan M Davis > > wrote: > >> Most of the work that gets done is the stuff that the folks > >>

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Laeeth Isharc via Digitalmars-d
On Monday, 3 September 2018 at 16:07:21 UTC, RhyS wrote: On Monday, 3 September 2018 at 15:41:48 UTC, Laurent Tréguier wrote: Yes. It almost sounds like a smooth experience would be a bad thing to have, especially with the classic "you don't need an IDE anyway" speech. Editing experience seems

Re: D IDE

2018-09-03 Thread User via Digitalmars-d
On Monday, 3 September 2018 at 19:31:58 UTC, Jonathan M Davis wrote: Because they can't hold a candle to vim. As far as text editing goes, there simply is no comparison. All these arguments, especially the above, makes me sad. May be this is the nature of open source that volunteers will

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Laeeth Isharc via Digitalmars-d
On Monday, 3 September 2018 at 17:15:03 UTC, Laurent Tréguier wrote: On Monday, 3 September 2018 at 16:55:10 UTC, Jonathan M Davis wrote: Most of the work that gets done is the stuff that the folks contributing think is the most important - frequently what is most important for them for what

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Mike Parker via Digitalmars-d
On Monday, 3 September 2018 at 18:26:57 UTC, Chris wrote: I think this sort of misunderstanding is the source of a lot of friction on this forum. Some users think (or in my case: thought) that D will be a sound and stable language one day, a language they can use for loads of stuff, while

Re: assumeNoGC works but can't get an assumePure to work

2018-09-03 Thread Paul Backus via Digitalmars-d-learn
On Monday, 3 September 2018 at 22:07:10 UTC, aliak wrote: Why does it work with nogc but not with pure? Cheers, - Ali You can't define an impure function inside a pure unittest. If you move `modify` outside the unittest block, and change the argument from a lambda to a function pointer, it

Re: D IDE

2018-09-03 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 09/03/2018 02:55 PM, Joakim wrote: On Monday, 3 September 2018 at 16:55:10 UTC, Jonathan M Davis wrote: But if you're ever expecting IDE support to be a top priority of many of the contributors, then you're going to be sorely disappointed. It's the sort of thing that we care about because

[Issue 19214] Support object.destruct() for efficient (and correct!) destruction

2018-09-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19214 --- Comment #1 from Manu --- https://github.com/dlang/druntime/pull/2292 --

[Issue 19215] New: dlang bot add reference to PR in bugzilla?

2018-09-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19215 Issue ID: 19215 Summary: dlang bot add reference to PR in bugzilla? Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

[Issue 19194] version for `-mscrtlib` specification

2018-09-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19194 --- Comment #3 from Manu --- https://github.com/dlang/dmd/pull/8655 --

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Chris via Digitalmars-d
On Monday, 3 September 2018 at 18:52:45 UTC, Laurent Tréguier wrote: On Monday, 3 September 2018 at 18:26:57 UTC, Chris wrote: it should come with a warning label that says "D is in many parts still at an experimental stage and ships with no guarantees whatsoever. Use at your own risk." Well

assumeNoGC works but can't get an assumePure to work

2018-09-03 Thread aliak via Digitalmars-d-learn
In another thread [0] this function can be used to call non nogc code from nogc code import std.traits; auto assumeNoGC(T)(T t) { enum attrs = functionAttributes!T | FunctionAttribute.nogc; return cast(SetFunctionAttributes!(T, functionLinkage!T, attrs)) t; } And then you can use it

Re: expectations 0.1.0

2018-09-03 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
On 09/03/2018 02:49 AM, Paul Backus wrote: On Monday, 3 September 2018 at 04:49:40 UTC, Nick Sabalausky (Abscissa) wrote: Note that the above has *nothing* to do with retrieving a value. Retrieving a value is merely used by the implementation as a trigger to lazily decide whether the caller

Re: This thread on Hacker News terrifies me

2018-09-03 Thread Guillaume Piolat via Digitalmars-d
On Saturday, 1 September 2018 at 11:36:52 UTC, Walter Bright wrote: I'm rather sad that I've never seen these ideas outside of the aerospace industry. Added to that is all the pushback on them I get here, on reddit, and on hackernews. Just chiming in to say you're certainly not ignored,

Re: Is @safe still a work-in-progress?

2018-09-03 Thread aliak via Digitalmars-d
On Wednesday, 29 August 2018 at 05:01:14 UTC, Walter Bright wrote: On 8/25/2018 5:42 AM, Chris M. wrote: What about my other point then on the syntax? I think something similar to what I suggested would be a much more flexible solution and is worth considering. Much more work would be needed

Re: This thread on Hacker News terrifies me

2018-09-03 Thread Walter Bright via Digitalmars-d
On 9/3/2018 8:33 AM, tide wrote: Yes why wouldn't a company want to fix a "feature" where by, if you have a scratch on a DVD you have to go buy another one in order to play it. Not playing it with an appropriate message is fine. Hanging the machine is not. It's obviously not that big of a

[Issue 19214] New: Support object.destruct() for efficient (and correct!) destruction

2018-09-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19214 Issue ID: 19214 Summary: Support object.destruct() for efficient (and correct!) destruction Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: John Regehr on "Use of Assertions"

2018-09-03 Thread Trass3r via Digitalmars-d
On Sunday, 2 September 2018 at 21:12:39 UTC, Nick Sabalausky (Abscissa) wrote: This does make me think of one thing: Shouldn't assert expressions be required to be pure? (even if only weakly pure) Not sure how much practical problems that would create, but at least in theory it certainly

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Jonathan M Davis via Digitalmars-d
On Monday, September 3, 2018 12:26:57 PM MDT Chris via Digitalmars-d wrote: > There is no real plan and > only problems that someone deems interesting or challenging at a > given moment are tackled. If they solve a problem for a lot of > users, it's only a side effect. The advent of a D Foundation

Re: D IDE

2018-09-03 Thread Jonathan M Davis via Digitalmars-d
On Monday, September 3, 2018 12:55:01 PM MDT Joakim via Digitalmars-d wrote: > On Monday, 3 September 2018 at 16:55:10 UTC, Jonathan M Davis > > wrote: > > But if you're ever expecting IDE support to be a top priority > > of many of the contributors, then you're going to be sorely > >

Re: Pass lambda into template

2018-09-03 Thread Paul Backus via Digitalmars-d-learn
On Monday, 3 September 2018 at 09:09:44 UTC, Andrey wrote: Hello, Here is a code with comments: https://run.dlang.io/is/BNl2Up. I don't understand how to pass lambda into template. I get an error: onlineapp.d(18): Error: template instance `qwerty!((i) => "arg" ~ i.to!string ~ "[0] == '?'",

Re: Static foreach bug?

2018-09-03 Thread Meta via Digitalmars-d
On Monday, 3 September 2018 at 18:03:18 UTC, Soma wrote: Sorry to disrupt your threat, but as a lurking in this forum using D for small projects, and after looking such snippet my first impression is how D is getting polluted and becoming more like Java and C++. "final class", "public final

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Meta via Digitalmars-d
On Monday, 3 September 2018 at 14:26:46 UTC, Laeeth Isharc wrote: I just spoke with Dicebot about work stuff. He incidentally mentioned what I said before based on my impressions. The people doing work with a language have better things to do than spend a lot of time on forums. And I think

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Paolo Invernizzi via Digitalmars-d
On Monday, 3 September 2018 at 14:26:46 UTC, Laeeth Isharc wrote: I just spoke with Dicebot about work stuff. He incidentally mentioned what I said before based on my impressions. The people doing work with a language have better things to do than spend a lot of time on forums. And I think

D IDE

2018-09-03 Thread Joakim via Digitalmars-d
On Monday, 3 September 2018 at 16:55:10 UTC, Jonathan M Davis wrote: But if you're ever expecting IDE support to be a top priority of many of the contributors, then you're going to be sorely disappointed. It's the sort of thing that we care about because we care about D being successful, but

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Laurent Tréguier via Digitalmars-d
On Monday, 3 September 2018 at 18:26:57 UTC, Chris wrote: it should come with a warning label that says "D is in many parts still at an experimental stage and ships with no guarantees whatsoever. Use at your own risk." Well it comes with the Boost license that says: `THE SOFTWARE IS PROVIDED

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Chris via Digitalmars-d
On Monday, 3 September 2018 at 16:55:10 UTC, Jonathan M Davis wrote: Most of the work that gets done is the stuff that the folks contributing think is the most important - frequently what is most important for them for what they do, and very few (if any) of the major contributors use or care

Re: This thread on Hacker News terrifies me

2018-09-03 Thread Gambler via Digitalmars-d
On 9/3/2018 1:55 PM, Gambler wrote: > There is this VR game called Fantastic Contraption. Its interface is > light-years ahead of anything else I've seen in VR. The point of the > game is to design animated 3D structures that solve the problem of > traversing various obstacles while moving from

Process in parallel and output result to stdout theread-safely

2018-09-03 Thread Dr.No via Digitalmars-d-learn
so I'im doing an expansive operation with a file, to try speed up, i switch to using parallel but keeping in the otuput printing thread-safe. But for some reason, even using synchonized, it doesn't work as expected, for example, it output multiples results on same time, as in the example

Re: Static foreach bug?

2018-09-03 Thread Soma via Digitalmars-d
On Sunday, 2 September 2018 at 19:42:20 UTC, bauss wrote: unmaintainable piece of code: ``` final class ClassName : SoapBinding, Interface { public: final: this() { super(); } import __stdtraits = std.traits; static foreach (member; __traits(derivedMembers, Interface)) {

Re: This thread on Hacker News terrifies me

2018-09-03 Thread Gambler via Digitalmars-d
I have to delete some quoted text to make this manageable. On 9/2/2018 5:07 PM, Nick Sabalausky (Abscissa) wrote: > [...] > GUI programming has been attempted a lot. (See Scratch for one of the > latest, possibly most successful attempts). But there are real, > practical reasons it's never made

Re: Release D 2.082.0

2018-09-03 Thread Martin Nowak via Digitalmars-d-announce
On Sunday, 2 September 2018 at 15:51:37 UTC, lurker wrote: if i remember correctly (5.), it wants a different/other version of the tool chain. never the less, i'll continue using c# and not install (1.) again, since in earlier versions of D i eventually had to deinstall VS2017 and then

Re: Release D 2.082.0

2018-09-03 Thread Martin Nowak via Digitalmars-d-announce
On Sunday, 2 September 2018 at 22:04:11 UTC, Mike Franklin wrote: I guess we should keep an eye on this for the next releases, could you take care of this Mike? Take care of what exactly? What specifically needs to be done? Testing Windows installation of at least the first beta and the

Re: DMD cross compiler

2018-09-03 Thread bauss via Digitalmars-d
On Monday, 3 September 2018 at 14:00:58 UTC, Iain Buclaw wrote: On 3 September 2018 at 15:12, Laurent Tréguier via Digitalmars-d wrote: On Monday, 3 September 2018 at 09:32:29 UTC, Joakim wrote: Why not? If you're not optimizing or iterating on your code, it's a reasonable replacement. If

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Jonathan M Davis via Digitalmars-d
On Monday, September 3, 2018 11:15:03 AM MDT Laurent Tréguier via Digitalmars-d wrote: > It just baffles me a bit to see the state of D in this > department, when languages like Go or Rust (hooray for yet > another comparison to Go and Rust) are a lot younger, but already > have what looks like

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Laurent Tréguier via Digitalmars-d
On Monday, 3 September 2018 at 16:55:10 UTC, Jonathan M Davis wrote: Most of the work that gets done is the stuff that the folks contributing think is the most important - frequently what is most important for them for what they do, and very few (if any) of the major contributors use or care

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Jonathan M Davis via Digitalmars-d
On Monday, September 3, 2018 9:41:48 AM MDT Laurent Tréguier via Digitalmars-d wrote: > On Monday, 3 September 2018 at 15:23:12 UTC, Chris wrote: > > On Monday, 3 September 2018 at 14:26:46 UTC, Laeeth Isharc > > > > wrote: > >> On Monday, 3 September 2018 at 11:32:42 UTC, Chris wrote: > >>>

Re: John Regehr on "Use of Assertions"

2018-09-03 Thread Meta via Digitalmars-d
On Saturday, 1 September 2018 at 20:15:15 UTC, Walter Bright wrote: https://blog.regehr.org/archives/1091 As usual, John nails it in a particularly well-written essay. "ASSERT(expr) Asserts that an expression is true. The expression may or may not be evaluated. If the expression is true,

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Iain Buclaw via Digitalmars-d
On 3 September 2018 at 18:07, RhyS via Digitalmars-d wrote: > > Too much resources split among too many distributions, graphical desktops > etc. Choice is good but too much choice means projects are starved for > resources, comparability are issues, bugs are even more present, ... > > A good

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread RhyS via Digitalmars-d
On Monday, 3 September 2018 at 15:41:48 UTC, Laurent Tréguier wrote: Yes. It almost sounds like a smooth experience would be a bad thing to have, especially with the classic "you don't need an IDE anyway" speech. Editing experience seems often dismissed as unimportant, when it's one of the

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Laurent Tréguier via Digitalmars-d
On Monday, 3 September 2018 at 15:23:12 UTC, Chris wrote: On Monday, 3 September 2018 at 14:26:46 UTC, Laeeth Isharc wrote: On Monday, 3 September 2018 at 11:32:42 UTC, Chris wrote: [...] D has never been about smooth experiences! That's a commercial benefit if you think that hormesis

Re: This thread on Hacker News terrifies me

2018-09-03 Thread tide via Digitalmars-d
On Saturday, 1 September 2018 at 20:48:27 UTC, Walter Bright wrote: On 9/1/2018 5:25 AM, tide wrote: and that all bugs can be solved with asserts I never said that, not even close. Are you in large implying it. But I will maintain that DVD players still hanging on a scratched DVD after 20

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Chris via Digitalmars-d
On Monday, 3 September 2018 at 14:26:46 UTC, Laeeth Isharc wrote: On Monday, 3 September 2018 at 11:32:42 UTC, Chris wrote: [...] D has never been about smooth experiences! That's a commercial benefit if you think that hormesis brings benefits and you are not looking for programmers of

Re: Structures and CTFE

2018-09-03 Thread Stefan Koch via Digitalmars-d-learn
On Monday, 3 September 2018 at 15:08:57 UTC, agorkvmh wrote: On Monday, 3 September 2018 at 15:00:33 UTC, Alex wrote: On Monday, 3 September 2018 at 14:00:23 UTC, agorkvmh wrote: [...] Yes. Put a pragma where you static assert for Foo(1).pos equality with 2: [...] Thanks, by the way,

Re: Structures and CTFE

2018-09-03 Thread agorkvmh via Digitalmars-d-learn
On Monday, 3 September 2018 at 15:00:33 UTC, Alex wrote: On Monday, 3 September 2018 at 14:00:23 UTC, agorkvmh wrote: [...] Yes. Put a pragma where you static assert for Foo(1).pos equality with 2: [...] Thanks, by the way, the autocomplete suggests me '__ctfeWrite', what is it?

Re: Structures and CTFE

2018-09-03 Thread Alex via Digitalmars-d-learn
On Monday, 3 September 2018 at 14:00:23 UTC, agorkvmh wrote: There is a way to do print the two values at compile time? Yes. Put a pragma where you static assert for Foo(1).pos equality with 2: -- static assert(Foo(1).pos == 2); pragma(msg, Foo(1).pos); struct Foo { this(int i)

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Laeeth Isharc via Digitalmars-d
On Monday, 3 September 2018 at 11:32:42 UTC, Chris wrote: On Sunday, 2 September 2018 at 12:07:17 UTC, Laeeth Isharc wrote: That's why the people that adopt D will inordinately be principals not agents in the beginning. They will either be residual claimants on earnings or will have

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Laeeth Isharc via Digitalmars-d
On Monday, 3 September 2018 at 11:32:42 UTC, Chris wrote: On Sunday, 2 September 2018 at 12:07:17 UTC, Laeeth Isharc wrote: That's why the people that adopt D will inordinately be principals not agents in the beginning. They will either be residual claimants on earnings or will have

Re: DMD cross compiler

2018-09-03 Thread Laurent Tréguier via Digitalmars-d
On Monday, 3 September 2018 at 14:00:58 UTC, Iain Buclaw wrote: GDC is kept in sync with dmd nightlies on a weekly or twice-weekly basis. I saw the post about using the 2.081 frontend, but I didn't know about that. That's great, thanks for the info !

Re: Structures and CTFE

2018-09-03 Thread agorkvmh via Digitalmars-d-learn
On Monday, 3 September 2018 at 13:52:24 UTC, bauss wrote: On Monday, 3 September 2018 at 13:39:25 UTC, agorkvmh wrote: [...] It prints 1, because pragma(msg) is called when the compiler is analyzing the code through the semantic process and not when the body of the function is executed

Re: DMD cross compiler

2018-09-03 Thread Iain Buclaw via Digitalmars-d
On 3 September 2018 at 15:12, Laurent Tréguier via Digitalmars-d wrote: > On Monday, 3 September 2018 at 09:32:29 UTC, Joakim wrote: >> >> Why not? If you're not optimizing or iterating on your code, it's a >> reasonable replacement. If you're optimizing, you should only be using LDC >> or gdc. >

Re: anyway to debug nogc code with writeln?

2018-09-03 Thread aliak via Digitalmars-d-learn
On Saturday, 1 September 2018 at 22:38:46 UTC, Ali Çehreli wrote: You can strip off any attribute with SetFunctionAttributes: import std.stdio; // Adapted from std.traits.SetFunctionAttributes documentation import std.traits; auto assumeNoGC(T)(T t) if (isFunctionPointer!T || isDelegate!T)

Re: DStep rocks [was Example of using C API from D?]

2018-09-03 Thread Russel Winder via Digitalmars-d-learn
On Mon, 2018-09-03 at 12:45 +, Andrea Fontana via Digitalmars-d- learn wrote: > […] > > I use dpp to generate d code to import: > - Create a temp.dpp file with #include inside > - Run "d++ --preprocess-only temp.dpp" > > Now you have your .d file exactly like in dstep. > So where does this

Re: Structures and CTFE

2018-09-03 Thread bauss via Digitalmars-d-learn
On Monday, 3 September 2018 at 13:39:25 UTC, agorkvmh wrote: Hi all, Running this: --- static assert(Foo(1).pos == 2); struct Foo { this(int i){ advance(); } size_t pos =1; void advance() { pragma(msg, pos); pos = pos+1; pragma(msg, pos); } } dmd

Structures and CTFE

2018-09-03 Thread agorkvmh via Digitalmars-d-learn
Hi all, Running this: --- static assert(Foo(1).pos == 2); struct Foo { this(int i){ advance(); } size_t pos =1; void advance() { pragma(msg, pos); pos = pos+1; pragma(msg, pos); } } dmd -o- -unittest source/pgs/parser.d 1LU 1LU --- The static

Re: Is there any reason to use non-ref foreach?

2018-09-03 Thread Andrea Fontana via Digitalmars-d-learn
On Friday, 31 August 2018 at 09:59:20 UTC, Dukc wrote: For me, it seems that for generality you should always add ref into foreach loop variable. The reason is this: One good reason: https://forum.dlang.org/thread/dlhrrgvzmhladnphi...@forum.dlang.org

Re: Meson issue with -L--export-dynamic flag

2018-09-03 Thread Gerald via Digitalmars-d-learn
For anyone that wants to try to reproduce it, you can clone this repo and switch to the meson branch: https://github.com/bilelmoussaoui/tilix

Meson issue with -L--export-dynamic flag

2018-09-03 Thread Gerald via Digitalmars-d-learn
Myself and some others are looking at replacing autotools in Tilix with meson for the various Linux distros to use when building and packaging the binary. However we are running into an issue with meson around the use of the "-L--export-dynamic" flag. When compiling with meson using LDC and

Re: DMD cross compiler

2018-09-03 Thread Laurent Tréguier via Digitalmars-d
On Monday, 3 September 2018 at 09:32:29 UTC, Joakim wrote: Why not? If you're not optimizing or iterating on your code, it's a reasonable replacement. If you're optimizing, you should only be using LDC or gdc. What if you want to reproduce a bug that only happens when compiling with dmd for

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread walker via Digitalmars-d
On Monday, 3 September 2018 at 06:29:02 UTC, Pjotr Prins wrote: One thing I want to add that we ought to be appreciative of the work people put in - much of it in their spare time. I wonder if W and others sometimes despair for the lack of appreciation they get. Guido van Rossum burning out

Re: expectations 0.1.0

2018-09-03 Thread aliak via Digitalmars-d-announce
On Monday, 3 September 2018 at 06:00:06 UTC, Thomas Mader wrote: On Monday, 3 September 2018 at 00:52:39 UTC, Vladimir Panteleev wrote: There are generally two classic approaches to error handling: std::expected is not the only thing on this topic going on in C++. There is also the proposal

Re: expectations 0.1.0

2018-09-03 Thread aliak via Digitalmars-d-announce
On Monday, 3 September 2018 at 06:49:41 UTC, Paul Backus wrote: To me, the only acceptable choices are for `Expected!void` to have the same lazy semantics as `Expected!T`, or for `Expected!void` to be removed altogether. Having one specialization be lazy and one be eager would be a nightmare

Re: DStep rocks [was Example of using C API from D?]

2018-09-03 Thread Andrea Fontana via Digitalmars-d-learn
On Monday, 3 September 2018 at 10:50:17 UTC, Russel Winder wrote: Interesting alternative to DStep. I came to D to avoid #include, but… I'll give it a whirl once I can get it compiled on Debian Sid. It seems the libclang-dev package does not install a libclang.so symbolic link, you have to be

Re: This thread on Hacker News terrifies me

2018-09-03 Thread Kagamin via Digitalmars-d
On Saturday, 1 September 2018 at 11:32:32 UTC, Jonathan M Davis wrote: I think that his point was more that it's sometimes argued that software engineering really isn't engineering in the classical sense. If you're talking about someone like a civil engineer for instance, the engineer applies

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Chris via Digitalmars-d
On Monday, 3 September 2018 at 06:29:02 UTC, Pjotr Prins wrote: Hear, hear! Even though some languages like Julia, Rust and Go are much better funded than D - and their creators have excellent taste in different ways - they still have to go through similar evolutionary steps. There is no

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Chris via Digitalmars-d
On Sunday, 2 September 2018 at 12:07:17 UTC, Laeeth Isharc wrote: That's why the people that adopt D will inordinately be principals not agents in the beginning. They will either be residual claimants on earnings or will have acquired the authority to make decisions without persuading a

Re: DStep rocks [was Example of using C API from D?]

2018-09-03 Thread Russel Winder via Digitalmars-d-learn
On Sun, 2018-09-02 at 21:54 +, Laeeth Isharc via Digitalmars-d- learn wrote: > On Sunday, 2 September 2018 at 17:49:45 UTC, Russel Winder wrote: > > […] > > Now to work out how to make the project auto generate this D > > module so as to avoid having it in the repository, and > >

Re: Pass lambda into template

2018-09-03 Thread Andrea Fontana via Digitalmars-d-learn
On Monday, 3 September 2018 at 09:09:44 UTC, Andrey wrote: Hello, Here is a code with comments: https://run.dlang.io/is/BNl2Up. I don't understand how to pass lambda into template. I get an error: onlineapp.d(18): Error: template instance `qwerty!((i) => "arg" ~ i.to!string ~ "[0] == '?'",

[Issue 7390] Missing switch case fallthrough warning with static foreach

2018-09-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7390 John Colvin changed: What|Removed |Added CC||john.loughran.colvin@gmail.

[Issue 19213] New: goto skips declaration of variable in std.algorithm.iteration.joiner

2018-09-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19213 Issue ID: 19213 Summary: goto skips declaration of variable in std.algorithm.iteration.joiner Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: DMD cross compiler

2018-09-03 Thread Manu via Digitalmars-d
On Mon, 3 Sep 2018 at 02:35, Joakim via Digitalmars-d wrote: > > On Monday, 3 September 2018 at 09:21:21 UTC, bauss wrote: > > On Sunday, 2 September 2018 at 01:52:18 UTC, Joakim wrote: > >> On Saturday, 1 September 2018 at 20:12:24 UTC, Manu wrote: > >>> [...] > >> > >> What specifically do you

Re: DMD cross compiler

2018-09-03 Thread Joakim via Digitalmars-d
On Monday, 3 September 2018 at 09:21:21 UTC, bauss wrote: On Sunday, 2 September 2018 at 01:52:18 UTC, Joakim wrote: On Saturday, 1 September 2018 at 20:12:24 UTC, Manu wrote: [...] What specifically do you want to cross-compile to, something like Windows to macOS? LDC already does all

Re: DMD cross compiler

2018-09-03 Thread bauss via Digitalmars-d
On Sunday, 2 September 2018 at 01:52:18 UTC, Joakim wrote: On Saturday, 1 September 2018 at 20:12:24 UTC, Manu wrote: I know there's been discussion on this before, I just want a definitive reference. It looks like it would be relatively straight forward for DMD to be a cross-compiler. A

Pass lambda into template

2018-09-03 Thread Andrey via Digitalmars-d-learn
Hello, Here is a code with comments: https://run.dlang.io/is/BNl2Up. I don't understand how to pass lambda into template. I get an error: onlineapp.d(18): Error: template instance `qwerty!((i) => "arg" ~ i.to!string ~ "[0] == '?'", "||")` cannot use local __lambda1 as parameter to non-global

Re: DMD cross compiler

2018-09-03 Thread Manu via Digitalmars-d
On Mon, 3 Sep 2018 at 01:40, Jacob Carlborg via Digitalmars-d wrote: > > On Saturday, 1 September 2018 at 20:12:24 UTC, Manu wrote: > > I know there's been discussion on this before, I just want a > > definitive reference. > > > > It looks like it would be relatively straight forward for DMD > >

Re: John Regehr on "Use of Assertions"

2018-09-03 Thread John Colvin via Digitalmars-d
On Monday, 3 September 2018 at 06:26:59 UTC, Jonathan M Davis wrote: Well, if that were the intention, then -release could not remove assertions from @safe code. -release does not remove bounds checking from @safe code. You have to use -boundscheck=off to disable assertions in @safe code

Re: DMD cross compiler

2018-09-03 Thread Jacob Carlborg via Digitalmars-d
On Saturday, 1 September 2018 at 20:12:24 UTC, Manu wrote: I know there's been discussion on this before, I just want a definitive reference. It looks like it would be relatively straight forward for DMD to be a cross-compiler. A few version() statements could be runtime if's, and that's

Re: Static foreach bug?

2018-09-03 Thread Jonathan M Davis via Digitalmars-d
n Monday, September 3, 2018 12:39:17 AM MDT Neia Neutuladh via Digitalmars-d wrote: > On Monday, 3 September 2018 at 04:43:30 UTC, bauss wrote: > > On Sunday, 2 September 2018 at 20:01:08 UTC, Neia Neutuladh > > > > wrote: > >> On Sunday, 2 September 2018 at 19:42:20 UTC, bauss wrote: > >>> Woud

Re: Load entire file, as a char array.

2018-09-03 Thread rikki cattermole via Digitalmars-d-learn
On 03/09/2018 7:38 PM, Chris Katko wrote: On Monday, 3 September 2018 at 06:28:38 UTC, bauss wrote: On Monday, 3 September 2018 at 06:25:23 UTC, bauss wrote: On Monday, 3 September 2018 at 03:19:39 UTC, Neia Neutuladh wrote: On Monday, 3 September 2018 at 03:04:57 UTC, Chris Katko wrote: This

Re: Load entire file, as a char array.

2018-09-03 Thread Chris Katko via Digitalmars-d-learn
On Monday, 3 September 2018 at 07:38:51 UTC, Chris Katko wrote: On Monday, 3 September 2018 at 06:28:38 UTC, bauss wrote: On Monday, 3 September 2018 at 06:25:23 UTC, bauss wrote: On Monday, 3 September 2018 at 03:19:39 UTC, Neia Neutuladh wrote: On Monday, 3 September 2018 at 03:04:57 UTC,

Re: Load entire file, as a char array.

2018-09-03 Thread Chris Katko via Digitalmars-d-learn
On Monday, 3 September 2018 at 06:28:38 UTC, bauss wrote: On Monday, 3 September 2018 at 06:25:23 UTC, bauss wrote: On Monday, 3 September 2018 at 03:19:39 UTC, Neia Neutuladh wrote: On Monday, 3 September 2018 at 03:04:57 UTC, Chris Katko wrote: This should be simple? All I want to do is load

Re: [OT] college

2018-09-03 Thread rikki cattermole via Digitalmars-d
On 03/09/2018 7:05 PM, Joakim wrote: One of the root causes of that dysfunction is there's way too much software written. Open source has actually helped alleviate this, because instead of every embedded or server developer who needs an OS kernel convincing management that they should write

Re: [OT] college

2018-09-03 Thread Joakim via Digitalmars-d
On Sunday, 2 September 2018 at 19:30:58 UTC, Nick Sabalausky (Abscissa) wrote: On 09/02/2018 05:43 AM, Joakim wrote: Most will be out of business within a decade or two, as online learning takes their place. I kinda wish I could agree with that, but schools are too much of a sacred cow to be

Re: expectations 0.1.0

2018-09-03 Thread Paul Backus via Digitalmars-d-announce
On Monday, 3 September 2018 at 04:49:40 UTC, Nick Sabalausky (Abscissa) wrote: Note that the above has *nothing* to do with retrieving a value. Retrieving a value is merely used by the implementation as a trigger to lazily decide whether the caller wants `foo` or `tryFoo`. Going out of scope

Re: Static foreach bug?

2018-09-03 Thread bauss via Digitalmars-d
On Monday, 3 September 2018 at 06:39:17 UTC, Neia Neutuladh wrote: On Monday, 3 September 2018 at 04:43:30 UTC, bauss wrote: On Sunday, 2 September 2018 at 20:01:08 UTC, Neia Neutuladh wrote: On Sunday, 2 September 2018 at 19:42:20 UTC, bauss wrote: Woud be so much more maintainable if I could

Re: Static foreach bug?

2018-09-03 Thread Neia Neutuladh via Digitalmars-d
On Monday, 3 September 2018 at 04:43:30 UTC, bauss wrote: On Sunday, 2 September 2018 at 20:01:08 UTC, Neia Neutuladh wrote: On Sunday, 2 September 2018 at 19:42:20 UTC, bauss wrote: Woud be so much more maintainable if I could have each statement into a variable that could be maintained

  1   2   >