On 2017-10-11 22:36, Nordlöw wrote:
My first idea is to make stderr "core dumped" the invariant. Therefore
my first try becomes to redirect stderr to stdout (in bash) and grep for
the pattern 'core dumped' as follows
IIRC, segmentation faults are printed by the shell and not the
application.
On Wednesday, 11 October 2017 at 20:36:58 UTC, Nordlöw wrote:
What am I doing wrong?
Invoking dub from dustmite probably isn't going to work well.
Instead, try using dub's dustmite command:
https://code.dlang.org/docs/commandline#dustmite
A simple(incomplete) undo system.
I'm curious about the overhead. The idea is to wrap any system
changes using the Add function. This function stores both the
forward and backward state changes using delegates.
By using forward, we call the action passed to set the data and
backward will cal
On Wednesday, October 11, 2017 23:06:13 Johan Engelen via Digitalmars-d-
learn wrote:
> I am disappointed to see functions being deprecated, without an
> extensive documentation of how to rewrite them for different
> usage of the deprecated function. It makes me feel that no deep
> thought went int
On 10/11/17 7:06 PM, Johan Engelen wrote:
On Wednesday, 11 October 2017 at 22:45:14 UTC, Jonathan M Davis wrote:
On Wednesday, October 11, 2017 22:22:43 Johan Engelen via
Digitalmars-d- learn wrote:
std.string.removechars is now deprecated.
https://dlang.org/changelog/2.075.0.html#pattern-depre
On Wednesday, 11 October 2017 at 22:45:14 UTC, Jonathan M Davis
wrote:
On Wednesday, October 11, 2017 22:22:43 Johan Engelen via
Digitalmars-d- learn wrote:
std.string.removechars is now deprecated.
https://dlang.org/changelog/2.075.0.html#pattern-deprecate
What is now the most efficient way t
On Tuesday, 10 October 2017 at 08:26:37 UTC, Marc Schütz wrote:
On Tuesday, 10 October 2017 at 02:58:45 UTC, Mr. Jonse wrote:
I need to store a hetrogeneous array of delegates. How can I
do this but still call the function with the appropriate
number of parameters at run time?
I have the para
On Wednesday, October 11, 2017 22:22:43 Johan Engelen via Digitalmars-d-
learn wrote:
> std.string.removechars is now deprecated.
> https://dlang.org/changelog/2.075.0.html#pattern-deprecate
>
> What is now the most efficient way to remove characters from a
> string, if only one type of character n
std.string.removechars is now deprecated.
https://dlang.org/changelog/2.075.0.html#pattern-deprecate
What is now the most efficient way to remove characters from a
string, if only one type of character needs to be removed?
```
// old
auto old(string s) {
return s.removechars(",").to!int;
}
Once again I need to pick up Dustmite to track down a DMD and LDC
ICE in release mode for my project. But I can't figure out how
call Dustmite correctly:
When I build https://github.com/nordlow/phobos-next as
/usr/bin/dub build --compiler=dmd --build=release
it prints
Performing "rel
On Wednesday, 11 October 2017 at 09:39:04 UTC, user1234 wrote:
On Wednesday, 11 October 2017 at 09:27:49 UTC, John Burton
wrote:
[...]
I therefore feel like I ought to not use assert and should
instead validate my assumptions with an if statement and a
throw or exit or something.
Yes, that's
On 10/11/2017 02:27 AM, John Burton wrote:
> The spec says this :-
>
> "As a contract, an assert represents a guarantee that the code must
> uphold. Any failure of this expression represents a logic error in the
> code that must be fixed in the source code. A program for which the
> assert contrac
On Wednesday, 11 October 2017 at 11:26:11 UTC, rikki cattermole
wrote:
On 11/10/2017 12:09 PM, RazvanN wrote:
Hi all,
I have seen that the concurrency api has this method specified
in $title [1] and I was wondering what is the use of it?
Enabling threads to modify the message box of other thr
Hi all,
I have seen that the concurrency api has this method specified in
$title [1] and I was wondering what is the use of it? Enabling
threads to modify the message box of other threads doesn't seem
to be a good idea and I can't think of any real use case.
Best regards,
RazvanN
[1]
https
If you just want to not repeat fields and methods you can use alias this or
mixins:
https://run.dlang.io/is/0UkjTe
On Wed, Oct 11, 2017 at 2:07 PM, drug via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> 11.10.2017 14:37, ANtlord пишет:
>
> Hello dear community!
>>
>> I've met
Using `alias this` it's easy to make wrapper for structure that calls
wrapped structure methods like its own. This is one way - from wrapper
to wrapped transformation. Is it possible to create the opposite way
from wrapped to wrapper?
https://run.dlang.io/is/Avyu3I
All calls to Bar is redirec
11.10.2017 14:37, ANtlord пишет:
Hello dear community!
I've met a little issue. How can I generate struct or class copying some
fields and methods from another struct or class? I've found methods to
get fields. They are std.traits.FieldNameTuple and
std.traits.FieldTypeTuple but I can't find
On 11/10/2017 12:43 PM, RazvanN wrote:
On Wednesday, 11 October 2017 at 11:26:11 UTC, rikki cattermole wrote:
On 11/10/2017 12:09 PM, RazvanN wrote:
Hi all,
I have seen that the concurrency api has this method specified in
$title [1] and I was wondering what is the use of it? Enabling
thread
On 11/10/2017 12:37 PM, ANtlord wrote:
Hello dear community!
I've met a little issue. How can I generate struct or class copying some
fields and methods from another struct or class? I've found methods to
get fields. They are std.traits.FieldNameTuple and
std.traits.FieldTypeTuple but I can't
Hello dear community!
I've met a little issue. How can I generate struct or class
copying some fields and methods from another struct or class?
I've found methods to get fields. They are
std.traits.FieldNameTuple and std.traits.FieldTypeTuple but I
can't find a method allows getting methods f
On 11/10/2017 12:09 PM, RazvanN wrote:
Hi all,
I have seen that the concurrency api has this method specified in $title
[1] and I was wondering what is the use of it? Enabling threads to
modify the message box of other threads doesn't seem to be a good idea
and I can't think of any real use c
On Wednesday, October 11, 2017 09:27:49 John Burton via Digitalmars-d-learn
wrote:
> The spec says this :-
>
> "As a contract, an assert represents a guarantee that the code
> must uphold. Any failure of this expression represents a logic
> error in the code that must be fixed in the source code.
On Wednesday, 11 October 2017 at 09:27:49 UTC, John Burton wrote:
[...]
I therefore feel like I ought to not use assert and should
instead validate my assumptions with an if statement and a
throw or exit or something.
Yes, that's the way of doing. assert() are just used to test the
program.
On 11/10/2017 10:27 AM, John Burton wrote:
The spec says this :-
"As a contract, an assert represents a guarantee that the code must
uphold. Any failure of this expression represents a logic error in the
code that must be fixed in the source code. A program for which the
assert contract is fa
The spec says this :-
"As a contract, an assert represents a guarantee that the code
must uphold. Any failure of this expression represents a logic
error in the code that must be fixed in the source code. A
program for which the assert contract is false is, by definition,
invalid, and therefo
On Wednesday, October 11, 2017 06:25:19 Dhananjay via Digitalmars-d-learn
wrote:
> Hello,
>
> I am upgrading to DMD 2.076.1 from DMD 2.069.2 (similar results
> on 2.075.1), and seeing a huge increase in unittest compilation
> time when the -deps parameter is also passed to dmd. This is on
> both O
You can avoid cast:
void foo(T)(T bar){...}
byte bar = 9;
foo!byte(bar + byte(1));
or
byte bar = 9;
byte num = 1;
foo!byte(bar + num);
On Tue, Oct 10, 2017 at 9:55 PM, Chirs Forest via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> I keep having to make casts like the fo
27 matches
Mail list logo