On Monday, 13 September 2021 at 18:42:47 UTC, Steven
Schveighoffer wrote:
On 9/13/21 1:54 PM, eugene wrote:
[...]
The GC only scans things that it knows about.
Inside your EventQueue you have this code:
[...]
Umm is it okay that he declared variables `init` and `idle` of
type `Stage`
On Tuesday, 14 September 2021 at 03:24:45 UTC, max haughton wrote:
On Tuesday, 14 September 2021 at 03:19:46 UTC, Elronnd wrote:
On Monday, 13 September 2021 at 11:40:10 UTC, max haughton
wrote:
The dragon book barely mentions SSA for example
In fairness, dmd doesn't use SSA either
That's
On Tuesday, 14 September 2021 at 03:31:17 UTC, Kenneth Dallmann
wrote:
On Sunday, 27 March 2011 at 10:28:00 UTC, Ishan Thilina wrote:
[...]
I had the exact same problem, very frustrating. I believe I
solved the issue,
it was a simple error.
When you are installing D, on Windows, it
On Sunday, 27 March 2011 at 10:28:00 UTC, Ishan Thilina wrote:
When I give "dmd untitled.d" command in my ubuntu maverick 64
bit laptop I get the following error.
"
object.d: Error: module object is in file 'object.d' which
cannot be read
import path[0] = /etc/../../src/phobos
import path[1]
On Tuesday, 14 September 2021 at 03:19:46 UTC, Elronnd wrote:
On Monday, 13 September 2021 at 11:40:10 UTC, max haughton
wrote:
The dragon book barely mentions SSA for example
In fairness, dmd doesn't use SSA either
That's not a good thing.
On Monday, 13 September 2021 at 11:40:10 UTC, max haughton wrote:
The dragon book barely mentions SSA for example
In fairness, dmd doesn't use SSA either
Hi D
I just finished a ~1K line project using `dxml` as the XML reader
for my data streams. It works well in my test examples using
memory mapped files, but like an impulse shopper I didn't notice
that dxml requires `ForwardRange` objects. That's unfortunate,
because my next enhancement
On Monday, 13 September 2021 at 10:23:14 UTC, Dennis wrote:
On Monday, 13 September 2021 at 03:21:37 UTC, leikang wrote:
Are there any recommended books or videos to learn about the
principles of compilation? What else should I learn besides
the principles of compilation?
Check out this
On Monday, 13 September 2021 at 18:45:22 UTC, jfondren wrote:
Instead of using a temporary EpollEvent array in
EventQueue.wait, you could make the array an instance variable
and have registerEventSource populate it directly
Actually, initial version of all that was using array,
allocated in
On Monday, 13 September 2021 at 18:42:47 UTC, Steven
Schveighoffer wrote:
And you are registering your signals using the `+=` operator.
That was a sort of exercise with operator overloading.
Now, with your stopper code that you showed, it looks like you
are storing the reference to stopper
On Monday, 13 September 2021 at 17:18:30 UTC, eugene wrote:
Then after pressing ^C (SIGINT) the program gets SIGSEGV, since
references to sg0 and sg1 are no longer valid (they are
"sitting" in epoll_event structure).
engine/ecap.d(54): Error: field `EpollEvent.es` cannot assign to
misaligned
On 9/13/21 1:54 PM, eugene wrote:
On Monday, 13 September 2021 at 17:40:41 UTC, user1234 wrote:
The problems seems to lies in `newSignal()` which "would" not allocate
using the GC.
final Signal newSignal(int signum) {
Signal sg = new Signal(signum);
sg.owner = this;
On Monday, 13 September 2021 at 16:12:34 UTC, H. S. Teoh wrote:
On Mon, Sep 13, 2021 at 02:12:36PM +, NonNull via
Digitalmars-d-learn wrote:
Which operators cannot be overloaded and why not?
Others have already given the list, so I won't repeat that.
I didn't see unary &. Maybe others
On Monday, 13 September 2021 at 18:06:42 UTC, NonNull wrote:
On Monday, 13 September 2021 at 14:42:42 UTC, jfondren wrote:
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
- condition al expression ` cond ? exp : exp `
And many other boolean operators, unary !, binary && and ||
On Monday, 13 September 2021 at 17:56:34 UTC, user1234 wrote:
thx, so the problem is not what I suspected to be (mixed
gc-managed and manually managed memory). sorrry...
I am actually C coder and do not have much experience
with GC languages, so I did not even attempt to
try use D without GC
On Monday, 13 September 2021 at 14:42:42 UTC, jfondren wrote:
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
- condition al expression ` cond ? exp : exp `
And many other boolean operators, unary !, binary && and ||
https://dlang.org/spec/operatoroverloading.html lists all the
On Monday, 13 September 2021 at 17:18:30 UTC, eugene wrote:
And the most strange thing is this
It is echo-server/echo-client pair.
And it is echo-client that crashes upon SIGINT.
echo-server contains very similar code
class Listener : StageMachine {
enum ulong M0_WORK = 0;
enum
On Monday, 13 September 2021 at 17:54:43 UTC, eugene wrote:
On Monday, 13 September 2021 at 17:40:41 UTC, user1234 wrote:
The problems seems to lies in `newSignal()` which "would" not
allocate using the GC.
final Signal newSignal(int signum) {
Signal sg = new Signal(signum);
On Monday, 13 September 2021 at 17:40:41 UTC, user1234 wrote:
The problems seems to lies in `newSignal()` which "would" not
allocate using the GC.
final Signal newSignal(int signum) {
Signal sg = new Signal(signum);
sg.owner = this;
sg.number = sg_number++;
On Monday, 13 September 2021 at 17:18:30 UTC, eugene wrote:
[...]
At first glance and given the fact that some code necessary to
diagnose the problem accurately is missing:
`new Stopper` allocates using the GC. it's then a "GC range",
it's content will be scanned and handled by the GC,
On Monday, 13 September 2021 at 17:40:41 UTC, user1234 wrote:
On Monday, 13 September 2021 at 17:18:30 UTC, eugene wrote:
[...]
At first glance and given the fact that some code necessary to
diagnose the problem accurately is missing:
`new Stopper` allocates using the GC. it's then a "GC
Code snippets
```d
class Stopper : StageMachine {
enum ulong M0_IDLE = 0;
Signal sg0, sg1;
this() {
super("STOPPER");
Stage init, idle;
init = addStage("INIT", );
idle = addStage("IDLE", );
init.addReflex("M0", idle);
On Mon, Sep 13, 2021 at 02:12:36PM +, NonNull via Digitalmars-d-learn wrote:
> Which operators cannot be overloaded and why not?
Others have already given the list, so I won't repeat that. As to the
"why":
In general, D tries to avoid the wild wild west, every operator for
himself situation
On Monday, 13 September 2021 at 14:59:38 UTC, Paul Backus wrote:
On Monday, 13 September 2021 at 14:42:42 UTC, jfondren wrote:
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
- condition al expression ` cond ? exp : exp `
And many other boolean operators, unary !, binary && and
On Monday, 13 September 2021 at 15:29:05 UTC, user1234 wrote:
[...]
so this is a bit like the postincr case.
i.e "prevent the semantics to be hijacked".
On Monday, 13 September 2021 at 14:42:42 UTC, jfondren wrote:
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
- condition al expression ` cond ? exp : exp `
And many other boolean operators, unary !, binary && and ||
They are all indirectly supported if `opCast` is overloaded:
On Monday, 13 September 2021 at 14:42:42 UTC, jfondren wrote:
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
- condition al expression ` cond ? exp : exp `
And many other boolean operators, unary !, binary && and ||
https://dlang.org/spec/operatoroverloading.html lists all the
On 9/13/21 10:47 AM, user1234 wrote:
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
what else ?
when you have
```d
alias AA1 = int[int];
alias AA2 = AA1[int];
```
then you can write
```d
AA2 aa;
aa[0] = [0 : 0];
aa[0][0] = 0;
```
The `[0][0]` cannot be expressed using
On Monday, 13 September 2021 at 14:42:42 UTC, jfondren wrote:
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
- condition al expression ` cond ? exp : exp `
And many other boolean operators, unary !, binary && and ||
https://dlang.org/spec/operatoroverloading.html lists all the
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
what else ?
when you have
```d
alias AA1 = int[int];
alias AA2 = AA1[int];
```
then you can write
```d
AA2 aa;
aa[0] = [0 : 0];
aa[0][0] = 0;
```
The `[0][0]` cannot be expressed using operator overloads (and a
custom map type
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
- condition al expression ` cond ? exp : exp `
And many other boolean operators, unary !, binary && and ||
https://dlang.org/spec/operatoroverloading.html lists all the
overloadable operators, and
On Monday, 13 September 2021 at 14:12:36 UTC, NonNull wrote:
Which operators cannot be overloaded and why not?
Let's start the list.
- `new` and `delete`
Because operators are overloaded in aggregates
new was supported but not anymore, the idea is
that a an aggregate should not be tied a
Which operators cannot be overloaded and why not?
On Monday, 13 September 2021 at 00:53:06 UTC, leikang wrote:
I want to contribute to the development of the dlang language,
but I feel that I am insufficient, so I want to ask the big
guys, can I participate in the development of the Dlang
language after learning the principles of compilation?
On Monday, 13 September 2021 at 04:08:53 UTC, rikki cattermole
wrote:
On 13/09/2021 3:21 PM, leikang wrote:
Are there any recommended books or videos to learn about the
principles of compilation? What else should I learn besides
the principles of compilation?
The classic book on compilers
On Monday, 13 September 2021 at 03:21:37 UTC, leikang wrote:
Are there any recommended books or videos to learn about the
principles of compilation? What else should I learn besides the
principles of compilation?
Check out this video: [DConf 2016 Day 2 Keynote: Spelunking D
Compiler
36 matches
Mail list logo