On 13.01.21 21:47, tsbockman via Digitalmars-d-learn wrote:
Is CTFE I/O a standard feature in other languages? How many other languages even have a CTFE
feature comparable to D's?
Just two langs I use from time to time:
1) nim via forced ctfe; way faster than d by running through a vm:
const
On 11.01.21 16:27, Marcone via Digitalmars-d-learn wrote:
function [...] without template.
And why don't you want to use templates for that? It's as easy as that:
import std;
auto foo(T)(T tup) if (isTuple!T) {
// statically introspect tuple here ...
return tup;
}
void main()
{
On 11.01.21 16:45, Marcone via Digitalmars-d-learn wrote:
"Hello World"[0..?.indexOf("o")]
Does until [1] do the trick?
"Hello World".until("o") // => "Hell"
[1] https://dlang.org/library/std/algorithm/searching/until.html
On 10.01.21 23:15, kdevel via Digitalmars-d-learn wrote:
Don't you already know "." as the path you passed to dirEntries?
I don't know the change date, the uid/gid etc.
Not as sexy, but can't you manually construct DirEntries [1] by supplying the paths via std.path
[2]? DirName [3] should
On 04.01.21 16:39, ludo456 via Digitalmars-d-learn wrote:
Can someone point me to an article or more explanations about that?
already came up, see:
https://forum.dlang.org/thread/jnrvugxqjzenykztt...@forum.dlang.org
https://forum.dlang.org/thread/lhyagawrjzzmrtbok...@forum.dlang.org
On 28.12.20 00:12, Rekel via Digitalmars-d-learn wrote:
is there a reason to use either 'splitter' or 'split'?
split gives you a newly allocated array with the results, splitter is lazy equivalent and doesn't
allocate. Feel free using either, doesn't matter much with these small puzzle
On 27.12.20 01:13, Rekel via Digitalmars-d-learn wrote:
For context, I'm trying this with the puzzle input of day 6 of this year's advent of code.
(https://adventofcode.com/)
For that specific puzzle I simply did:
foreach (group; readText("input").splitter("\n\n")) { ... }
Since the input is
On 06.12.20 06:16, Bruce Carneal via Digitalmars-d-learn wrote:
How difficult would it be to add a, selectable, low-latency GC to dlang?
Is it closer to "we cant get there from here" or "no big deal if you already have the low-latency GC
in hand"?
I've heard Walter mention performance issues
On 06.12.20 06:16, Bruce Carneal via Digitalmars-d-learn wrote:
How difficult would it be to add a, selectable, low-latency GC to dlang?
Is it closer to "we cant get there from here" or "no big deal if you already have the low-latency GC
in hand"?
I've heard Walter mention performance issues
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'));
}
11 matches
Mail list logo