Is there a way to get the name of a named capture when iterating
over captures from a regular expression match? I've looked at
the std.regex code and it seems like "no" to my eyes, but I
wonder if others here have... a way.
My original problem is this: I need to populate an associative
array
struct vec_struct {
alias field this;
bool b;
int8 field;
}
In this code when you look at the generated x64 code output by
GDC it seems to be doing a nice job, because it has got the
offset right for the 256-bit YMM 'field' correct.
Does D automatically propagate the alignment
On Tuesday, 28 February 2017 at 20:08:25 UTC, Jordan Wilson wrote:
Hello,
Been trying to learn the Simple Fast Multimedia Library (SFML)
using the Derelict bindings, and noticed some functionality is
offered by both SFML and the std library (for example, sfClock
and sfMutex).
Is there a gen
On Tuesday, 28 February 2017 at 00:22:28 UTC, sarn wrote:
If you ever have doubts, you can always use something like
this to check:
assert (__ctfe);
Sorry, "enforce" would more appropriate if you're really
checking.
if (!__ctfe) assert(false);
... might be the best option. That shouldn't
On Tuesday, 28 February 2017 at 20:48:33 UTC, Petar Kirov
[ZombineDev] wrote:
On Tuesday, 28 February 2017 at 20:27:25 UTC, Alexey H wrote:
[...]
If you really care about performance, have a look this:
http://forum.dlang.org/post/20151014090114.60780ad6@marco-toshiba
std.json is not tuned f
On Tuesday, 28 February 2017 at 20:27:25 UTC, Alexey H wrote:
So, my real question is: can i actually, by any change, get the
description of an underlying struct that the call to parseJSON
generates?
It doesn't actually generate one, it just returns a tagged union
(a kind of dynamic type).
On Tuesday, 28 February 2017 at 20:49:39 UTC, crimaniak wrote:
On Sunday, 26 February 2017 at 21:50:38 UTC, Jordan Wilson
wrote:
.map!(a => a.to!double)
If lambda just calls another function you can pass it directly:
== .map!(to!double)
Learn something new everyday, thanks :-)
On Tuesday, 28 February 2017 at 20:48:33 UTC, Petar Kirov
[ZombineDev] wrote:
On Tuesday, 28 February 2017 at 20:27:25 UTC, Alexey H wrote:
Hello, guys!
I'm working on a project that involves parsing of huge JSON
datasets in real-time.
Just an example of what i'm dealing with is here:
https:
On Sunday, 26 February 2017 at 21:50:38 UTC, Jordan Wilson wrote:
.map!(a => a.to!double)
If lambda just calls another function you can pass it directly:
== .map!(to!double)
On Tuesday, 28 February 2017 at 20:27:25 UTC, Alexey H wrote:
Hello, guys!
I'm working on a project that involves parsing of huge JSON
datasets in real-time.
Just an example of what i'm dealing with is here:
https://gist.githubusercontent.com/gdmka/125014058bb7d7f01b867fac56300a61/raw/f0c6b5b
Hello, guys!
I'm working on a project that involves parsing of huge JSON
datasets in real-time.
Just an example of what i'm dealing with is here:
https://gist.githubusercontent.com/gdmka/125014058bb7d7f01b867fac56300a61/raw/f0c6b5be5fb01b16dd83f07c577b72f76f72c855/data.json
Can't think of any
Hello,
Been trying to learn the Simple Fast Multimedia Library (SFML)
using the Derelict bindings, and noticed some functionality is
offered by both SFML and the std library (for example, sfClock
and sfMutex).
Is there a general design principle of, say, use the std library
whenever possibl
On Tuesday, 28 February 2017 at 17:16:43 UTC, Daniel Kozák wrote:
V Tue, 28 Feb 2017 15:15:00 +
Anton Pastukhov via Digitalmars-d-learn
napsáno:
I can't see the logic in AA foreach order. Consider this code:
...
Output:
three
two
one
four
I was sure output should be
one
two
three
four
h
V Tue, 28 Feb 2017 15:15:00 +
Anton Pastukhov via Digitalmars-d-learn
napsáno:
> I can't see the logic in AA foreach order. Consider this code:
> ...
> Output:
> three
> two
> one
> four
>
> I was sure output should be
> one
> two
> three
> four
https://forum.dlang.org/post/xbanhtkvrizyqjci
I'm using CMAKE to build my project. With
https://github.com/dcarp/cmake-d this works almost. The only
thing I do not manage to get working is running cmake in release
mode. When I use -DCMAKE_BUILD_TYPE=Release I get some linker
errors, which I do not get, when compiling manually. (In both
ca
On Tuesday, 28 February 2017 at 15:44:46 UTC, bachmeier wrote:
On Tuesday, 28 February 2017 at 15:33:46 UTC, ikod wrote:
AA implemented as hash table, so it doesn't preserve insertion
order. You have to sort keys when you need:
import std.algorithm;
import std.stdio;
void main() {
aut
On Tuesday, 28 February 2017 at 15:33:46 UTC, ikod wrote:
AA implemented as hash table, so it doesn't preserve insertion
order. You have to sort keys when you need:
import std.algorithm;
import std.stdio;
void main() {
auto aa = ["one":1,
"two":2
On Tuesday, 28 February 2017 at 15:15:00 UTC, Anton Pastukhov
wrote:
I can't see the logic in AA foreach order. Consider this code:
```
void main() {
string[string] test = [
"one": "1",
"two": "2",
"three": "3",
"four": "4"
];
import std.stdio:writeln
I can't see the logic in AA foreach order. Consider this code:
```
void main() {
string[string] test = [
"one": "1",
"two": "2",
"three": "3",
"four": "4"
];
import std.stdio:writeln;
foreach(k, v; test) {
writeln(k);
}
}
Output:
thre
On Saturday, 25 February 2017 at 16:39:18 UTC, Moritz Maxeiner
wrote:
On Saturday, 25 February 2017 at 15:13:27 UTC, Radu wrote:
[...]
Thanks for the example.
[...]
Hm, that's an issue you'd best take up to the bugtracker, I
think. Maybe there's a way around that, but I don't know.
[..
On Tuesday, 28 February 2017 at 07:41:36 UTC, Christian Köstlin
wrote:
As I understand the only difference between assert and enforce
is, that
assert is not compiled into releases?
Thanks!
Christian
Pretty much so. The intention is that assert means something
that's supposed to be true (and
21 matches
Mail list logo