Hi!
I've just created a situation in my code that is summarized by
the following example. I don't know how to solve it with @safe
code.
A third party library provides a struct that is not copyable:
// provided by third party
struct Foo {
@disable this() @safe;
@disable this(ref retur
On 01.03.20 21:58, p.shkadzko wrote:
**
Matrix!T matrixDotProduct(T)(Matrix!T m1, Matrix!T m2)
in
{
assert(m1.rows == m2.cols);
This asserts that the result is a square matrix. I think you want
`m1.cols==m2.rows` instead.
On Wednesday, 4 March 2020 at 12:03:48 UTC, Gregor Mückl wrote:
Hi!
I've just created a situation in my code that is summarized by
the following example. I don't know how to solve it with @safe
code.
A third party library provides a struct that is not copyable:
// provided by third party
st
On 3/4/20 9:04 AM, aliak wrote:
On Wednesday, 4 March 2020 at 12:03:48 UTC, Gregor Mückl wrote:
Hi!
I've just created a situation in my code that is summarized by the
following example. I don't know how to solve it with @safe code.
A third party library provides a struct that is not copyable
I want to create a Client, which receives and handles received
data in background while the Client can send via the same socket.
My first idea was something like this:
class Client {
private Socket socket;
private Tid receiverTid;
this(Socket socket) {
On Wednesday, 4 March 2020 at 23:37:00 UTC, Martin Brezel wrote:
The documentation for spawn() states: "all arguments to fn must
either be shared or immutable or have no pointer indirection."
The easiest thing to do is to just cast
import std.concurrency;
import std.socket;
void main() {
Searching for beauty code implementation.
Goal is: Create new object with "custom initializer".
"custom initializer" - is function, executed in _ctor, in object
scope.
Main Goal is: "clean readable beauty code".
Like this and better:
class DataGrid : Base
{
this()
{
super()
On Thursday, 5 March 2020 at 06:48:53 UTC, Виталий Фадеев wrote:
Searching for beauty code implementation.
Goal is: Create new object with "custom initializer".
"custom initializer" - is function, executed in _ctor, in
object scope.
Main Goal is: "clean readable beauty code".
Like this and
I am making an attempt convert Lua to D. This is less about the
conversion and more about exploring the tooling to make it happen.
I have chosen to do this file by file and attempting to start
with linint. I wanted to make use of dpp, however I hit a
segmentation fault and reduced dependency.
In Adam Ruppe's D Cookbook there're these lines in a ref counting
example:
RefCountedObject o = void; // What does this mean/do?
o.data = new Implementation();
o.data.refcount = 1;
I don't understand the first line; could someone explain please?
10 matches
Mail list logo