I think if `class` is a reference type, it should've been
explicit:
```sh
class C {
...
}
auto obj = new C();
void func(ref C obj)
{
...
}
```
I don't mind if it does not compile without the `ref`, but it
should be on the table - WYSIWYG.
On Thursday, 22 April 2021 at 13:08:39 UTC, matheus wrote:
On Thursday, 22 April 2021 at 01:31:09 UTC, Ali Çehreli wrote:
On 4/19/21 6:12 PM, Walter Bright wrote:
I'll be doing a reprise of my DConf 2020 talk on Destroy All
Memory Corruption on April 21, 2021 at 7PM PST.
https://nwcpp.org/
On Wednesday, 6 January 2021 at 09:24:28 UTC, Mike Parker wrote:
The Feedback Thread is here:
https://forum.dlang.org/post/qglydztoqxhhcurvb...@forum.dlang.org
Why not "int[auto] arr = [1, 2, 3]" ?
IMHO auto keyword is less ambiguous than $.
On Thursday, 17 September 2020 at 12:58:06 UTC, Mike Parker wrote:
DIP 1030, "Named Arguments", has been accepted.
I would really want to see tuples ...
On Sunday, 29 December 2019 at 17:03:14 UTC, Jan wrote:
Hi,
Is there a way to forward all input and output from a shell?
This implies that e.g. pressing the left arrow on the keyboard
is immediately being forwarded to the shell and that the output
from a shell would be *exactly* the same as
On Monday, 25 November 2019 at 08:22:17 UTC, Andrej Mitrovic
wrote:
From:
https://github.com/dlang/phobos/blob/10b9174ddcadac52f6a1ea532deab3310d3a8c03/std/concurrency.d#L1913-L1916:
-
///
final @property bool isClosed() @safe @nogc pure
{
synchronized (m_lock)
{
return
On Tuesday, 19 November 2019 at 19:37:41 UTC, Ron Tarrant wrote:
In 2006, I started a blog on PHP-GTK 2.x that ran for 40 posts
before the blog site I was using closed its door. By then, I
was caught up in writing Corkboard, the first full-featured
application I'd written for my own amusement
On Sunday, 30 June 2019 at 23:46:27 UTC, Murilo wrote:
Hi everyone, I am writing a tutorial teaching the basics about
multimedia programming using the arsd library. This is a
library all D programmers should have since it is very useful
and easy. In this tutorial I will teach in a fun and easy
On Sunday, 23 June 2019 at 10:55:52 UTC, Ron Tarrant wrote:
Stage 1 is now complete. Blog entries are color-associated in
an effort to make things more visual. Each topic also has its
own avatar. Points to anyone who can figure out why each avatar
is associated with its topic.
On Tuesday, 4 June 2019 at 12:23:27 UTC, Aurélien Plazzotta wrote:
On Tuesday, 4 June 2019 at 01:54:28 UTC, Kaylan Tussey wrote:
I hope someone is better in paint3d than I am!
https://github.com/KaylanTussey/3DD
Very nice and thanks!
Perhaps you could add a C++ corpse being trampled by D
On Wednesday, 8 May 2019 at 08:00:15 UTC, Andrej Mitrovic wrote:
On Wednesday, 8 May 2019 at 07:57:40 UTC, Mike Parker wrote:
The venue uses WebEx for livestreaming. All the information is
available in this PDF:
https://drive.google.com/open?id=1yekllbfOmxHqJNuuWIVeP9vNeROmfp1I
"When
On Saturday, 2 February 2019 at 19:23:58 UTC, Ron Tarrant wrote:
Thanks for the replies, fellow programmers. (generic, unisex,
PC, and all-encompassing)
If I could trouble someone for a complete working example so I
have something to study, that would be excellent.
I think that's what you
On Tuesday, 18 December 2018 at 12:07:37 UTC, Andrey wrote:
Hi,
Have array:
enum array = ["qwerty", "a", "baz"];
Need to reverse and sort array elements to get this result:
[a, ytrewq, zab]
Did this:
enum result = array.map!(value => value.retro()).sort();
Got:
Error: template
On Sunday, 17 June 2018 at 02:25:59 UTC, Adam D. Ruppe wrote:
On Sunday, 17 June 2018 at 01:02:17 UTC, DigitalDesigns wrote:
If this was a sane language constraint then any identifiers
starting with __ that were not reserved would at least give a
warning but particularly give an error! Not
It is funny, there is 'DLib' under C++.
On Tuesday, 9 January 2018 at 20:39:25 UTC, aberba wrote:
On Tuesday, 9 January 2018 at 19:46:00 UTC, aberba wrote:
[1] is a curated list of machine learning libraries for
several programming languages (no D library in list). I don't
know much about ML
On Sunday, 7 January 2018 at 20:41:57 UTC, Dechcaudron wrote:
Updating this library I coded more than a year ago, so that I
could use it as an optional dependency of the coming up dli
library.
It allows the runtime evaluation of simple math expressions
like `1 + 2 * 3` or `1 ^ foo`, with foo
Built-in tuples:
{val1, val2} = func();
On Friday, 29 December 2017 at 07:53:51 UTC, IM wrote:
I will start:
-- Better compiler errors, better compiler errors, better
compiler errors.
I really wish that the compiler errors could receive some
refinement. Mostly it feels like some
On Wednesday, 1 November 2017 at 01:16:32 UTC, solidstate1991
wrote:
After I started to alter my graphics engine to use the multiple
kinds of bitmaps (now using multiple language features, like
templates and aliases) on one layer, I noticed that type
detection of bitmap objects would be easier
Core.stdc.signal.signal() requires that a signal handler function
is "nothrow @nogc @system".
These attributes impose quite a limitation - one cannot even
print which signal was accepted.
While if one imports this same function via "extern (C)" path, he
can freely throw and allocate memory in
On Sunday, 17 September 2017 at 08:15:58 UTC, Ky-Anh Huynh wrote:
Hi,
I want to list all processes by scanning /proc/. The following
code doesn't work
[code]
foreach (string fstatm; dirEntries("/proc/", "[0-9]*",
SpanMode.shallow)) {
writefln("pid %s", fstatm);
}
[/code]
as it
On Saturday, 19 August 2017 at 18:33:37 UTC, WhatMeWorry wrote:
On Friday, 18 August 2017 at 20:39:38 UTC, angel wrote:
On Friday, 18 August 2017 at 02:38:15 UTC, WhatMeForget wrote:
[...]
This actually appears correct ...
The 1-st example:
Each call to makeCalculator() increments a static
On Friday, 18 August 2017 at 02:38:15 UTC, WhatMeForget wrote:
Can someone explain what is the difference between the two?
Thanks.
module gates;
import std.stdio;
import std.random;
alias Calculator = int delegate(int);
Calculator makeCalculator()
{
static int context = 0;
int
On Saturday, 5 August 2017 at 17:08:32 UTC, Johnson Jones wrote:
using gtk, it has a type called value. One has to use it to get
the value of stuff but it is a class. Once it is used, one
doesn't need it.
Ideally I'd like to treat it as a struct since I'm using it in
a delegate I would like
On Wednesday, 26 July 2017 at 18:09:23 UTC, Andrei Alexandrescu
wrote:
I got this on a Google Alert for "dlang":
https://launchpad.net/ubuntu/+source/language-pack-kn/1:17.10+20170724/+build/13147073. Is it connected to the D language? -- Andrei
No, this is related to Kannada language
On Saturday, 1 April 2017 at 19:17:01 UTC, aberba wrote:
HackerRank (https://www.hackerrank.com) "is a place where
programmers from all over the world come together to solve
problems in a wide range of Computer Science domains such as
algorithms, machine learning, or artificial intelligence,
On Thursday, 2 March 2017 at 12:31:27 UTC, qznc wrote:
On Thursday, 2 March 2017 at 09:45:40 UTC, Martin Tschierschke
wrote:
On Thursday, 2 March 2017 at 09:05:43 UTC, Jared Jeffries
wrote:
I'm not completely joking ;)
D deserves a lot more fame, because it really allows
programmers to
On Thursday, 9 February 2017 at 14:39:41 UTC, angel wrote:
On Thursday, 9 February 2017 at 13:30:07 UTC, jkpl wrote:
I'm looking for a better way to do this, if possible:
```
class Tool
{
string name;
}
T namedTool(alias Variable, T)()
{
T result = new T;
result.name =
On Thursday, 9 February 2017 at 13:30:07 UTC, jkpl wrote:
I'm looking for a better way to do this, if possible:
```
class Tool
{
string name;
}
T namedTool(alias Variable, T)()
{
T result = new T;
result.name = Variable.stringof;
return result;
}
void main()
{
Tool grep;
On Wednesday, 1 February 2017 at 01:08:19 UTC, Emil wrote:
is it possible to intercept the STDOUT or STDERR and capture
the output into a variable ?
some pseudocode to explain what I mean
string[] output_buffer;
stdout.capture_to(output_buffer);
writeln("test 1"); # not printed
On Sunday, 4 December 2016 at 15:30:22 UTC, vladdeSV wrote:
Hello!
I have a question not directly related to D as it is with
coding standards.
My issue at hand is if I have one variable for a class, which I
want to be directly accessible for anything else, should it be
1. public, or
2.
On Sunday, 4 December 2016 at 01:36:50 UTC, deadalnix wrote:
First, presentation:
https://www.youtube.com/watch?v=9OIEZAj243g
Some of this is available in LLVM today, and everything
presented here will be in 4.0 . The long story short: ThinLTO
can do most of what LTO does but with a price
This article presents an insight into a peculiar interaction
between Java GC and Linux scheduler on the background of Linux
containerization technology - the CGROUP.
IMHO the CGROUP only amplifies the discussed impact, that exists
anyway.
A short summary:
Linux scheduler allocates a time
On Wednesday, 5 October 2016 at 02:11:14 UTC, Meta wrote:
I'm currently writing up a DIP to propose removing `body` as a
keyword to allow it to be used for variable names, functions,
etc. I'm looking for examples and contexts where `body` would
normally be used as a variable, function name,
I think the conclusions about iOS vs. Android OS-level memory
collection are not applicable to D GC discussion.
An OS collects all the memory pages allocated for a process upon
exit - no heap scan, no RC. It more resembles a one huge free()
call.
The discussion is mainly about eager vs.
If one creates a unittest block in a templated class (or struct),
the unittest block will be multiplied per class specialization,
which might turn out to be quite large number.
E.g.
struct A(T) {
...
unittest {
...
}
}
...
auto a = A!int;
auto b = A!int;
auto c
Let each thread have a name related to its task.
It is like having a shared Tid array, but already implemented.
Reference:
http://dlang.org/phobos/std_concurrency.html#.register
I happen to be CompuLab's ex-employee, and I have even been
involved in SW development of the AirTop computer ...
So it is D-friendly at least to the extent, that a D fan was
involved in its development.
It is indeed quite powerful. The technical support is also very
good.
Building a fanless
But what about this ?
https://forum.dlang.org/thread/eryphpbznrrovjvxj...@forum.dlang.org
I would, actually, like to see it integrated with the core
language syntax, kinda:
scope(function) ...
While your solution is viable from the technical point of view,
having a consistent language syntax could also be nice.
Wait !
x.value -= 100; would call the invariant ?
Alias this only rewrites your expression:
x -= 100; becomes x.value -= 100;
No method is called. Then there is no reason (is there ?) to call
the invariant.
If you would create getter/setter properties ...
The parent / child relationship always exists.
In POSIX OSs, you may ignore SIGCHLD signal (announcing child
process death), so that in case of child process exit it will not
become zombie, rather it will be disposed on the spot.
As a side note, in Linux, there exist a system call allowing
41 matches
Mail list logo