On Saturday, 7 December 2019 at 04:05:23 UTC, mipri wrote:
On Saturday, 7 December 2019 at 04:00:53 UTC, Marcone wrote:
import std;
alias cmd = compose!(to!bool, wait, spawnShell, to!string);
void main(){
writeln(cmd("where notepad.exe"));
}
Result:
C:\Windows\System32\notepad.exe
On Saturday, 7 December 2019 at 04:00:53 UTC, Marcone wrote:
import std;
alias cmd = compose!(to!bool, wait, spawnShell, to!string);
void main(){
writeln(cmd("where notepad.exe"));
}
Result:
C:\Windows\System32\notepad.exe
C:\Windows\notepad.exe
false
The result show "false"
On 07.12.19 05:00, Marcone wrote:
import std;
alias cmd = compose!(to!bool, wait, spawnShell, to!string);
void main(){
writeln(cmd("where notepad.exe"));
}
Result:
C:\Windows\System32\notepad.exe
C:\Windows\notepad.exe
false
The result show "false" because good spawnshell command
import std;
alias cmd = compose!(to!bool, wait, spawnShell, to!string);
void main(){
writeln(cmd("where notepad.exe"));
}
Result:
C:\Windows\System32\notepad.exe
C:\Windows\notepad.exe
false
The result show "false" because good spawnshell command return 0
and 0 to bool is false.
On Friday, December 6, 2019 9:48:21 AM MST Joseph Rushton Wakeling via
Digitalmars-d-learn wrote:
> Hello folks,
>
> I have a use-case that involves wanting to create a thin struct
> wrapper of underlying string data (the idea is to have a type
> that guarantees that the string has certain
On Friday, 6 December 2019 at 23:25:30 UTC, Johannes Loher wrote:
On Tuesday, 3 December 2019 at 10:06:22 UTC, Mike Parker wrote:
On Tuesday, 3 December 2019 at 10:03:22 UTC, Basile B. wrote:
That's interesting details of D developement. Since you reply
to the first message I think you have
On Tuesday, 3 December 2019 at 10:06:22 UTC, Mike Parker wrote:
On Tuesday, 3 December 2019 at 10:03:22 UTC, Basile B. wrote:
That's interesting details of D developement. Since you reply
to the first message I think you have not followed but in the
last reply I told that maybe we should be
On Friday, 6 December 2019 at 21:02:53 UTC, realhet wrote:
Here's my latest attempt on EXTENDING std.algorithm.max's
functionality with a max operation on a custom type.
The type is the GLSL vec2 type which does the max operation
component-wise.
The D std implementation uses the < operator,
On Friday, 6 December 2019 at 14:55:18 UTC, Ferhat Kurtulmuş
wrote:
On Friday, 6 December 2019 at 13:25:24 UTC, realhet wrote:
On Friday, 6 December 2019 at 13:04:57 UTC, Ferhat Kurtulmuş
wrote:
[...]
Thx for answering!
[...]
In d you can also use scoped imports:
On Wednesday, 4 December 2019 at 12:54:34 UTC, Basile B. wrote:
On Wednesday, 4 December 2019 at 03:17:27 UTC, Adam D. Ruppe
wrote:
On Wednesday, 4 December 2019 at 01:28:00 UTC, H. S. Teoh
wrote:
typeof(return) is one of the lesser known cool things about D
that make it so cool. Somebody
On Friday, 6 December 2019 at 16:48:21 UTC, Joseph Rushton
Wakeling wrote:
Hello folks,
I have a use-case that involves wanting to create a thin struct
wrapper of underlying string data (the idea is to have a type
that guarantees that the string has certain desirable
properties).
The
Hello folks,
I have a use-case that involves wanting to create a thin struct
wrapper of underlying string data (the idea is to have a type
that guarantees that the string has certain desirable properties).
The string is required to be valid UTF-8. The question is what
the most useful API
On Friday, 6 December 2019 at 13:25:24 UTC, realhet wrote:
On Friday, 6 December 2019 at 13:04:57 UTC, Ferhat Kurtulmuş
wrote:
[...]
Thx for answering!
[...]
In d you can also use scoped imports:
https://dlang.org/spec/module.html#scoped_imports
On Friday, December 6, 2019 12:03:45 AM MST berni44 via Digitalmars-d-learn
wrote:
> In std.typecons, in Tuple there are two opCmp functions, that are
> almost identical; they only differ by one being const and the
> other not:
>
> int opCmp(R)(R rhs)
> if
On Friday, 6 December 2019 at 12:34:17 UTC, realhet wrote:
Hi,
I'm trying to use a popular function name "max", and extend it
for my special types:
For example:
module utils;
MyType max(in MyType a, in MyType a){...} //static function
struct V3f{
V3f max(in V2f b){...} //member function
On Friday, 6 December 2019 at 13:04:57 UTC, Ferhat Kurtulmuş
wrote:
On Friday, 6 December 2019 at 12:34:17 UTC, realhet wrote:
Hi,
I'm trying to use a popular function name "max", and extend it
for my special types:
For example:
module utils;
MyType max(in MyType a, in MyType a){...}
On Friday, 6 December 2019 at 12:34:17 UTC, realhet wrote:
Hi,
I'm trying to use a popular function name "max", and extend it
for my special types:
For example:
module utils;
MyType max(in MyType a, in MyType a){...} //static function
struct V3f{
V3f max(in V2f b){...} //member function
Hi,
I'm trying to use a popular function name "max", and extend it
for my special types:
For example:
module utils;
MyType max(in MyType a, in MyType a){...} //static function
struct V3f{
V3f max(in V2f b){...} //member function
}
module gl3n;
vec3 max(in vec3 a, in vec3 a) //another
On Wednesday, 4 December 2019 at 08:01:59 UTC, Per Nordlöw wrote:
On Tuesday, 3 December 2019 at 13:43:26 UTC, Jan Hönig wrote:
pseudocode:
alias set = bool[]
set foo = ...
set bar = ...
set result;
One simple optimization is to
set* smallest;
set* largest;
if (foo.length < bar.length)
{
On Friday, 6 December 2019 at 07:03:45 UTC, berni44 wrote:
In std.typecons, in Tuple there are two opCmp functions, that
are almost identical; they only differ by one being const and
the other not:
int opCmp(R)(R rhs)
if (areCompatibleTuples!(typeof(this), R, "<"))
{
20 matches
Mail list logo