On Saturday, 28 January 2023 at 23:19:35 UTC, ProtectAndHide
wrote:
On Wednesday, 25 January 2023 at 15:43:46 UTC, ryuukk_ wrote:
using static class and static function is not "OOP way" of
doing things, it's a hack to mimic procedural style because
Java doesn't have proper modules / scoping
I'm trying to do something like
```d
void main()
{
auto d = &c;
*d.writeln;
}
void c()
{
}
```
In an attempt to get the hexadecimal representation of the
machine code of a function. Of course, function pointers cannot
be dereferenced. What do?
Furthermore, I would like to be able
On 1/29/23 13:45, Ruby the Roobster wrote:
> Of course, function pointers cannot be dereferenced.
Since you want to see the bytes, just cast it to ubyte*. The following
function dumps its own bytes:
import std;
void main() {
enum end = 0xc3;
for (auto p = cast(ubyte*)&_Dmain; true; +
On Sunday, 29 January 2023 at 21:45:11 UTC, Ruby the Roobster
wrote:
I'm trying to do something like
```d
void main()
{
auto d = &c;
*d.writeln;
}
void c()
{
}
```
In an attempt to get the hexadecimal representation of the
machine code of a function. Of course, function pointers
can
On 1/29/23 14:19, max haughton wrote:
> it is not trivial to find where the *end* of a
> function is
I suspected as much and did run ...
> objdump
... to fool myself into thinking that 0xc3 was . Well, arguments
e.g. pointer values can have 0xc3 bytes in them. So, yes, I am fooled! :)
Ali
I hate a world with the classes. I can do almost anything I
want without the classes. The software world soared above C
without classes.
SDB@79
As I said in my email to you -- each to their own.
There's no point in arguing about whether OOP is the best method
of doing things or procedural i
On Saturday, 28 January 2023 at 23:19:35 UTC, ProtectAndHide
wrote:
That is, you can do OOP without classes
How so? Every OOP definition includes classes (encapsulation +
inheritance).
So, which package do I use for TOML?
I find these three:
* toml-foolery (Andrej Petrović)
* toml-d, or toml.d (oglu on github) at ver 0.3.0
* toml, (dlang community on github) at ver 2.0.1
I'm guessing from version numbers that the third one, toml, is
officially good for real world use. But I
On Saturday, 21 January 2023 at 23:07:45 UTC, jwatson-CO-edu
wrote:
I am trying to create a struct with a settable method that has
access to the struct scope.
Is this the only way?
Is there a way to give access without explicitly passing `this`?
Why not use the delegate? What exactly do you wa