On Monday, 26 October 2020 at 14:31:00 UTC, Vino wrote:
Hi All,
Is it possible to create a multi dimensional associative
array using mir.ndslice,
if yes,
(1): request you to point me to some example / docs
(2): below is an example multi dimensional associative array
using the core
On Tuesday, 27 October 2020 at 02:21:39 UTC, matheus wrote:
On Tuesday, 27 October 2020 at 01:26:56 UTC, James Blachly
wrote:
On 10/26/20 9:19 PM, Ruby The Roobster wrote:
Following code doesn't work(it's not the actual code but it
represents it). Is there some rule about function overrides
On Tuesday, 27 October 2020 at 01:26:56 UTC, James Blachly wrote:
On 10/26/20 9:19 PM, Ruby The Roobster wrote:
Following code doesn't work(it's not the actual code but it
represents it). Is there some rule about function overrides
that I don't know about?
...
The error I keep getting no
Following function when called throws an access violation. I
think it has to do with the assert statements, but I don't know
why.
void construct(string type,atom base,atom bonded)
{
base = new
On Tuesday, 27 October 2020 at 01:19:58 UTC, Ruby The Roobster
wrote:
Following code doesn't work(it's not the actual code but it
represents it). Is there some rule about function overrides
that I don't know about?
class a {
public override string toString() {
//...
}
}
class b : a {
public
On 10/26/20 9:19 PM, Ruby The Roobster wrote:
Following code doesn't work(it's not the actual code but it represents
it). Is there some rule about function overrides that I don't know about?
...
The error I keep getting no matter what says: Error: Multiple Overrides
of Same Function. Anybody
Following code doesn't work(it's not the actual code but it
represents it). Is there some rule about function overrides that
I don't know about?
class a {
public override string toString() {
//...
}
}
class b : a {
public override string toString() {
//...
}
}
The error I keep getting no
Because when the main thread is completed the worker thread
continues to run.
On Mon, Oct 26, 2020 at 11:36:12PM +, Per Nordlöw via Digitalmars-d-learn
wrote:
> I need a string template system for generation of parsers in D code to
> compiled in separate phase (not Pegged).
>
> What packages is there for this?
Adela Vais is working on D support for GNU bison, a
I need a string template system for generation of parsers in D
code to compiled in separate phase (not Pegged).
What packages is there for this?
```
struct vec3d
{
float x, y, z;
}
struct triangle
{
vec3d[3] p;
}
struct mesh
{
triangle[] tris;
}
// This here
meshCube.tris = {
// SOUTH
{ 0.0f, 0.0f, 0.0f,0.0f, 1.0f, 0.0f,1.0f, 1.0f, 0.0f },
{ 0.0f, 0.0f,
On Monday, 26 October 2020 at 21:57:18 UTC, Not A Rectangle wrote:
Is this possible to do?
Only if you know the type ahead of time, then you can cast it.
Normally you'd probably just know an interface or base class it
implements then you can cast to that, with the exact derived type
being
Hi everyone,
Say i have a TypeInfo_Class representing a custom type, and i
want a new instance of this class with its custom type, is there
a way to do that?
I am aware that TypeInfo_Class has the methods create() and
factory(), both of which return a new object of the type Object.
I have
On Friday, 16 October 2020 at 03:42:22 UTC, Adam D. Ruppe wrote:
On Friday, 16 October 2020 at 03:04:25 UTC, Jack wrote:
How can I allocate memory for this class?
It is possible but not easy without druntime.
If you are using -betterC, you can use extern(C++) classes with
extern(D) members.
Hi All,
Request your help on the below on how to store the output to a
multi dimensional associative array.
Code:
import std.stdio: writeln;
import asdf: parseJson;
import std.conv: to;
void main()
{
string[int][string] aa;
string apidata = `{"items":
[
On Thursday, 22 October 2020 at 21:55:59 UTC, Jack Applegame
wrote:
There is a funny feature (or bug) in the D language:
static alias this and static operator overloading.
For example
interface Foo {
static {
int value;
void opAssign(int v) { value = v; }
int
On Monday, 26 October 2020 at 13:16:32 UTC, Vladimirs Nordholm
wrote:
Hello.
[...]
Additionally, if you care about generating documentation, then
placing them after whatever is being tested can make them end up
as examples (of how to use them). Handy if your unittests shows
how they're used
Hi All,
Is it possible to create a multi dimensional associative array
using mir.ndslice,
if yes,
(1): request you to point me to some example / docs
(2): below is an example multi dimensional associative array
using the core d module, and
how can we to implement the same
On Monday, 26 October 2020 at 13:36:58 UTC, Steven Schveighoffer
wrote:
On 10/26/20 9:16 AM, Vladimirs Nordholm wrote:
[...]
Wherever you want. Generally people put it right after the
thing being tested to keep files organized.
When the compiler runs unittests it runs them all in the
On 10/26/20 9:16 AM, Vladimirs Nordholm wrote:
Hello.
I have a class which I have written some tests for, to ensure if I ever
change some code it will still work as intended.
The documentation https://dlang.org/spec/unittest.html says it is can be
placed both in the class or outside it.
I
On 10/23/20 12:42 PM, data pulverizer wrote:
Hi all,
the `import` function allows a file to be read at compile time, which
opens up great opportunities for (mostly binary) file IO, where data
types can be coded into files - the user doesn't need to know data types
ahead of time. As specified
On Thursday, 22 October 2020 at 21:55:59 UTC, Jack Applegame
wrote:
Now we can use type Foo as if it were an lvalue/rvalue:
Foo = 5;
int a = Foo;
int b = Foo + a;
Haha, that's pretty neat!
Hello.
I have a class which I have written some tests for, to ensure if
I ever change some code it will still work as intended.
The documentation https://dlang.org/spec/unittest.html says it is
can be placed both in the class or outside it.
I come from a background of having a completely
On Monday, 26 October 2020 at 11:14:47 UTC, frame wrote:
Is there any way to get this working? I know, I could use a
known object to feed the arguments and use that instead - but I
want to keep things simple as possible.
As Simen mentioned, templates cannot be virtual. But you don't
need to
On Monday, 26 October 2020 at 09:25:03 UTC, Jacob Carlborg wrote:
On Monday, 26 October 2020 at 00:56:26 UTC, frame wrote:
If you pass the delegate as a template parameter/alias
parameter, it's more likely to be inlined:
auto myStuff(alias fn)() {
try return fn();
catch (Exception
On Monday, 26 October 2020 at 11:48:48 UTC, Simen Kjærås wrote:
This makes sense if you consider that the user of the interface
has no knowledge of the types that implement it, and vice
versa: the implementing class has no idea which instantiations
to make, and the user has no idea which
On Monday, 26 October 2020 at 11:14:47 UTC, frame wrote:
Did not find this topic:
I have an interface and some wrapper classes that use it. The
wrapper's methods should accept variadic arguments. The runtime
should only work with the interface, trying casting to a
wrapper is not an option,
Did not find this topic:
I have an interface and some wrapper classes that use it. The
wrapper's methods should accept variadic arguments. The runtime
should only work with the interface, trying casting to a wrapper
is not an option, because it's a plugin design.
- defining a variadic
On Monday, 26 October 2020 at 09:43:44 UTC, Vino wrote:
On Sunday, 25 October 2020 at 08:22:06 UTC, 9il wrote:
[...]
Hi All,
Thank you for your help, and now need your suggestion as the
below code is working and it also prints an additional value
which is not expected, so request your
On Sunday, 25 October 2020 at 08:22:06 UTC, 9il wrote:
On Sunday, 25 October 2020 at 06:05:27 UTC, Vino wrote:
Hi All,
Currently we are testing various json module such as
"std.json, std_data_json, vibe.data.json and asdf", the below
code works perfectely while use "std_data_json or
On Monday, 26 October 2020 at 00:56:26 UTC, frame wrote:
I see that your approach can handle functions and delegates but
isn't that not equivalent like this template for a function?
auto myStuff(T)(T function() fn) {
try {
return fn();
}
catch (Exception e) {
//
On Sunday, 25 October 2020 at 16:50:09 UTC, Jack wrote:
Which build tool are you refering to? an existing one or build
one oneself to do this job?
It should work with any build tool that has hooks to execute
arbitrary commands.
--
/Jacob Carlborg
32 matches
Mail list logo