On Tuesday, 17 May 2022 at 04:37:58 UTC, Ali Çehreli wrote:
In you OOP example, I am curious why you chose Shape to be an
interface, rather than a base class.
On Monday, 16 May 2022 at 17:32:20 UTC, Allen Garvey wrote:
I'm working on a comparison of WebAssembly performance for
error propagation dithering using D, C++ and Zig. So far C++
and Zig work as expected, but for D, despite using the same
algorithm and similar code the output is different.
H
On Tuesday, 17 May 2022 at 09:38:31 UTC, Sergey wrote:
On Monday, 16 May 2022 at 17:32:20 UTC, Allen Garvey wrote:
I'm working on a comparison of WebAssembly performance for
error propagation dithering using D, C++ and Zig. So far C++
and Zig work as expected, but for D, despite using the same
On Monday, 16 May 2022 at 22:25:23 UTC, kdevel wrote:
On Monday, 16 May 2022 at 16:53:15 UTC, SvGaming wrote:
[...]
[...]
In main your program reads an integer:
```
int n;
writef("Pick an option: ");
readf(" %s", &n);
```
[...]
Just tried the solution and it works perfectly!
Thank
On Monday, 16 May 2022 at 18:17:03 UTC, Allen Garvey wrote:
Thanks so much, that fixed the problem! You have no idea have
long I have spent trying to debug this!
Oh I should have checked my impl, where I did all this already!
https://github.com/adamdruppe/webassembly/blob/master/arsd-webassemb
On Tuesday, 17 May 2022 at 11:36:21 UTC, Adam D Ruppe wrote:
Oh I should have checked my impl, where I did all this already!
https://github.com/adamdruppe/webassembly/blob/master/arsd-webassembly/object.d#L263
Looks like you forgot to increment the pointer and need "*d++ =
cast(ubyte) c;" the
On Tuesday, 17 May 2022 at 06:28:10 UTC, cc wrote:
Far better to just keep your house clean every day than let the
trash pile up and wait for the maid to come, IMO.
Right,GC is a bad idea!
On Tuesday, 17 May 2022 at 11:43:45 UTC, Siarhei Siamashka wrote:
Looks like you forgot to increment the pointer and need "*d++ =
cast(ubyte) c;" there.
hahaha yup.
And filling the buffer one byte at a time is likely slow.
prolly but meh, that's where the intrinsics are nice.
On Tuesday, 17 May 2022 at 11:50:30 UTC, zjh wrote:
Right,GC is a bad idea!
Endless use of memory without freeing.
It's totally unreasonable waste.
On Tuesday, 17 May 2022 at 11:53:40 UTC, zjh wrote:
On Tuesday, 17 May 2022 at 11:50:30 UTC, zjh wrote:
Right,GC is a bad idea!
Endless use of memory without freeing.
It's totally unreasonable waste.
It's not really endless use of memory and it does free. Depending
on the strategy then it
On 5/17/22 02:30, forkit wrote:
> On Tuesday, 17 May 2022 at 04:37:58 UTC, Ali Çehreli wrote:
>>
>
> In you OOP example, I am curious why you chose Shape to be an interface,
> rather than a base class.
I always have the same question. :) interface feels lighterweight, so it
is an arbitrary decis
Hi again Ali!
On Monday, 16 May 2022 at 21:58:09 UTC, Ali Çehreli wrote:
I for one misunderstood you. I really thought you were arguing
that struct and class should be the same.
To be specific:
- My *primary* concern is that:
Foo foo;
is undefined behavior waiting to happen, that I can't d
On Tuesday, 17 May 2022 at 14:40:48 UTC, Kevin Bailey wrote:
Foo foo;
is undefined behavior waiting to happen, that I can't detect at
a glance.
It is actually perfectly well defined - for the class, it will be
null, and this will kill the program if you use it.
You might not like that defi
On 5/17/22 07:40, Kevin Bailey wrote:
> Foo foo;
>
> is undefined behavior waiting to happen, that I can't detect at a glance.
Foo is null there. (I don't remember whether accessing through null
reference is undefined or segmentation fault (on common systems).) Using
foo will not do some rando
On Monday, 16 May 2022 at 21:20:43 UTC, Ali Çehreli wrote:
On 5/16/22 10:35, Johan wrote:
> What is very problematic is that you cannot see the
difference in
> syntax. In my opinion it would have been much better if the
language
> required using a `*` for class types: for example `Foo* a`,
and `
On Monday, 16 May 2022 at 09:59:41 UTC, bauss wrote:
On Monday, 16 May 2022 at 09:46:57 UTC, IGotD- wrote:
On Sunday, 15 May 2022 at 13:26:30 UTC, vit wrote:
[...]
This also something I wondered, it should be standard in the D
library. Implementing it can be done straight forward with
exist
I am compiling some test code which dmd v2.100.and linking
against a libdecimal.a compiled in March, probably compiled with
dmd v2.099.0.
```
$ dmd -g mytest.d decimal.git/libdecimal.a
```
Now the linker complains:
```
decimal.git/libdecimal.a(decimal_4f_a27.o):(.data._D7decimalQi25Invalid
As far as I know, no D compiler guarantees compatibility between objects
built on different version of itself.
The change would have been[0].
[0]
https://github.com/dlang/druntime/commit/c6762914682d4fa894e2b746bf4bd9ce3ec9f7cb
On Tuesday, 17 May 2022 at 09:30:12 UTC, forkit wrote:
On Tuesday, 17 May 2022 at 04:37:58 UTC, Ali Çehreli wrote:
In you OOP example, I am curious why you chose Shape to be an
interface, rather than a base class.
You can inherit from multiple interfaces, but only from one base
class.
So
On Tuesday, 17 May 2022 at 06:28:10 UTC, cc wrote:
having had this leave a pretty bad taste in my mouth, I now
avoid the GC whenever possible, even when I don't have to.
Bad idea. You should only avoid GC if your profiling shows that
it is bad in a specific piece of code (e.g. some inner loop
I tried neovim editor & serve-d and failed.
I tried kate editor & serve-d and failed.
https://github.com/Pure-D/serve-d
Anyone has a clue ?
https://dlang.org/changelog/2.100.0.html#deprecation_delete
My code:
```D
import std.stdio;
class HttpClient
{
string get(string url)
{
return "";
}
string delete(string url)
{
return "";
}
}
void main()
{
On Wednesday, 18 May 2022 at 01:04:16 UTC, Alain De Vos wrote:
I tried neovim editor & serve-d and failed.
I tried kate editor & serve-d and failed.
https://github.com/Pure-D/serve-d
Anyone has a clue ?
I'm using [lunarvim](https://github.com/LunarVim/LunarVim). It
provides you the ability t
On Tuesday, 17 May 2022 at 00:10:55 UTC, Alain De Vos wrote:
Let's say a shape is ,a circle with a radius ,or a square with
a rectangular size.
I want to pass shapes to functions, eg to draw them on the
screen,
draw(myshape) or myshape.draw();
But how do i implement best shapes ?
You could al
On Wednesday, 18 May 2022 at 02:12:42 UTC, zoujiaqing wrote:
https://dlang.org/changelog/2.100.0.html#deprecation_delete
My code:
```D
import std.stdio;
class HttpClient
{
string get(string url)
{
return "";
}
string delete(string url)
{
25 matches
Mail list logo