---
import std;
shared class TimeCount {
synchronized void startClock() {
auto me = cast()this;
me.startTime = Clock.currTime;
}
synchronized void endClock() {
auto me = cast()this;
me.endTime =
On 14/7/20 8:05, Kagamin wrote:
On Monday, 13 July 2020 at 07:26:06 UTC, Arafel wrote:
That's exactly why what I propose is a way to *explicitly* tell the
compiler about it, like @system does for safety.
With __gshared you can opt out from sharing safety, then you're back to
old good C-style
---
import std;
shared class TimeCount {
void startClock() {
auto me = cast()this;
me.startTime = Clock.currTime;
}
void endClock() {
auto me = cast()this;
me.endTime = Clock.currTime;
}
void
On 14/7/20 8:13, Kagamin wrote:
---
import std;
shared class TimeCount {
void startClock() {
auto me = cast()this;
me.startTime = Clock.currTime;
}
void endClock() {
auto me = cast()this;
me.endTime = Clock.currTime;
}
void
On Monday, 13 July 2020 at 07:26:06 UTC, Arafel wrote:
That's exactly why what I propose is a way to *explicitly* tell
the compiler about it, like @system does for safety.
With __gshared you can opt out from sharing safety, then you're
back to old good C-style multithreading.
On Monday, 13 July 2020 at 19:32:33 UTC, Marcone wrote:
alias runas = compose!(x => to!bool((cast(int) x) > 32), x =>
ShellExecute(null, "runas", "cmd", cast(wchar*) "/c \"cd /d %s
&& %s\"".format(getcwd(), x).to!wstring, null,
SW_HIDE).WaitForSingleObject(WAIT_TIMEOUT));
runas("netsh
On 14/7/20 10:45, Dominikus Dittes Scherkl wrote:
This is generally true. Avoid sharing many variables!
Tasks should be as independent from each other as possible. Anything
else is bad design doomed to run into problems sooner or later.
Also there is really almost never a good reason to share
Yes, all the synchronization and casting pretty much mandates
that shared data must be behind some kind of abstraction for
better ergonomics and better correctness too.
On Tuesday, 14 July 2020 at 07:05:43 UTC, Arafel wrote:
*However*, for this to work, you shouldn't use `shared` member
variables unless absolutely necessary, much less whole `shared`
classes/structs
This is generally true. Avoid sharing many variables!
Tasks should be as independent from each
On Tuesday, 14 July 2020 at 11:12:06 UTC, Andre Pany wrote:
[...]
Steven Schveighoffer already answered while I was composing this,
so discarding top half.
As far as I can tell the default arraySep of "" splitting the
argument by whitespace is simply not the case.
On Tuesday, 14 July 2020 at 14:33:47 UTC, Steven Schveighoffer
wrote:
On 7/14/20 10:22 AM, Steven Schveighoffer wrote:
The documentation needs updating, it should say "parameters
are added sequentially" or something like that, instead of
"separation by whitespace".
On 7/14/20 10:22 AM, Steven Schveighoffer wrote:
The documentation needs updating, it should say "parameters are added
sequentially" or something like that, instead of "separation by
whitespace".
https://github.com/dlang/phobos/pull/7557
-Steve
On 7/14/20 9:51 AM, Anonymouse wrote:
On Tuesday, 14 July 2020 at 11:12:06 UTC, Andre Pany wrote:
[...]
Steven Schveighoffer already answered while I was composing this, so
discarding top half.
As far as I can tell the default arraySep of "" splitting the argument
by whitespace is simply
On 7/14/20 10:05 AM, Steven Schveighoffer wrote:
Hm... that looks like it IS actually expecting to do what Andre wants.
It's adding each successive parameter.
If that doesn't work, then there's something wrong with the logic that
decides whether a parameter is part of the previous argument
On 7/14/20 7:12 AM, Andre Pany wrote:
Hi,
by reading the documentation of std.getopt I would assume, this is a
valid call
dmd -run sample.d --modelicalibs a b
``` d
import std;
void main(string[] args)
{
string[] modelicaLibs;
getopt(args, "modelicalibs", );
On Tuesday, 14 July 2020 at 13:40:44 UTC, Steven Schveighoffer
wrote:
The whitespace separator doesn't get to your program. args is:
["sample", "--modelicalibs", "a", "b"]
There is no separator in the parameter to --modelicalibs, it's
just "a".
What you need to do is:
dmd -run sample.d
On Tuesday, 14 July 2020 at 17:52:25 UTC, Basile B. wrote:
On Tuesday, 14 July 2020 at 11:05:17 UTC, Mitacha wrote:
On Saturday, 11 July 2020 at 09:43:39 UTC, Basile B. wrote:
On Wednesday, 8 July 2020 at 15:55:58 UTC, Mitacha wrote:
I filed an issue on codecov community forum
On Tuesday, 14 July 2020 at 11:05:17 UTC, Mitacha wrote:
On Saturday, 11 July 2020 at 09:43:39 UTC, Basile B. wrote:
On Wednesday, 8 July 2020 at 15:55:58 UTC, Mitacha wrote:
I filed an issue on codecov community forum
https://community.codecov.io/t/uploading-d-lang-coverage-doesnt-work/1740
I am trying to implement standard deviation calculation in Mir
for benchmark purposes.
I have two implementations. One is the straightforward std =
sqrt(mean(abs(x - x.mean())**2)) and the other follows Welford's
algorithm for computing variance (as described here:
On Tuesday, 14 July 2020 at 19:04:45 UTC, tastyminerals wrote:
I am trying to implement standard deviation calculation in Mir
for benchmark purposes.
I have two implementations. One is the straightforward std =
sqrt(mean(abs(x - x.mean())**2)) and the other follows
Welford's algorithm for
I have some D-wrapped C libraries I'm considering publishing to
DUB, mainly for my own use but also for anybody else who might
benefit. I've never done this before so I have some questions:
- Should there be any obvious relationship between the DUB
package version and the version of the C
import std: isUpper, writeln;
void main(){
writeln(isUpper('A'));
}
Why I get this error? How can I use isUpper()?
On Tuesday, 14 July 2020 at 20:37:53 UTC, Marcone wrote:
import std: isUpper, writeln;
void main(){
writeln(isUpper('A'));
}
Why I get this error? How can I use isUpper()?
import std.uni: isUpper; // or import std.ascii : isUpper
import std.stdio : writeln;
import std pulls in all
I have written something which may or may not be novel and I’m
wondering about how to distribute it to as many users as
possible, hoping others will find it useful. What’s the best way
to publish a D routine ?
It is called
void assume( bool condition ) nothrow nogc safe
for example:
On Tuesday, 14 July 2020 at 19:04:45 UTC, tastyminerals wrote:
@fastmath private double sd0(T)(Slice!(T*, 1) flatMatrix)
@fastmath shouldn't be really used with summation algorithms
except the `"fast"` version of them. Otherwise, they may or may
not behave like "fast".
For now, Mir doesn't really support GDC. But we want to. Is there
are a clear way to get a specific version of GDC. Is there a
table of GDC compilers with correspnding DMD FE versions?
dlang.org refers to a deprecated page, it is weird.
On Wednesday, 15 July 2020 at 02:08:48 UTC, 9il wrote:
On Tuesday, 14 July 2020 at 19:04:45 UTC, tastyminerals wrote:
@fastmath private double sd0(T)(Slice!(T*, 1) flatMatrix)
@fastmath shouldn't be really used with summation algorithms
except the `"fast"` version of them. Otherwise, they
On 2020-07-14 22:37, Marcone via Digitalmars-d-learn wrote:
import std: isUpper, writeln;
void main(){
writeln(isUpper('A'));
}
Why I get this error? How can I use isUpper()?
Two more options:
either fully qualify the name:
import std;
void main(){
writeln(std.uni.isUpper('A'));
}
On 2020-07-14 22:37, Marcone via Digitalmars-d-learn wrote:
import std: isUpper, writeln;
void main(){
writeln(isUpper('A'));
}
Why I get this error? How can I use isUpper()?
Two more options:
either fully qualify the name:
import std;
void main(){
writeln(std.uni.isUpper('A'));
}
On Tuesday, 14 July 2020 at 21:58:49 UTC, Cecil Ward wrote:
I have written something which may or may not be novel and I’m
wondering about how to distribute it to as many users as
possible, hoping others will find it useful. What’s the best
way to publish a D routine ?
[...]
GitHub is the
On Tuesday, 14 July 2020 at 20:56:06 UTC, DanielG wrote:
I have some D-wrapped C libraries I'm considering publishing to
DUB, mainly for my own use but also for anybody else who might
benefit. I've never done this before so I have some questions:
- Should there be any obvious relationship
Thank you.
On Tuesday, 14 July 2020 at 21:58:49 UTC, Cecil Ward wrote:
Does anyone know if this has already been published by someone
else?
https://github.com/libmir/mir-core/blob/master/source/mir/utility.d#L29
We test LDC and DMC. CI needs an update to be actually tested
with GDC.
On Sunday, 12 July 2020 at 19:16:32 UTC, aberba wrote:
3) packages, now it might be better though. But I've always
felt that there's not a lot of people using D for complete web
dev projects...
I'm one of the few but then again I don't use a lot of external
packages either other than what
On Saturday, 11 July 2020 at 09:43:39 UTC, Basile B. wrote:
On Wednesday, 8 July 2020 at 15:55:58 UTC, Mitacha wrote:
[...]
It's broken for me too, on gitlab,...
---
GitLab CI detected.
project root: .
--> token set from env
Yaml found at: ./.codecov.yml
==> Running gcov in .
Hi,
by reading the documentation of std.getopt I would assume, this
is a valid call
dmd -run sample.d --modelicalibs a b
``` d
import std;
void main(string[] args)
{
string[] modelicaLibs;
getopt(args, "modelicalibs", );
assert(modelicaLibs == ["a", "b"]);
}
```
but it fails,
36 matches
Mail list logo